Compile and install php5.4 or later in ubuntu

Source: Internet
Author: User
Install the required dependent Database: sudo? Apt-get? -Y? Install? Autoconf ?? Sudo? Apt-get? -Y? Install? Libxml2-dev ?? Sudo? Apt-get? -Y? Install? Bzip2 ?? Sudo? Apt-get? -Y? Install? Libcurl3-openssl-dev ?? Sudo? Apt-get? -Y? Install? Libcurl4-gnutls-dev ?? Sudo? Apt-get? -Y

Install the required dependent Database: sudo? Apt-get? -Y? Install? Autoconf ?? \ Sudo? Apt-get? -Y? Install? Libxml2-dev ?? \ Sudo? Apt-get? -Y? Install? Bzip2 ?? \ Sudo? Apt-get? -Y? Install? Libcurl3-openssl-dev ?? \ Sudo? Apt-get? -Y? Install? Libcurl4-gnutls-dev ?? \ Sudo? Apt-get? -Y

Install the required dependent libraries first:

Sudo? Apt-get? -Y? Install? Autoconf? &&? \

Sudo? Apt-get? -Y? Install? Libxml2-dev? &&? \

Sudo? Apt-get? -Y? Install? Bzip2? &&? \

Sudo? Apt-get? -Y? Install? Libcurl3-openssl-dev? &&? \

Sudo? Apt-get? -Y? Install? Libcurl4-gnutls-dev? &&? \

Sudo? Apt-get? -Y? Install? Libjpeg-dev? &&? \

Sudo? Apt-get? -Y? Install? Libpng-dev? &&? \

Sudo? Apt-get? -Y? Install? Libxpm-dev? &&? \

Sudo? Apt-get? -Y? Install? Libfreetype6-dev? &&? \

Sudo? Apt-get? -Y? Install? Libt1-dev? &&? \

Sudo? Apt-get? -Y? Install? Libmcrypt-dev? &&? \

Sudo? Apt-get? -Y? Install? Libmysql ++-dev? &&? \

Sudo? Apt-get? -Y? Install? Libxslt1-dev? &&? \

Sudo? Apt-get? -Y? Install? Libbz2-dev

Soft link library file:

Cd? /Usr/lib? &&? \

Ln? -S? /Usr/lib/x86_64-linux-gnu/libXpm. so ?.? &&? \

Ln? -S? /Usr/lib/x86_64-linux-gnu/libXpm. ?.? &&? \

Ln? -S? /Usr/lib/x86_64-linux-gnu/libXpm. so.4 ?.? &&? \

Ln? -S? /Usr/lib/x86_64-linux-gnu/libXpm. so.4.11.0 ?.? &&? \

Echo? 'Successful! '

Download the latest php source code, compile and install it:

Cd? /Opt? &&? \

Sudo? Mkdir? Src? &&? \

Cd? Src? &&? \

Sudo? Wget? Http://us1.php.net/distributions/php-5.4.14.tar.gz? &&? \

Sudo? Tar? Zxvf? Php-5.4.14.tar.gz? &&? \

Cd? Php-5.4.14? &&? \

Sudo ?. /Configure? \

-Prefix =/opt/php? \

-With-mysql = mysqlnd? \

-With-mysqli = mysqlnd? \

-With-pdo-mysql = mysqlnd? \

-With-config-file-path =/opt/php/etc? \

-With-zlib? \

-With-curl? \

-With-curlwrappers? \

-With-mcrypt? \

-With-gd? \

-With-openssl? \

-With-mhash? \

-With-xmlrpc? \

-With-jpeg-dir? \

-With-png-dir? \

-With-xpm-dir? \

-With-freetype-dir? \

-With-zlib-dir? \

-Enable-shared? \

-Enable-fpm? \

-Enable-xml? \

-Disable-rpath? \

-Enable-safe-mode? \

-Enable-bcmath? \

-Enable-shmop? \

-Enable-sysvsem? \

-Enable-inline-optimization? \

-Enable-mbregex? \

-Enable-mbstring? \

-Enable-gd-native-ttf? \

-Enable-pcntl? \

-Enable-sockets? \

-Enable-zip? \

-Enable-soap

If there is no problem, execute the last step of compilation and installation:

Sudo? Make? &&? Sudo? Make? Install

Original article address: Compile and install php5.4 or later in ubuntu. Thank you for sharing your thanks.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.