Php环境安装配置-创新互联
#!/bin/bash
yum install -y giflib giflib-devel
yum install -y libxml2 libxml2-devel libxml2-static
yum install -y gcc44 gcc44-c++ gtk+ gtk+-devel pkgconfig libpng zlib libjpeg libtiff
yum -y install gcc gcc-c++ autoconf make patch ntp.x86_64 libjpeg libjpeg-devel libpng libpng-devel gd gd-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel bzip2 bzip2-devel libevent libevent-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel fonts-chinese gettext gettext-devel gmp-devel pspell-devel unzip libcap glibc glibc-devel libmcrypt libmcrypt-devel mhash mhash-devel pcre pcre-devel sysstat vim* libtool-ltdl*
#php for install
cd /root/soft
tar zxvf php-5.4.0.tar.gz
cd php-5.4.0
./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --without-pear --with-gd --with-jpeg-dir --enable-mbstring --with-png-dir --with-zlib --with-freetype-dir --with-mcrypt --with-mhash --with-mysqli --with-mysql=/usr/local/mysql_p --with-openssl --with-xmlrpc --with-xsl --with-gettext --with-fpm-user=nginx --with-fpm-group=nginx --enable-fpm --enable-exif --enable-wddx --enable-zip --enable-bcmath --with-curl --with-iconv-dir=/usr/local/
make ZEND_EXTRA_LIBS='-liconv'
make install
rm -rf /usr/local/php5/etc/*
cp /root/soft/php-fpm.conf /usr/local/php5/etc/
cp /root/soft/php.ini /usr/local/php5/etc/
#memcache for php extended
cd /root/soft
tar zxvf memcache-2.2.5.tgz
cd memcache-2.2.5
/usr/local/php5/bin/phpize
./configure --enable-memcache --with-php-config=/usr/local/php5/bin/php-config
make && make install
cp /usr/local/php5/lib/php/extensions/no-debug-non-zts-20100525/memcache.so /usr/local/php5/include/php/ext/
#redis for php extended
cd /root/soft
tar zxvf nicolasff-phpredis-2.2.2-84-g6d244bb.tar.gz
cd nicolasff-phpredis-6d244bb/
/usr/local/php5/bin/phpize
./configure -with-php-config=/usr/local/php5/bin/php-config
make && make install
cp /usr/local/php5/lib/php/extensions/no-debug-non-zts-20100525/redis.so /usr/local/php5/include/php/ext/
#ftp for php extended
cd /root/soft/php-5.4.0/ext/ftp
/usr/local/php5/bin/phpize
./configure --enable-ftp --with-php-config=/usr/local/php5/bin/php-config
make && make install
cp /usr/local/php5/lib/php/extensions/no-debug-non-zts-20100525/ftp.so /usr/local/php5/include/php/ext/
#mongo for php extended
cd /root/soft
tar zxvf mongo-1.3.0.tgz
cd mongo-1.3.0
/usr/local/php5/bin/phpize
./configure --enable-mongo --with-php-config=/usr/local/php5/bin/php-config
make && make install
cp /usr/local/php5/lib/php/extensions/no-debug-non-zts-20100525/mongo.so /usr/local/php5/include/php/ext/
#tclip for php extended
cd /root/soft
tar jxvf OpenCV-2.4.4a.tar.bz2
cd opencv-2.4.4
/bin/env CC=/usr/bin/gcc44 CXX=/usr/bin/g++44 /usr/local/bin/cmake CMakeLists.txt
/usr/bin/make
/usr/bin/make install
echo "export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> /etc/profile
source /etc/profile
echo "/usr/local/lib/" > /etc/ld.so.conf.d/opencv.conf
ldconfig
cd /root/soft
tar zxvf tclip.tar.gz
cd /root/soft/tclip/trunk/php_ext/
/usr/local/php5/bin/phpize
./configure --with-php-config=/usr/local/php5/bin/php-config
make
cp modules/tclip.so /usr/local/php5/lib/php/extensions/no-debug-non-zts-20100525/
cp modules/tclip.so /usr/local/php5/include/php/ext/
#apc for php extended
cd /root/soft
tar zxvf APC-3.1.13.tgz
cd APC-3.1.13
/usr/local/php5/bin/phpize
./configure --enable-apc --enable-apc-mmap --with-php-config=/usr/local/php5/bin/php-config
make
make install
cp /usr/local/php5/lib/php/extensions/no-debug-non-zts-20100525/apc.so /usr/local/php5/include/php/ext/
/usr/local/php5/sbin/php-fpm
注:Php版本为:5.4.0 软件包请自行下载!
创新互联建站服务项目包括承德网站建设、
承德网站制作、承德网页制作以及承德网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,
承德网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到承德省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网页标题:Php环境安装配置-创新互联
文章路径:
http://dzwzjz.com/article/cegdci.html