service unavailable

关于服务器linux系统安装php72出现的问题

1. 卸载低版本的php,安装php72并安装配置文件

  1. yum remove php*  # 删除php
  2. yum install epel-release  # 安装epel
  3. yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm  #安装remi
  4. yum install yum-utils  #安装yum-utils
  5. yum-config-manager --enable remi-php72
  6. yum update
  7. yum install php72  # 安装php72
  8. yum install php72-php-fpm php72-php-gd php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache
  9. yum install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml php72w-ldap php72w-mcrypt   #安装扩展

2. 通过浏览器访问服务器

      service unavailable
      The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try              again later.

  1. systemctl start php-fpm.service 开启服务
  2. 修改 /etc/httpd/conf/httpd.conf文件,将 DocumentRoot=“自己的路径” 
  3. 由原来访问phpinfo();该为访问html,结果html能够访问,则php服务没有启动
  4. service php-fpm start,结果显示:Starting php-fpm:Unable to create the PID file (/run/php-fpm/php-fpm.pid)
  5. 在/run文件夹中缺少php-fpm文件夹以及php-fpm/php-fpm.pid 文件
  6. php-fpm.pid文件中添加9000并保存文件
  7. service php-fpm start,执行成功后,phpinfo() 就能够正常访问

 

 

 

 

 

你可能感兴趣的:(linux,php)