PHP(FastCGi)服務安裝

2021-08-21 11:10:49 字數 2009 閱讀 7159

1、檢視nginx和mysql是否啟動

netstat -lntup|egrep "nginx|mysql"

netstat -lntup|egrep "3306|80"

2、檢視系統版本及位數

cat /etc/redhat-release

uname -m

3、安裝php基礎庫

yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libiconv-devel -y

4、檢查是否成功安裝

rpm -qa zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libiconv-devel

從以上結果看出沒有libiconv-devel這個包,因為預設yum源沒有這個包,需要編譯安裝。

5、安裝yum無法安裝的libiconv庫

mkdir -p /home/ceshi/tools

cd /home/ceshi/tools

wget

tar xzf libiconv-1.14.tar.gz

cd libiconv-1.14

./configure --prefix=/usr/local/libiconv

make && make install

cd ../

6、安裝libmcrypt庫(使用動態載入模組化)

由於在centos預設的yum源裡沒有libmcrypt-devel,因此需要先配置epel第三方yum源,命令如下:

wget -o /etc/yum.repos.d/epel.repo

安裝php相關包libmcrypt對應的libmcrypt-devel

yum -y install libmcrypt-devel

1、安裝mhash(加密擴充套件庫)

yum -y install mhash

2、安裝mcrypt(加密擴充套件庫)

yum -y install mcrypt

3、檢查是否安裝

rpm -qa libmcrypt-devel mhash mcrypt

以上是安裝php依賴包,現在開始安裝php。

wget

2、解壓檔案

tar xf php-5.5.32.tar.gz

3、檢視和nginx的對應的使用者

id www

4、切換到php-5.5.32目錄,預編譯

--with-mysqli=mysqlnd \  #如果沒有安裝mysql,就使用這個模式

--with-pdo-mysql=mysqlnd \  #如果沒有安裝mysql,就使用這個模式

--enable-fpm \  #啟用php-fpm方式服務

--with-fpm-user=www \   #使用者和nginx服務使用者一樣

--with-fpm-group=www \  #組和nginx服務使用者組一樣

執行一下命令

[root@web01 php-5.5.32]# echo $?  #檢視是否有錯誤

5、編譯php

編譯報錯:

解決辦法:

touch ext/phar/phar.phar

make   #編譯

echo $?  #檢視是否有錯誤

make install  #編譯安裝

6、建立軟鏈結

7、初始化php.ini檔案

8、始化php服務(fastcgi)配置檔案

cp php-fpm.conf.default php-fpm.conf

9、啟動php服務並檢查

檢查:lsof -i :9000

ps -ef|grep php-fpm

IIS8 5 PHP FastCGI 安裝配置

準備篇 一 安裝篇 一 安裝iis8.5 二 安裝php 1 安裝visual c redistributable for visual studio 2012 update 4 x86 2.解壓php nts x86 x64 vc11.zip檔案 3.開啟c php 複製php.ini produ...

PHP FastCGI 的遠端利用

說到fastcgi,大家都知道這是目前最常見的webserver動態指令碼執行模型之一。目前基本所有web指令碼都基本支援這種模式,甚至有的型別指令碼這是唯一的模式 ror,python等 fastcgi的主要目的就是,將webserver和動態語言的執行分開為兩個不同的常駐程序,當webserve...

nfs 服務安裝

還是和之前一樣,網上找的nfs安裝過程,照著做,哎,太多東西不知道了。只能照著做。nfs伺服器在嵌入式開發中非常常用,可以實現主機和開發板共享檔案。1 安裝軟體包 sudo apt get install nfs common nfs kernel server portmap 2 配置 sudo ...