Centos7.2系统安装Apache2.4+PHP5.6+Mysql5.6
1 安装和更新各个yum源
安装epel yum源 yum -y stall epel-release
安装remi yum源 rpm -ivh http://rpms.famillecollet./enterprise/remi-release-7.rpm
安装mysql yum源
wget http://dev.mysql./get/mysql-munity-release-el6-5.noarch.rpm
rpm -ivh mysql-munity-release-el6-5.noarch.rpm
清除yum缓存并重新构建缓存
yum clean all&yum makecache
2 安装并配置httpd php mysql php-fpm
yum list命令查看是否有对应的包并安装
yum list | grep httpd
图片1.png
yum stall –y httpd
systemctl start httpd.service
systemctl enable httpd.service
3.查看mysql版本并安装
yum list | grep mysql
图片2.png
yum –y stall mysql-munity-client
mysql-munity-server
systemctl start mysqld
systemctl enable mysqld
4. 查看remi的php版本并安装
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
图片3.png
5. 安装PHP5.6
yum stall --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstrg php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhpr
6. 安装php-fpm
yum stall --enablerepo=remi --enablerepo=remi-php56 php-fpm
systemctl start php-fpm
systemctl enable php-fpm
7. 修改网站与php-fpm结合,推火网以下面网站为例
图片4.png
8. 使用探针测试
图片5.png
测试完成
推火专家景安