$ cd /download $ wget http://mirror.bit.edu.cn/apache/apr/apr-1.6.3.tar.gz $ tar zxvf apr-1.6.3.tar.gz $ cd apr-1.6.3 $ autoreconf --force --install $ libtoolize --automake --force $ ./configure -with-apr=/usr/local/apr $ make && make install
Install Pcre
1 2 3 4 5 6
$ cd /download $ wget http://ftp.exim.llorien.org/pcre/pcre-8.36.tar.gz $ tar zxvf pcre-8.36.tar.gz $ cd pcre-8.36 $ ./configure --prefix=/usr/pcre $ make && make install
# Add Mysql service in system environment $ vim /etc/profile export PATH=$PATH:/usr/local/mysql/bin $ source /etc/profile
$ service mysqld start
# change mysql password $ ./bin/mysqladmin -u root password 'new-password'
Install libmcrypt
1 2 3 4 5 6
$ cd /download $ wget http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz $ tar zxvf libmcrypt-2.5.8.tar.gz $ cd libmcrypt-2.5.8 $ ./configure $ make && make install
configure: error: xml2-config not found. Please check your libxml2 installation.
1
$ sudo apt-get install -y libxml2-dev
configure: error: Please reinstall the libcurl distribution
1
$ sudo apt-get install -y libcurl4-gnutls-dev
configure: error: jpeglib.h not found.
1
$ sudo apt-get install -y libjpeg-dev
configure: error: png.h not found.
1
$ sudo apt-get install -y libpng-dev
configure: error: freetype.h not found.
1
$ sudo apt-get install -y freetype-dev
If you have installed this. Find out the freetype.sh realy path and change the configure file.
1 2 3 4
$ ls /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype.h
$ vim php-5.5.5/configure
1 2 3 4 5 6 7 8 9
if test "$PHP_FREETYPE_DIR" != "no"; then for i in $PHP_FREETYPE_DIR /usr/local /usr; do if test -f "$i/include/freetype2/freetype/freetype.h"; then FREETYPE2_DIR=$i FREETYPE2_INC_DIR=$i/include/freetype2 break fi done
Change if test -f "$i/include/freetype2/freetype/freetype.h"; to if test -f "$i/include/freetype2/freetype.h";