安装apache
yum -y install httpd
安装Php
yum -y install php
安装php-fpm
yum -y install php-fpm
安装Mysql
yum -y install mysql
安装 mysql-server
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum -y install mysql-community-server
安装 php-mysql
yum -y install php-mysql
安装Apache扩展包
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
安装PHP扩展包
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-devel
安装Mysql扩展包
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
配置Apache、mysql开机启动
systemctl start httpd.service #启动apache
systemctl stop httpd.service #停止apache
systemctl restart httpd.service #重启apache
systemctl enable httpd.service #设置apache开机启动
重启对应服务
service mysqld restart
service php-fpm start
service httpd restart
更换高版本的php
删除之前的 php 版本
yum remove php* php-common
rpm 安装 Php7 相应的 yum源
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
直接yum安装php7
yum install php70w
网友评论