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() 就能夠正常訪問

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章