centos 安装lamp环境教程

火币

火币HTX

火币是全球三大交易所之一,虚拟货币交易平台安全可靠,注册领取新人礼包!

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

© 版权声明
THE END
点赞5赞赏 分享