php 5.6
1.配置php的yum源
# yum install epel-release -y
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
2.安装php5.6
# yum install --enablerepo=remi,remi-php56 php php-fpm php-common php-mysql php-opcache php-pear php-gd php-devel php-mbstring php-mcrypt php-mysqlnd php-cli php-phpunit-PHPUnit php-pdo php-xml -y
3.开启php-fpm服务
# systemctl start php-fpm.service
# systemctl enable php-fpm.service
4.查看php版本
# php --version
5.配置php的时区
# cp /etc/php.ini /opt/php.ini.back
# 编辑配置文件
# vim /etc/php.ini
修改时区
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Shanghai
重启服务
# systemctl restart php-fpm
# systemctl restart nginx.service