發(fā)布時間:2019-05-29 瀏覽次數(shù):2904
1 安裝和更新各個yum源
安裝epel yum源 yum -y install epel-release
安裝remi yum源 rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
安裝mysql yum源
wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
rpm -ivh mysql-community-release-el6-5.noarch.rpm
清除yum緩存并重新構(gòu)建緩存
yum clean all&yum makecache
2 安裝并配置httpd php mysql php-fpm
yum list命令查看是否有對應(yīng)的包并安裝
yum list | grep httpd
yum install –y httpd
systemctl start httpd.service
systemctl enable httpd.service
3.查看mysql版本并安裝
yum list | grep mysql
yum –y install mysql-community-client
mysql-community-server
systemctl start mysqld
systemctl enable mysqld
4. 查看remi的php版本并安裝
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
5. 安裝PHP5.6
yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhpr
6. 安裝php-fpm
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm
systemctl start php-fpm
systemctl enable php-fpm
7. 修改網(wǎng)站與php-fpm結(jié)合,以下面網(wǎng)站為例
8. 使用探針測試
測試完成