php环境搭建手册参考_第1页
php环境搭建手册参考_第2页
php环境搭建手册参考_第3页
php环境搭建手册参考_第4页
php环境搭建手册参考_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

环境搭建手册〔PHP版〕软件版本:RedHatEnterpriseLinux5Update2Mysql版本:PHP依赖名称及版本:(3)libpng(4)jpegsrc(5)gd(6)libxml2(7)libmcrypt(9)mcrypt〔似乎非必需〕安装步骤把所有依赖包,需要安装的软件放到home/username下先用rpmqa|grep–i包名查找一下mysql,apache是不是已经装上了,例如mysqlqa|grep–imysqlmysqlqa|grep–id,如果mysql装上了,用rpm–emysql删除,如果d也装上了的话…从新装系统把,清理起来太麻烦了。进入放包的目录,开始装吧:32位机器:首先安装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位机器: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位机器:./configure--prefix=/usr/local/jpeg6/--enable-shared--enable-staticmakemakeinstall64位机器: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位函数库编译.安装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位机器:./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位机器:#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默认页面访问路径是cd/usr/local/apache2/htdocs/之后viminfo.php,写个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位机器上安装memcached软件版本:Memcached.安装需要支持的包及版本:Libevent-stable安装步骤:安装libevent#tarzxvflibevent--sta#cdlibevent--stable#./configure–prefix=/usr/local#make#makeinstall查看是否安装成功,进行确认:#ls–al/usr/loca/lib|greplibevent在屏幕上出现如下信息,安装成功: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*出现如下信息:-rwxr-xr-x1rootroot155077Aug709:41/usr/local/bin/memcached-rwxr-xr-x1rootroot162760Aug709:41/usr/local/bin/memcached-debug安装完成后,查看一下memcahce的help#/usr/local/bin/memcached–h出现如下错误:memcached:errorwhileloadingsharedlibraries:libevent-1.4.so.2:cannotopenshared

objectfile:Nosuchfileordirectory注意:下面是修复过程#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/然后我们利用这个来做个符号链接:#下面继续使用/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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论