LAMP指的Linux(操作系统)、Apache HTTP 服务器,MySQL(有时也指MariaDB,数据库软件)和PHP(有时也是指Perl或Python)的第一个字母,一般用来建立web应用平台。 安装 Apache已 YUM 方式安装 Apache yum install httpd -y 启动 Apache systemctl start httpd 设置开机启动 systemctl enable httpd firewall设置允许远程登录 firewall-cmd --permanent --add-service=http systemctl restart firewalld 测试Apache浏览器访问 http://localhost/ or http://server-ip-address/ 安装 MariaDB用 YUM 安装 MariaDB yum install mariadb-server mariadb -y 启动 MariaDB systemctl start mariadb 设置开机启动 systemctl enable mariadb 设置root密码默认情况下,root密码为空。为防止未授权的访问,我们设置root密码 mysql_secure_installation 安装 PHP安装 PHP yum install php php-mysql php-gd php-pear -y 测试PHP:在Apache文档根目录创建“testphp.php” nano /var/www/html/testphp.php 编辑内容如下 <?php phpinfo(); ?> 重启 httpd 服务 systemctl restart httpd 浏览器访问 http://server-ip-address/testphp.php. 将会显示php的版本信息. 也可以使用如下命令安装所有php modules,重启httpd服务,查看http://server-ip-address/testphp.php,可以看到所有安装的modules yum install php* -y #安装 phpMyAdmin(可选) phpMyAdmin 是一个以PHP为基础,以Web-Base方式架构在网站主机上的MySQL的数据库管理工具,让管理者可用Web接口管理MySQL数据库。 添加 EPEL repository yum install epel-release 安装 phpMyAdmin yum install phpmyadmin -y 配置phpMyAdmin默认,phpMyAdmin只能由本机访问。为了能够远程访问,编辑phpmyadmin.conf file: vi /etc/httpd/conf.d/phpMyAdmin.conf
查找/
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
添加
<Directory /usr/share/phpMyAdmin/>
Options none
AllowOverride Limit
Require all granted
</Directory>
编辑“config.inc.php” 改变phpMyAdmin的authentication,修改“cookie” 为 “http” vi /etc/phpMyAdmin/config.inc.php 重启the Apache service: systemctl restart httpd 访问 phpmyadmin 的控制台 http://server-ip-address/phpmyadmin/ (责任编辑:最模板) |

ecshop仿寺库中国奢侈品网
人气:923
ecshop仿万表网模板
人气:965
zencart英文服装鞋帽女士用
人气:2223
仿麦包包shopex模板
人气:427
ecshop台湾地区分区信息
人气:1162
ecshop商品详情自动生成商
人气:3114