Ubuntu12.04server上自己編譯PHP5.3,比繁瑣,共享之。
安裝Apache2.2
sudo apt-get install apache2 -y
然后安裝MySQL5.5
sudo apt-get install mysql-server-5.5 -y
接著就是編譯依賴環(huán)境:
sudo apt-get install gcc g++ autoconf build-essential -y
相關(guān)的lib支持庫(kù):
sudo apt-get install libxml2 libxml2-dev libevent-1.4-2 libevent-dev bzip2 libbz2-dev libcurl3-gnutls libcurl4-gnutls-dev libpng12-0 libpng12-dev libjpeg62 libjpeg62-dev libfreetype6 libfreetype6-dev libmcrypt4 libmcrypt-dev zlib1g-dev libtidy-dev libmysqlclient-dev -y
安裝:
./configure --prefix=/usr/local/php --with-mcrypt --with-gettext --with-mysql --with-gd --with-jpeg-dir --with-png-dir --with-curl --with-freetype-dir --enable-gd-native-ttf --enable-mbstring --enable-sockets --with-pdo-mysql --enable-fpm --with-zlib --enable-zip --with-bz2 --enable-bcmath --with-tidy --with-fpm-user=daemon --with-fpm-group=daemon
sudo make
sudo make install
然后安裝cli和dev:
sudo apt-get install php5-cli php5-dev
最后開(kāi)啟Apache2支持:
sudo apt-get install libapache2-mod-php5
最后就大功告成了~