搭建php服务器网站

一.Apache安装

yum install httpd
启动
systemctl start httpd.service #启动
systemctl stop httpd.service #停止
systemctl restart httpd.service #重启
第二、设置开机启动/关闭
systemctl enable httpd.service #开机启动
systemctl disable httpd.service #开机不启动
第三、检查httpd状态
systemctl status httpd.service

二.关闭防火墙

关闭:systemctl stop firewalld.service
查看状态:systemctl status firewalld.service

三.PHP7.0安装:

1. 更新yum安装包
CentOS 7.x
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
CentOS 6.x
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
CentOS 5.x
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm


2. 通过云进行php和其他组件的安装
yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
yum install php70w-fpm

3.php各项服务安装:

yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel php-mysql

四.安装MariaDB

yum -y install mariadb mariadb-server

猜你喜欢

转载自www.cnblogs.com/izch/p/10123002.html
今日推荐