tar -zxvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz -C unzip/ && tar -zxvf curl-7.19.5.tar.gz -C unzip/ && tar -zxvf freetype-2.3.9.tar.gz -C unzip/ && tar -zxvf gd-2.0.35.tar.gz -C unzip/ && tar -zxvf httpd-2.2.13.tar.gz -C unzip/ && tar -zxvf jpegsrc.v7.tar.gz -C unzip/ && tar -zxvf libmcrypt-2.5.8.tar.gz -C unzip/ && tar -zxvf libpng-1.2.40.tar.gz -C unzip/ && tar -zxvf libxml2-2.6.30.tar.gz -C unzip/ && tar -zxvf libxslt-1.1.22.tar.gz -C unzip/ && tar -zxvf mcrypt-2.6.8.tar.gz -C unzip/ && tar -zxvf mhash-0.9.9.9.tar.gz -C unzip/ && tar -zxvf mysql-5.1.30.tar.gz -C unzip/ && tar -zxvf php-5.3.0.tar.gz -C unzip/ && tar -zxvf phpMyAdmin-3.1.2-all-languages.tar.gz -C unzip/ && tar -zxvf zlib-1.2.3.tar.gz -C unzip/
將所有軟件解壓到unzip/目錄下。
進入unzip/目錄,開始安裝: 1.安裝jpeg cd jpeg-7/ && ./configure --prefix=/usr/local/jpeg7 --enable-shared --enable-static && make && make install && cd ..
2.安裝libpng cd libpng-1.2.40/ && ./configure --prefix=/usr/local/libpng && make && make install && cd ..
3.安裝freetype cd freetype-2.3.9/ && ./configure --prefix=/usr/local/freetype && make && make install && cd ..
4.安裝zlib cd zlib-1.2.3/ && ./configure --prefix=/usr/local/zlib && make && make install && cd ..
5.安裝gd 5.1 安裝gd必須先檢查一下 gd-2.0.35/gd_png.c 文件,對png.h的引用路徑是否正確。 用vi打開此文件 : vi gd-2.0.35/gd_png.c 在第16行: ======== #include "png.h" ======== 把它改為你的libpng安裝路徑下的png.h。若libpng按上面第2步安裝的,那么應該改為: ======== #include "/usr/local/libpng/include/png.h" ======== 這樣在編譯過程中就不會出現以下錯誤: =========== aclocal:configure.ac:64: warning: macro `AM_ICONV' not found in library ... =========== 5.2 修改完保存退出后,繼續安裝gd: cd gd-2.0.35/ && ./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg7 --with-zlib-dir=/usr/local/zlib --with-png=/usr/local/libpng --with-freetype=/usr/local/freetype && make && make install && cd ..
6.安裝libxml2 cd libxml2-2.6.30/ && ./configure --prefix=/usr/local/libxml2 && make && make install && cd ..
7.安裝libxslt cd libxslt-1.1.22/ && ./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2 && make && make install && cd ..
8.安裝apache 8.1 安裝: cd httpd-2.2.13/ && ./configure --prefix=/usr/local/apache --enable-modules=so --enable-rewrite && make && make install && cd ..
8.2 檢測。安裝完后運行:/usr/local/apache/bin/apachectl -k start 啟動apache,再打開瀏覽器進入http://localhost,若顯示"It works!",則表示apache已經安裝好了。 (若執行啟動命令時,打印錯誤“httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName”, 暫時可以不管,這是由于未配置好ServerName,后面有apache的配置說明)
9.安裝mysql 9.1 安裝: cd mysql-5.1.30/ && ./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=all && make && make install
12. 安裝ZendOptimizer(zend加速引擎) 12.1 安裝: cd ZendOptimizer-3.3.3-linux-glibc23-i386/ && ./install && cd .. 然后像在windows下安裝軟件一樣,一路OK或yes下去,直到“Enter the location of your php.ini file”,輸入你的php.ini文件所在的目錄,即/usr/local/php5/, 再接著OK/yes,直到安裝完成。