1. zlib-1.2.8
./configure --prefix=/usr/local/lamp/zlib & make && make install
2. libxml2-2.6.30
./configure --prefix=/usr/local/lamp/libxml2 --with-zlib=/usr/local/lamp/zlib && make && make install
3. libmcrypt-2.5.8
./configure --prefix=/usr/local/lamp/libmcrypt && make && make install
先安装gcc-c++
4. libunwind-1.1
./configure --prefix=/usr/local/lamp/gperftools && make && make install
5. gperftools-2.0
./configure --prefix=/usr/local/lamp/gperftools --enable-frame-pointers && make && make install
6、libpng-1.6.2
ln -sv /usr/local/lamp/zlib/include/* /usr/include/
LDFLAGS="-L/usr/local/lamp/zlib/lib" ./configure --prefix=/usr/local/lamp/libpng && make && make install
7. jpeg-9
./configure --prefix=/usr/local/lamp/jpeg9 && make && make install
8. freetype-2.5.0.1
echo PATH=$PATH:/usr/local/lamp/libpng/bin >>/etc/profile.d/lamp.sh
source /etc/profile
./configure --prefix=/usr/local/lamp/freetype && make && make install
9. gd-2.1.0
LDFLAGS="-L/usr/local/lamp/zlib/lib -L/usr/local/lamp/libpng/lib" ./configure --prefix=/usr/local/lamp/gd2 --with-zlib=/usr/local/lamp/zlib/ --with-png=/usr/local/lamp/libpng/ --with-jpeg=/usr/local/lamp/jpeg9/ --with-freetype=/usr/local/lamp/freetype/ && make && make install
10. pcre-8.33
./configure --prefix=/usr/local/lamp/pcre && make && make install
11. apr-1.4.8
./configure --prefix=/usr/local/lamp/apr && make && make install
12. apr-util-1.5.2
./configure --prefix=/usr/local/lamp/apr-util --with-apr=/usr/local/lamp/apr/ && make && make install
13. httpd-2.4.4
./configure --prefix=/usr/local/lamp/apache2 --with-z=/usr/local/lamp/zlib/ --with-pcre=/usr/local/lamp/pcre/ --with-libxml2=/usr/local/lamp/libxml2/ --with-apr=/usr/local/lamp/apr --with-apr-util=/usr/local/lamp/apr-util/ --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support && make && make install
14. ncurses-5.9
./configure --prefix=/usr/local/lamp/ncurses --with-shared --with-profile --without-debug && make && make install
15. mysql-5.6.12
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/lamp/mysql -DMYSQL_DATADIR=/usr/local/lamp/mysql/data -DMYSQL_UNIX_ADDR=/usr/local/lamp/mysql/data/ -DEFAULT_CHARSET=utf8 -DEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSET=all -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DWITH_ZLIB=bundled -DWITH_TCP_PORT=3306 -DMYSQL_USER=mysql -DCURSES_INCLUDE_PATH=/usr/local/lamp/ncurses/include/ -DCURSES_LIBRARY=/usr/local/lamp/ncurses/lib/libncurses.so && make && make install
16. php-5.5.0
LDFLAGS="-L/usr/local/lamp/libpng/lib -L/usr/local/lamp/zlib/lib -L/usr/local/lamp/freetype/lib" ./configure --prefix=/usr/local/lamp/php --with-config-file-path=/usr/local/lamp/php/etc --with-apxs2=/usr/local/lamp/apache2/bin/apxs --with-mysql=/usr/local/lamp/mysql/ --with-libxml-dir=/usr/local/lamp/libxml2/ --with-png-dir=/usr/local/lamp/libpng/ --with-jpeg-dir=/usr/local/lamp/jpeg9/ --with-freetype-dir=/usr/local/lamp/freetype/ --with-mcrypt=/usr/local/lamp/libmcrypt/ --with-gd --with-mysqli=/usr/local/lamp/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets --enable-zip --enable-opcache && make && make install
17.
1. cd php-5.5.0
2. cp php.ini-development /usr/local/lamp/php/etc/php.ini
3. sed -i ‘/^[[:space:]]*AddType.*tgz$/ a AddType application/x-httpd-php .php .phtml‘ /usr/local/lamp/apache2/conf/httpd.conf
4. sed -i ‘s/index.html$/& index.php/‘ httpd.conf #在行尾添加就吧“&”符号写在前面在行首添加就把“&”符号写在后面
5. cat >/etc/ld.so.conf.d/lamp.conf<<EOF
/usr/local/lamp/apr/lib
/usr/local/lamp/apr-util/lib
/usr/local/lamp/freetype/lib
/usr/local/lamp/gd2/lib
/usr/local/lamp/gperftools/lib
/usr/local/lamp/jpeg9/lib
/usr/local/lamp/libmcrypt/lib
/usr/local/lamp/libxml2/lib
/usr/local/lamp/mysql/lib
/usr/local/lamp/ncurses/lib
/usr/local/lamp/php/lib
/usr/local/lamp/zlib/lib
/usr/local/lamp/pcre/lib
EOF