刚刚手头有台机器刚装了 ubuntu, 编译了一下 LAMP 系统, PHP 5.3.0 改动比较大。 第一眼看到的 php.ini 文件里已经变动了。 感觉比一以前版本的舒服点了。 有了开发环境和生产环境的配置区分了。 详细的以后慢慢了解了。 貌似增强了很多功能。 从 phpinfo() 里看出来的。 放出一张刚测试出的phpinfo()截图, 后面张贴一下本次编译的命令记录。
看看编译的一堆命令。 有需要的朋友可以拿去参考一下。
sudo apt-get install build-essential gcc make autoconf automake1.9 libtoolsudo apt-get install zlib1g-dev libdb-devtar -jxf apr-1.3.5.tar.bz2 -C ../builds/tar -jxf apr-util-1.3.7.tar.bz2 -C ../builds/tar -zxf httpd-2.2.11.tar.gz -C ../builds/cd ../builds/cd apr-1.3.5/./configure makesudo make installcd ../apr-util-1.3.7/./configure --with-apr=/usr/local/apr --with-berkeley-db=/usrmakesudo make installcd ../httpd-2.2.11/./configure --prefix=/usr/local/apache2 --enable-rewrite=shared --enable-dav=shared --enable-so --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-configmakesudo make installsudo apt-get install libxml2 libxml2-devtar -zxf neon-0.28.4.tar.gz -C ../builds/tar -zxf zlib-1.2.3.tar.gz -C ../builds/tar -zxf expat-2.0.1.tar.gz -C ../builds/tar -zxf subversion-1.6.2.tar.gz -C ../builds/mkdir ../builds/subversion-1.6.2/sqlite-amalgamationtar -zxf sqlite-amalgamation-3.6.13.tar.gzcp sqlite-3.6.13/sqlite3.c ../builds/subversion-1.6.2/sqlite-amalgamation/rm -rf sqlite-3.6.13cd ../builds/neon-0.28.4/./configuremakesudo make installcd ../zlib-1.2.3/./configure --prefix=/usr/local/zlibmakesudo make installcd ../expat-2.0.1/./configuremakesudo make installcd ../subversion-1.6.2/./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --with-neon=/usr/local --with-zlib=/usr/local/zlib --with-sslmakesudo make installtar -zxf mysql-5.0.83-linux-i686-icc-glibc23.tar.gzsudo mv mysql-5.0.83-linux-i686-icc-glibc23 /usr/local/mysqlcd /usr/local/mysql/sudo groupadd mysqlsudo useradd -g mysql mysqlsudo scripts/mysql_install_db --user=mysqlsudo chown -R mysql .sudo chgrp -R mysql .sudo chown -R root .sudo chown -R mysql datacd support-files/sudo cp my-medium.cnf /etc/my.cnfsudo gedit /etc/my.cnfsudo ./mysql.server startcd ../bin./mysqladmin -u root password 'mypassword'./mysql -u root -pcd ../support-files/sudo ./mysql.server stopsudo apt-get install flex libpng12-0 libpng12-dev libltdl3-devsudo ln -sf libpng12.so.0 libpng.sotar -zxf curl-7.19.5.tar.gz -C ../builds/tar -zxf jpegsrc.v6b.tar.gz -C ../builds/tar -zxf freetype-2.3.9.tar.gz -C ../builds/tar -zxf libmcrypt-2.5.8.tar.gz -C ../builds/tar -zxf mhash-0.9.9.9.tar.gz -C ../builds/tar -zxf php-5.3.0.tar.gz -C ../builds/cd ../builds/curl-7.19.5/sudo mkdir /usr/local/curl./configure --prefix=/usr/local/curl --with-sslmakesudo make installcd ../jpeg-6b/sudo mkdir /usr/local/jpegsudo mkdir /usr/local/jpeg/binsudo mkdir /usr/local/jpeg/libsudo mkdir /usr/local/jpeg/includesudo mkdir /usr/local/jpeg/mansudo mkdir /usr/local/jpeg/man/man1./configure --prefix=/usr/local/jpeg --enable-shared --enable-staticmakesudo make installcd ../freetype-2.3.9/./configure --prefix=/usr/local/freetype2makesudo make installcd ../libmcrypt-2.5.8/./configure --prefix=/usr/local/libmcryptmakesudo make installcd ../mhash-0.9.9.9/./configure --prefix=/usr/local/libmhashmakesudo make installcd ../php-5.3.0/./configure --prefix=/usr/local/php \--with-apxs2=/usr/local/apache2/bin/apxs \--with-config-file-path=/usr/local/php \--with-openssl \--with-zlib \--with-zlib-dir=/usr/local/zlib \--enable-bcmath \--enable-calendar \--with-curl=/usr/local/curl \--with-curlwrappers \--enable-ftp \--with-gd \--with-jpeg-dir=/usr/local/jpeg \--with-png-dir=/usr \--with-freetype-dir=/usr/local/freetype2 \--enable-gd-native-ttf \--with-gettext \--with-mcrypt=/usr/local/libmcrypt \--with-mhash=/usr/local/libmhash \--enable-mbstring \--enable-exif \--with-mysql=/usr/local/mysql \--with-pdo-mysql=/usr/local/mysql \--with-mysqli=/usr/local/mysql/bin/mysql_config \--with-xmlrpc \--enable-soap \--enable-sockets \--enable-zipsudo cp php.ini-development /usr/local/php/php.inisudo gedit /usr/local/apache2/conf/httpd.conf