This article will share with you the methods and steps for compiling and installing the PHP5.3 development environment under Ubuntu12. It is very detailed and recommended to you. If you need it, you can refer to it.
This article will share with you the methods and steps for compiling and installing the PHP5.3 development environment under Ubuntu12. It is very detailed and recommended to you. If you need it, you can refer to it.
Recently, the project encountered a problem where a source code must use PHP5.3, but the current Ubuntu version is 5.4. After downgrading, There will be various strange problems and there will be no way at last, you can only compile PHP5.3 on Ubuntu12.04server step by step, which is more complicated and shared.
Install Apache2.2
The Code is as follows:
Sudo apt-get install apache2-y
Then install MySQL5.5
The Code is as follows:
Sudo apt-get install mysql-server-5.5-y
Next, compile the dependent environment:
The Code is as follows:
Sudo apt-get install gcc g ++ autoconf build-essential-y
Related lib support libraries:
The Code is as follows:
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 lib000062 libjpeg62-dev libfreetype6 libfreetype6-dev libmcrypt4 libmcrypt-dev zlib1g-dev libtidy-dev libmysqlclient-dev-y
Installation:
The Code is as follows:
. /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
Then install cli and dev:
The Code is as follows:
Sudo apt-get install php5-cli php5-dev
Finally, enable Apache2 support:
The Code is as follows:
Sudo apt-get install libapache2-mod-php5
The final result is complete ~
The above is all the content of this article. I hope you will like it.
Please take a moment to share your article with your friends or leave a comment. Thank you for your support!