php環(huán)境搭建手冊參考_第1頁
php環(huán)境搭建手冊參考_第2頁
php環(huán)境搭建手冊參考_第3頁
php環(huán)境搭建手冊參考_第4頁
php環(huán)境搭建手冊參考_第5頁
已閱讀5頁,還剩2頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

環(huán)境搭建手冊〔PHP版〕軟件版本:RedHatEnterpriseLinux5Update2Mysql版本:PHP依賴名稱及版本:(3)libpng(4)jpegsrc(5)gd(6)libxml2(7)libmcrypt(9)mcrypt〔似乎非必需〕安裝步驟把所有依賴包,需要安裝的軟件放到home/username下先用rpmqa|grep–i包名查找一下mysql,apache是不是已經(jīng)裝上了,例如mysqlqa|grep–imysqlmysqlqa|grep–id,如果mysql裝上了,用rpm–emysql刪除,如果d也裝上了的話…從新裝系統(tǒng)把,清理起來太麻煩了。進(jìn)入放包的目錄,開始裝吧:32位機(jī)器:首先安裝6.rpm,MySQL-server-community--0.rhel5.依賴此包。

rpm-ivhperl-DBI-1.52-1.fc6.i386.rpm安裝Mysqlrpm-ivhMySQL-server-community--0.rhel5.i386.rpmrpm-ivhMySQL-client-community--0.rhel5.i386.rpmrpm-ivhMySQL-devel-community-664位機(jī)器:1rpm–ivh2rpm–ivhMySQL-server-community-rpm–ivhMySQL-client-community-rpm–ivhMySQL-devel-community-3.安裝Apache tarjxvfd-cdd-./configure--prefix=/usr/local/apache2--enable-somakemakeinstall4.安裝libiconvcdlibiconv./configure--prefix=/usr/local/libiconvmakemakeinstall安裝freetypetar-zxvffreetype-cdfreetype-./configure--prefix=/usr/local/freetype2makemakeinstall安裝libpngcdlibpng-./configure--prefix=/usr/local/libpngmakemakeinstall安裝jpegsrcmkdir/usr/local/jpeg6mkdir/usr/local/jpeg6/binmkdir/usr/local/jpeg6/libmkdir/usr/local/jpeg6/includemkdir/usr/local/jpeg6/manmkdir/usr/local/jpeg6/man/man1cdjpeg-6b/32位機(jī)器:./configure--prefix=/usr/local/jpeg6/--enable-shared--enable-staticmakemakeinstall64位機(jī)器:cp/usr/share/libtool/config.guessccp/usr/share/libtool/config.sub

./configure--prefix=/usr/local/jpeg6/--enable-shared--enable-static

makelibdir=/usr/lib64

makelibdir=/usr/lib64install使用64位函數(shù)庫編譯.安裝gdtarvxfgd-cdgd-./configure--prefix=/usr/local/gd--with-png-dir=/usr/local/lib--with-freetype-dir=/usr/local/freetype2--with-jpeg-dir=/usr/local/jpeg6make&&makeinstall 或者:makemakeinstall安裝libxml2tarzxvflibxml2-2.6.cdlibxml2-2.6../configure--prefix=/usr/local/libxml2makemakeinstall〔過程比擬緩慢,耐心等待〕分支1安裝〔libmcrypt〕tarvxflibmcrypt- cdlibmcrypt-./configure--prefix=/usr/local/libmcryptmakemakeinstall安裝mhashtarxvfmhash-.tar.bz2

cdmhash-0.9.9/

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

make

makeinstall

ln-s/usr/local/mhash/lib安裝PHPtarxvfphp-cdphp-32位機(jī)器:./configure--prefix=/usr/local/php5--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql--with-gd--with-jpeg-dir=/usr/local/jpeg6--with-zlib--with-png-dir=/usr/local/lib--with-freetype-dir=/usr/local/freetype2--with-iconv--with-gmp--with-curl--with-mcrypt-dir=/usr/local/libmcrypt--with-pdo-mysql--with-json--with-gettext--with-libxml-dir=/usr/local/libxml2--enable-sockets--enable-ftp--enable-soap--enable-zip--enable-mbstring--with-mhash-dir=/usr/local/mhash64位機(jī)器:#mkdir/usr/local/lib/mysql#cd/usr/local/lib/mysql#ln–s/usr/include/mysqlinclude#ln–s/usr/lib64/mysqllib./configure--with-libdir=lib64--prefix=/usr/local/php5--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql--with-gd--with-jpeg-dir=/usr/local/jpeg6--with-zlib--with-png-dir=/usr/local/lib--with-freetype-dir=/usr/local/freetype2--with-iconv--with-gmp--with-curl--with-mcrypt-dir=/usr/local/libmcrypt--with-pdo-mysql-dir=/usr/local/lib/mysql--with-json--with-gettext--with-libxml-dir=/usr/local/libxml2--enable-sockets--enable-ftp--enable-soap--enable-zip--enable-mbstring--with-mhash-dir=/usr/local/mhash--with-config-file-path=/usr/local/php5/etcmakemakeinstall修改配置文件找到DirectoryIndexindex.html

改為DirectoryIndexindex.htmlindex.html.varindex.htmindex.php

找到AddTypeapplication/x-gzip.gz.tgz

加AddTypeapplication/x-d-php.php(注意空格)

AddTypeapplication/x-d-php-source.phps重啟apache/usr/local/apache2/bin/apachectlrestart測試效果如果沒有修改路徑的話,apache默認(rèn)頁面訪問路徑是cd/usr/local/apache2/htdocs/之后viminfo.php,寫個(gè)phpinfo看看效果吧。//**********************注釋掉*******************************//分支2〔這種做法可能存在問題〕安裝〔libmcrypt〕tarvxflibmcrypt-./configure--prefix=/usr/local/libmcryptmakemakeinstall/sbin/ldconfig

cdlibltdl/

./configure--enable-ltdl-install

make

makeinstall安裝mhashtarzxvfmhash-.tar.gz

cdmhash-0.9.9/

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

make

makeinstall安裝mcrypttarzxvfmcrypt-2.6.7.tar.gz

cdmcrypt-2.6.7///**************************注釋掉******************************//在64位機(jī)器上安裝memcached軟件版本:Memcached.安裝需要支持的包及版本:Libevent-stable安裝步驟:安裝libevent#tarzxvflibevent--sta#cdlibevent--stable#./configure–prefix=/usr/local#make#makeinstall查看是否安裝成功,進(jìn)行確認(rèn):#ls–al/usr/loca/lib|greplibevent在屏幕上出現(xiàn)如下信息,安裝成功:lrwxrwxrwx1rootroot21Aug709:35libevent-1.4.so.2->libevent-1.4.so.-rwxr-xr-x1rootroot384481Aug709:35libevent-1.4.so.lrwxrwxrwx1rootroot26Aug709:35libevent_core-1.4.so.2->libevent_core-1.4.so.-rwxr-xr-x1rootroot135308Aug709:35libevent_core-1.4.so.lrwxrwxrwx1rootroot26Aug709:35libevent_core.so->libevent_core-1.4.so.lrwxrwxrwx1rootroot27Aug709:35libevent_extra-1.4.so.2->libevent_extra-1.4.so.-rwxr-xr-x1rootroot306301Aug709:35libevent_extra-1.4.so.lrwxrwxrwx1rootroot27Aug709:35libevent_extra.so->libevent_extra-1.4.so.lrwxrwxrwx1rootroot21Aug709:35libevent.so->libevent-1.4.so.安裝memcached#tarzxvfmemcached-#cdmemcached-#./configure–with-libevent=/usr/local#make#makeinstall查看是否安裝成功#ls–al/usr/local/bin/mem*出現(xiàn)如下信息:-rwxr-xr-x1rootroot155077Aug709:41/usr/local/bin/memcached-rwxr-xr-x1rootroot162760Aug709:41/usr/local/bin/memcached-debug安裝完成后,查看一下memcahce的help#/usr/local/bin/memcached–h出現(xiàn)如下錯誤:memcached:errorwhileloadingsharedlibraries:libevent-1.4.so.2:cannotopenshared

objectfile:Nosuchfileordirectory注意:下面是修復(fù)過程#LD_DEBUG=libmemcached–v查看memcached的libs的路徑屏幕顯示如下信息:7627:

findlibrary=libevent-1.4.so.2[0];searching

7627:

searchcache=/etc/ld.so.cache

7627:

search

path=/lib64/tls/x86_64:/lib64/tls:/lib64/x86_64:/lib64:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64:

/usr/lib64

(systemsearchpath)

7627:

tryingfile=/lib64/tls/x86_64/libevent-1.4.so.2

7627:

tryingfile=/lib64/tls/libevent-1.4.so.2

7627:

tryingfile=/lib64/x86_64/libevent-1.4.so.2

7627:

tryingfile=/lib64/libevent-1.4.so.2

7627:

tryingfile=/usr/lib64/tls/x86_64/libevent-1.4.so.2

7627:

tryingfile=/usr/lib64/tls/libevent-1.4.so.2

7627:

tryingfile=/usr/lib64/x86_64/libevent-1.4.so.2

7627:

tryingfile=/usr/lib64/libevent-1.4.so.2

7627:

memcached:errorwhileloadingsharedlibraries:libevent-1.4.so.2:cannotopensharedobjectfile:Nosuch

fileordirectory我們要做的就是記錄下最后一行信息,tryingfile=/usr/lib64/然后我們利用這個(gè)來做個(gè)符號鏈接:#下面繼續(xù)使用/usr/local/bin/memcached–h做測試,成功顯示:memcached-p<num>TCPportnumbertolistenon(default:11211)-U<num>UDPportnumbertolistenon(default:0,off)-s<file>unixsocketpathtolistenon(disablesnetworksupport)-a<mask>accessmaskforunixsocket,inoctal(default0700)-l<ip_addr>interfacetolistenon,defaultisINDRR_ANY-drunasadaemon-rmaximizecorefilelimit-u<username>assumeidentityof<username>(onlywhenrunasroot)-m<num>maxmemorytouseforitemsinmegabytes,defaultis64MB-Mreturnerroronmemoryexhausted(ratherthanremovingitems)-c<num>maxsimultaneousconnections,defaultis1024-klockdownallpagedmemory.Notethatthereisa

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論