centos 安装lamp环境教程

1、安装服务
yum install httpd
yum install php
yum install mysqld
yum install mariadb
yum install php-gd
yum install php-xml
yum install php-mbstring
yum install lrzsz
yum install php-mysql
yum install mariadb
yum install mariadb-server

2、启动服务和设置成开机自启动
service httpd start
service mariadb start
systemctl enable httpd
systemctl enable mariadb

3、清空mysql密码,让navicate能远程连接
use mysql
update user set host=’%’ where host=’127.0.0.1′ ;
service mariadb restart

4、修改php.ini配置,修改上传的文件大小

5、httpd的虚拟主机配置

VirtualHost *:80
ServerName www.域名.com
DocumentRoot /var/www/html/

Options FollowSymLinks
AllowOverride All

Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# This directive allows us to have apache2’s default start page
# in /apache2-default/, but still have / go to the right place
# RedirectMatch ^/$ /apache2-default/

LogLevel error

ServerSignature On
LimitRequestFieldSize 40960
LimitRequestLine 40960
VirtualHost

6、重启httpd服务
service httpd restart

 

 

免责声明:玩转网作为开放的信息发布平台,所有资讯仅代表作者个人观点,与玩转网无关。如文章出现侵权、违规及其他不当言论,请联系微信:pi1881

风险提示:本站所提供的资讯不代表任何投资暗示。投资有风险,入市须谨慎。

山高不厌攀,水深不厌潜,学精不厌苦,只有努力才能赢得最后的成功!

© 版权声明
THE END
感觉文章不错,分享给身边的朋友吧!
点赞5赞赏
分享