Home > Backend Development > PHP Tutorial > Compile and install PHP5.3 development environment under Ubuntu12_PHP tutorial

Compile and install PHP5.3 development environment under Ubuntu12_PHP tutorial

WBOY
Release: 2016-07-13 09:59:58
Original
925 people have browsed it

Compiling and installing the PHP5.3 development environment under Ubuntu12

This article shares with you the methods and steps for compiling and installing the PHP5.3 development environment under Ubuntu12. It is very detailed and recommended. For everyone, friends who need it can refer to it.

Recently, the project encountered a cheating thing. A source code must use PHP5.3, but now the version that comes with Ubuntu is 5.4. After downgrading, various strange problems will occur. In the end, there is no way but to step by step. Compiling PHP5.3 on Ubuntu12.04server by yourself is more complicated than sharing it.

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

Then comes the compilation dependency environment:

The code is as follows:


sudo apt-get install gcc g autoconf build-essential -y

Related lib support library:

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 libjpeg62 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

Finally it’s done~

The above is the entire content of this article, I hope you all like it.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/975122.htmlTechArticleCompiling and installing PHP5.3 development environment under Ubuntu12. This article will share with you how to compile and install PHP5.3 development under Ubuntu12. The environmental methods and steps are very detailed. I recommend them to everyone if you need them...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template