Current Location: Home> Latest Articles> Complete Guide to Installing PHP5.5 on Linux Systems

Complete Guide to Installing PHP5.5 on Linux Systems

gitbox 2025-06-25

In today's development environments, **PHP** is a widely-used server-side scripting language and an essential tool for building dynamic websites and applications. Although newer versions of PHP are frequently released, **PHP5.5** still holds an important place in some projects. This article provides a comprehensive **PHP5.5 installation guide on Linux**, helping you quickly set up a development environment.

Preparing the Environment

Before you start the installation, make sure your Linux system is updated to the latest version. You can update the system using the following commands:

        sudo apt-get update
        sudo apt-get upgrade
    

Additionally, you need to install some required development tools and dependencies. Use the following command to install these tools:

        sudo apt-get install build-essential libxml2-dev
    

Download PHP5.5 Source Code

Next, you need to download the **PHP5.5** source code package from the official website. You can use the following command to download it:

        wget http://museum.php.net/php5/php-5.5.38.tar.gz
    

After the download is complete, extract the downloaded file:

        tar -xzvf php-5.5.38.tar.gz
    

Compiling PHP5.5

Enter the extracted directory and start compiling PHP5.5 with the following commands:

        cd php-5.5.38/
        ./configure --enable-mbstring --with-mysql --with-zlib --enable-soap
        make
        sudo make install
    

Configuring PHP5.5

After installation, you need to configure the PHP settings. The **php.ini** file is usually located in the PHP folder within the installation directory. You can copy the php.ini file with the following command:

        cp php.ini-development /usr/local/lib/php.ini
    

Use a text editor to open and edit the **php.ini** file, and adjust the settings as needed:

        nano /usr/local/lib/php.ini
    

Starting PHP Built-in Server

To test if your installation was successful, you can start the PHP built-in server. Use the following command:

        php -S localhost:8000
    

Open your browser and go to http://localhost:8000. You should see the PHP info page, indicating that **PHP5.5** has been successfully installed and is running.

Conclusion

By following these steps, you have successfully installed **PHP5.5** on your Linux system. While this version has been around for a while, it is still an important choice for some legacy projects and systems. We hope this **PHP5.5 installation guide on Linux** helps you with a smooth setup and keeps you on the right track in your development journey.