LAMP环境和软件版本
名称 | 版本号 | 查询命令 |
---|---|---|
linux系统 | CentOS Linux release 8.0.1905 (Core) | cat /etc/redhat-release |
Apache | httpd-2.4.37-12.module_el8.0.0+185+5908b0db.x86_64 | rpm -qa | grep httpd |
mariadb | mariadb-server-10.3.11-2.module_el8.0.0+35+6f2527ed.x86_64 | rpm -qa | grep mariadb |
php | php-7.2.11-1.module_el8.0.0+56+d1ca79aa.x86_64 | rpm -qa | grep php |
一、安装Apache
1、查看是否安装过Apache。
rpm -qa | grep httpd
2、有就卸载httpd。
yum remove -y "httpd*"
3、重新安装httpd。
yum install -y httpd
4、查看启动状态。
systemctl status httpd
5、启动httpd。
systemctl start httpd
6、添加开机启动。
systemctl enable httpd
7、设置防火墙开放tcp80端口。