搭建LAMP
1.注意关闭防火墙、selinux
> [root@web01 ~]# iptables -F
> [root@web01 ~]# systemctl stop firewalld
> [root@web01 ~]# systemctl disable firewalld
> [root@web01 ~]# getenforce
> Disabled
2.部署apache
> [root@web01 ~]# systemctl start httpd
> [root@web01 ~]# systemctl status httpd
3.测试访问apache
4.部署mysql(mariadb)
(1)安装、开启数据库
> [root@web01 ~]# yum install mariadb-server mariadb [root@web01 ~]# systemctl start mariadb
(2)检查mariadb的数据文件夹,存在mysql.sock文件,表示启动了,已经属主、属组权限
> [root@web01 ~]# ls -l /var/lib/mysql
>
> 总用量 28700
> -rw-rw---- 1 mysql mysql 16384 2月 26 15:16 aria_log.00000001
> -rw-rw---- 1 mysql mysql 52 2月 26