前期準備
sudo yum install -y zip unzip screen nmap wget nginx redis
wget -q http://rpms.remirepo.net/enterprise/remi-release-7.rpm
wget -q https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh epel-release-latest-7.noarch.rpm
sudo rpm -Uvh remi-release-7.rpm
sudo yum install -y yum-utils
sudo yum-config-manager –enable remi-php71
移除舊版
sudo yum remove php56u* -y
安裝
sudo yum install -y php php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel php-fpm
權限
sudo setenforce 0
sudo vi /etc/sysconfig/selinux
服務運行
sudo systemctl enable php-fpm
sudo systemctl start php-fpm
sudo systemctl enable nginx
sudo systemctl start nginx