真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

PHP5.5安裝

1.    install Development Environment (安裝開發(fā)環(huán)境)

yum install make gcc gcc-c++ -y

從策劃到設(shè)計制作,每一步都追求做到細膩,制作可持續(xù)發(fā)展的企業(yè)網(wǎng)站。為客戶提供網(wǎng)站設(shè)計、網(wǎng)站制作、網(wǎng)站策劃、網(wǎng)頁設(shè)計、域名注冊、虛擬空間、網(wǎng)絡(luò)營銷、VI設(shè)計、 網(wǎng)站改版、漏洞修補等服務(wù)。為客戶提供更好的一站式互聯(lián)網(wǎng)解決方案,以客戶的口碑塑造優(yōu)易品牌,攜手廣大客戶,共同發(fā)展進步。

 

2.    install library(安裝php依賴庫)

a) install jpegsrc(安裝jpeg庫,使php支持jpg、jpeg等圖片格式)

下載地址:http://ijg.org

 

wget http://ijg.org/files/jpegsrc.v9a.tar.gz

mkdir -p /usr/local/webserver/libs/

tar zxvf jpegsrc.v9a.tar.gz

cd jpeg-9a/

./configure --prefix=/usr/local/webserver/libs --enable-shared --enable-static

make

make install

cd ..

 

b)install libpng(安裝libpng庫,使php支持png等圖片格式)

下載地址:http://libpng.org/pub/png/libpng.html

 

wget http://prdownloads.sourceforge.net/libpng/libpng-1.6.12.tar.gz

tar -zxvf libpng-1.6.12.tar.gz

cd libpng-1.6.12

./configure --prefix=/usr/local/webserver/libs

make

make install

cd ..

 

c)install freetype(安裝freetype庫,使php支持單色位圖、反走樣位圖的渲染)

下載地址:http://freetype.org/download.html

 

wget http://ncu.dl.sourceforge.net/project/freetype/freetype2/2.5.3/freetype-2.5.3.tar.bz2

tar -zxvf freetype-2.5.3.tar.bz2

cd freetype-2.5.3

./configure --prefix=/usr/local/webserver/libs

make

make install

cd ..

 

d)install libmcrypt(安裝mcrypt庫,使php實現(xiàn)加密解密功能)

下載地址:http://sourceforge.net/projects/mcrypt/

 

wget http://softlayer.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz

tar -zxvf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8

./configure --prefix=/usr/local/webserver/libs

make

make install

 

cd libltdl/

./configure --prefix=/usr/local/webserver/libs--enable-ltdl-install

make

make install

cd ../..

 

e)install mhash(安裝mmhash庫,為PHP提供了多種哈希算法)

wget  http://downloads.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.bz2

tar xvf mhash-0.9.9.9.tar.bz2

cd mhash-0.9.9.9/

./configure --prefix=/usr/local/webserver/libs

make

make install

cd ..

 

echo /usr/local/webserver/libs/lib >>/etc/ld.so.conf

ldconfig

 

f) install mcrypt(安裝mcrypt庫,使php實現(xiàn)加密解密功能)

下載地址:http://sourceforge.net/projects/mcrypt/

 

wgethttp://downloads.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz

tar -zxvf mcrypt-2.6.8.tar.gz

cd mcrypt-2.6.8/

export LDFLAGS="-L/usr/local/webserver/libs/lib-L/usr/lib"

export CFLAGS="-I/usr/local/webserver/libs/include-I/usr/include"

touch malloc.h

./configure --prefix=/usr/local/webserver/libs--with-libmcrypt-prefix=/usr/local/webserver/libs

make

make install

cd ..

 

g) install libxml2、libcurl、gd and openssl

(使php支持curl重寫、支持xml語言、支持gd圖形處理庫和支持openssl加密)

yum install libxml2-devel -y

yum install libcurl-devel -y

yum install -y gd gd-devel

yum install openssl openssl-devel -y

 

3.install php(安裝php程序)

a)定義系統(tǒng)變量指定相關(guān)庫的位置

export LIBS="-lm -ltermcap -lresolv"

exportDYLD_LIBRARY_PATH="/usr/local/webserver/MySQL/lib/:/lib/:/usr/lib/:/usr/local/lib:/lib64/:/usr/lib64/:/usr/local/lib64"

exportLD_LIBRARY_PATH="/usr/local/webserver/mysql/lib/:/lib/:/usr/lib/:/usr/local/lib:/lib64/:/usr/lib64/:/usr/local/lib64"

export LIBS=

export CFLAGS=

 

下載地址:http://php.net/downloads.php

 

wget http://cn2.php.net/get/php-5.5.16.tar.gz

tar -zxvf php-5.5.16.tar.gz

cd php-5.5.16

 

b)編譯安裝PHP

./configure --prefix=/usr/local/webserver/php--with-config-file-path=/usr/local/webserver/php/etc --with-iconv-dir--with-freetype-dir=/usr/local/webserver/libs--with-jpeg-dir=/usr/local/webserver/libs--with-png-dir=/usr/local/webserver/libs --with-zlib --with-libxml-dir=/usr--enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem--enable-inline-optimization --with-curl --enable-mbregex --enable-fpm--enable-mbstring --with-mcrypt=/usr/local/webserver/libs --with-gd--enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets--with-xmlrpc --enable-zip --enable-soap --enable-opcache --with-pdo-mysql

 

    --prefix=/usr/local/webserver/php

    php安裝位置

--with-config-file-path=/usr/local/webserver/php/etc

php配置文件位置

--with-iconv-dir

啟用字符轉(zhuǎn)換

--with-freetype-dir=/usr/local/webserver/libs

使支持freetype

--with-jpeg-dir=/usr/local/webserver/libs

使支持jpeg等圖片格式

--with-png-dir=/usr/local/webserver/libs

使支持png等圖片格式

--with-zlib

--enable-zip

支持zlib\zip壓縮

--with-libxml-dir=/usr

--enable-xml

--with-xmlrpc

使支持xml語言

--disable-rpath

--enable-bcmath

使支持整型

--enable-shmop

允許PHP讀,寫,創(chuàng)建和刪除UNIX共享內(nèi)存段

--enable-sysvsem

--enable-inline-optimization

使用inline優(yōu)化

--with-curl

使支持curl重寫功能

--enable-mbregex

--enable-mbstring

支持mbregex、mbstring字符編碼

--enable-fpm

支持PHPFastCGI管理器

--with-mcrypt=/usr/local/webserver/libs

--with-gd

--enable-gd-native-ttf

支持mcrypt、GD庫

--with-openssl

支持openssl加密

--with-mhash

支持hash算法

--enable-pcntl

--enable-sockets

支持套接字

--enable-soap

支持簡單對象訪問協(xié)議

--enable-opcache

 

make

make install

 

cp php.ini-development /usr/local/webserver/php/etc/php.ini

ln -s/usr/local/webserver/mysql/lib/libmysqlclient.18.dylib/usr/lib/libmysqlclient.18.dylib

mv /usr/local/webserver/php/etc/php-fpm.conf.default/usr/local/webserver/php/etc/php-fpm.conf

 

4.    安裝php其它擴展

a)install autoconf(Autoconf是一個用于生成可以自動地配置軟件源代碼包以適應(yīng)多種Unix類系統(tǒng)的 shell腳本的工具)

tar -zxvf autoconf-latest.tar.gz -C ../tmp

cd ../tmp/autoconf-2.69/

./configure --prefix=/usr/local/webserver/libs

make

make install

cd ../../soft

 

b)install memcache(使支持memcache)

tar -zxvf memcache-2.2.7.tgz -C ../tmp

cd ../tmp/memcache-2.2.7/

exportPHP_AUTOCONF="/usr/local/webserver/libs/bin/autoconf"

exportPHP_AUTOHEADER="/usr/local/webserver/libs/bin/autoheader"

/usr/local/webserver/php/bin/phpize

./configure --with-php-config=/usr/local/webserver/php/bin/php-config

make

make install

cd ../../soft

 

5.    start whith onboot(設(shè)置開機啟動PHP)

$ cp/sapi/fpm/init.d.php-fpm.in /etc/init.d/php-fpm

$ chmod 755 /etc/init.d/php-fpm

 

vim /etc/init.d/php-fpm

設(shè)置以下內(nèi)容:

php_fpm_BIN=/usr/local/webserver/php/sbin/php-fpm

php_fpm_CONF=/usr/local/webserver/php/etc/php-fpm.conf

php_fpm_PID=/var/run/php-fpm.pid

 

cp /usr/local/webserver/libs/etc/php-fpm.conf.default /usr/local/webserver/libs/etc/php-fpm.conf

 

cp php.ini-production /usr/local/webserver/php/lib/php.ini

 

可以通過以下控制:

$ /etc/init.d/php-fpm start

$ /etc/init.d/php-fpm stop

$ /etc/init.d/php-fpm reload

 

開機啟動

$ chkconfig php-fpm on

 

使用killall php-fpm也可以殺死所有進程

 

6.Nginx啟動php驗證

nginx.conf的server中加入如下配置,并重啟:

location ~ \.php$ {

           root /opt/www/bi;                                                                                                                                                        

           fastcgi_pass  127.0.0.1:9000;                                                                                                                                              

           fastcgi_index  index.php;                                                                                                                                                   

           fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;                                                                                                        

           include       fastcgi_params;                                                                                                                                              

        }

 

在指定的root目錄下,寫入一個

    echo phpinfo();

?>

文件進行測試。

 


當(dāng)前名稱:PHP5.5安裝
轉(zhuǎn)載來源:http://weahome.cn/article/pegjji.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部