Install PHP From Source ---------------------------------------------------------------------------------------------------------------...
Install PHP From Source
---------------------------------------------------------------------------------------------------------------------------------
1'st thing is set lib path
--------------------------------------------------------------------------------------------------------------------------------
2'nd step install dependencies and library
--------------------------------------------------------------------------------------------------------------------------------
download and install libxml
3'rd Install main package PHP
--------------------------------------------------------------------------------------------------------------------------------
4'rd Or you can Install library from Repository with yum
--------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------
1'st thing is set lib path
--------------------------------------------------------------------------------------------------------------------------------
# cat /etc/ld.so.conf--------------------------------------------------------------------------------------------------------------------------------
# echo "/usr/local/lib" >> /etc/ld.so.conf
# echo "/usr/lib" >> /etc/ld.so.conf
# cat /etc/ld.so.conf
# ldconfig
2'nd step install dependencies and library
--------------------------------------------------------------------------------------------------------------------------------
download and install libxml
# cd /usr/local/srcdownload and install Zlib
# wget ftp://xmlsoft.org/libxml2/libxml2-git-snapshot.tar.gz
# tar -zxvf libxml2-git-snapshot.tar.gz
# cd libxml2-*
# ./configure
# make && make install
# wget http://www.gzip.org/zlib/zlib-1.2.3.tar.gzdownload and install Libpng
# tar -zxvf zlib-1.2.3.tar.gz
# cd /usr/local/src/zlib-1.2.3
# make clean
# ./configure --prefix=/usr/local
# make && make install
# wget http://softlayer.dl.sourceforge.net/project/libpng/00-libpng-stable/1.2.40/libpng-1.2.40.tar.gzdownload and install freetype
# tar -zxvf libpng-1.2.40.tar.gz
# cd libpng-*
# ./configure
# make check && make install
# wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.11.tar.gzdownload and install libjpeg
# tar zxvf freetype-2.4.11.tar.gz
# cd freetype-*
# ./configure --prefix=/usr/local
# make check && make install
# wget http://www.ijg.org/files/jpegsrc.v7.tar.gzdownload and install libgd
# tar zxvf jpegsrc.v7.tar.gz
# cd jpeg-*
# ./configure
# make check && make install
# wget https://bitbucket.org/libgd/gd-libgd/downloads/gd-2.1.0-preview.tar.gzdownload and install Curl
# tar -zxvf gd-latest.tar.gz
# cd /usr/local/src/gd-*
# ./configure --with-png=/usr/local --with-jpeg=/usr/local --without-x --with-freetype=/usr/local
# make && make install
# wget http://curl.haxx.se/download/curl-7.19.6.tar.gzdownload and install Mhash
# tar -zxvf curl-7.19.6.tar.gz
# cd curl-7*
# ./configure
# make && make install
# wget http://kent.dl.sourceforge.net/sourceforge/mhash/mhash-0.9.9.9.tar.gzdownload and install Mcrypt
# tar -zxvf mhash-0.9.9.9.tar.gz
# cd mhash-*
# ./configure --prefix=/usr/local
# make && make install
# wget http://softlayer.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz
# tar -zxvf libmcrypt-2.5.8.tar.gz
# cd /usr/local/src/libmcrypt-2.5.8
# ./configure --prefix=/usr/local
# make && make install
# wget http://softlayer.dl.sourceforge.net/sourceforge/mcrypt/mcrypt-2.6.8.tar.gzdownload and install Tidy
# tar -pxzf mcrypt-2.6.8.tar.gz
# cd /usr/local/src/mcrypt-2.6.8
# ./configure --prefix=/usr/local
# make && make install
# wget http://tidy.cvs.sourceforge.net/viewvc/tidy/?view=taror
# tar -zxvf tidy.tar.gz
# cd tidy
# ./configure
# make && make install
yum -y install libtidy-devel tidy--------------------------------------------------------------------------------------------------------------------------------
3'rd Install main package PHP
--------------------------------------------------------------------------------------------------------------------------------
# wget -c http://www.php.net/get/php-5.4.12.tar.gz/from/id1.php.net/mirror--------------------------------------------------------------------------------------------------------------------------------
# tar -zxvf php-5.4.12.tar.gz
# cd php-5.4.12
# ./configure --with-config-file-path=/usr/local/lib --with-libdir=lib64 --prefix=/usr/local --with-layout=PHP --with-pear --with-apxs2 --enable-calendar --enable-bcmath --with-gmp --enable-exif --with-mcrypt --with-mhash --with-zlib --with-bz2 --enable-zip --enable-ftp --enable-mbstring --with-iconv --enable-intl --with-icu-dir=/usr --with-gettext --with-pspell --enable-sockets --with-openssl --with-curl --with-curlwrappers --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-vpx-dir=/usr --with-freetype-dir=/usr --with-t1lib=/usr --with-libxml-dir=/usr --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-soap --with-xmlrpc --with-xsl --with-tidy=/usr --with-readline --enable-pcntl --enable-sysvshm --enable-sysvmsg --enable-shmop
# make && make install
4'rd Or you can Install library from Repository with yum
--------------------------------------------------------------------------------------------------------------------------------
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpmyou can find install apache on this link
# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
# rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
# rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
# yum install libmcrypt-devel
# yum install libxml2-devel httpd-devel libXpm-devel gmp-devel libicu-devel t1lib-devel aspell-devel openssl-devel bzip2-devel libcurl-devel libjpeg-devel libvpx-devel libpng-devel freetype-devel readline-devel libtidy-devel libxslt-devel
COMMENTS