Linux构建apache

apache服务器


1,关闭防火墙 selinux:

关闭防火墙 selinux
[root@bogon ~]# systemctl stop firewalld.service
[root@bogon ~]# systemctl disable firewalld.service
[root@bogon ~]# setenforce 0

2,安装httpd,并且编写测试文件:

[root@bogon ~]# yum -y install httpd
[root@bogon ~]# systemctl start httpd
[root@bogon ~]# cd /var/www/html/
[root@bogon html]# vi index.html
[root@bogon html]# vi index.php

3,安装php:

[root@bogon html]# yum -y install php

4,安装mysql:

[root@bogon html]# yum -y install mariadb mariadb-server
[root@bogon modules]# yum -y install php-mysql

附加,部署网站:

将文件源码(upload.zip) 解压 然后全部拷贝到/var/www/html

猜你喜欢

转载自blog.csdn.net/qq_42747099/article/details/82466359
今日推荐