Installing PHP 5.3.29 from Sources on Ubuntu 14 with Apache 2 Module

后端 未结 4 940
醉话见心
醉话见心 2020-12-30 05:14

I successfully installed PHP 5.3.29 on Ubuntu 14 with Apache 2 separately.

I installed PHP with the following method:

sudo -i
wget http://in1.php.net         


        
4条回答
  •  独厮守ぢ
    2020-12-30 06:21

    This works for me on a scratch Ubuntu 14.04:

    Manual installation

    Update the systems packages

    1. apt-get update

    2. apt-get upgrade -y

    Install the dependencies and prepare environment

    1. apt-get install -y build-essential libxml2-dev apache2 apache2-dev

    2. echo "export PATH=/usr/local/bin:/usr/local/sbin:$PATH" >> ~/.bashrc

    3. apt-get install -y libapache2-mod-php5 --no-install-recommends

    Download PHP 5.3.29

    1. apt-get install -y wget && cd /tmp && wget http://php.net/distributions/php-5.3.29.tar.bz2

    Unzip and configure apache's module apxs2

    1. tar -xvf php-5.3.29.tar.bz2 && cd php-5.3.29 && ./configure --with-apxs2=/usr/bin/apxs2

    Install it

    1. make && make install

    Check if works

    1. service apache2 restart && php -v

提交回复
热议问题