Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Web Servers»Apache»How to Install LAMP (PHP 5.5, Apache 2.4 and MySQL 5.5) on Ubuntu 14.04 (Trusty Tahr)

    How to Install LAMP (PHP 5.5, Apache 2.4 and MySQL 5.5) on Ubuntu 14.04 (Trusty Tahr)

    RahulBy RahulSeptember 2, 20153 Mins Read

    LAMP (Linux, Apache, MySQL and PHP ) Stack is the most popular environment in PHP website development and hosting. Linux is the operating system, Apache is the popular web server developed by Apache Foundation. MySQL is relational database management system used for storing data and PHP is an development language.

    This article will help you to Install Apache 2.4, MySQL 5.5 and PHP 5.5 on Ubuntu 14.04 Systems. Thanks to Ondřej Surý, Which is maintaining the PPA for PHP 5.5 in launchpad. Use the following steps to setup complete web server enviroment using Ubuntu 14.04 LTS operating system.

    Step 1: Install PHP 5.5

    Use the following set of command to add PPA of PHP-5.5 in our system and install it. Some times this setup causes some issues so we are also installing python-software-properties package in our system.

    $ sudo apt-get install python-software-properties
    $ sudo add-apt-repository ppa:ondrej/php5
    $ sudo apt-get update
    $ sudo apt-get install -y php5
    

    Verify installed PHP5 version using following command.

    [email protected]:~$ php -v
    
    PHP 5.5.28-1+deb.sury.org~trusty+1 (cli) (built: Aug 16 2015 09:30:05)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    

    Step 2: Install Apache2

    After installing PHP5 on your system, let’s start installation of Apache2 in your system. Your also required to install libapache2-mod-php5 module to work PHP with Apache2.

    $ sudo apt-get install apache2 libapache2-mod-php5
    

    Step 3: Install MySQL

    Finally install mysql-server packages for MySQL database. Also install php5-mysql package to use MySQL support using php. Use following command to install it.

    $ sudo add-apt-repository -y ppa:ondrej/mysql-5.5
    $ sudo apt-get update
    $ sudo apt-get install mysql-server php5-mysql
    

    Installer will prompt for root password, This password will work for your MySQL root user. After installing MySQL execute following command for initial settings of MySQL server.

    $ sudo mysql_secure_installation
    

    Step 4: Restart Apache2, MySQL Services

    After installing all services on your system, start all required services.

    $ sudo service apache2 restart
    $ sudo service mysql restart
    

    Step 5: Open Access in Firewall

    If you are using iptables, Use following commands to open port 80 for public access of webserver.

    Iptables Users:

    $ sudo iptables -A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
    

    UFW Users:

    $ sudo ufw allow 80/tcp
    

    Congratulation’s! You have successfully configured web server on your ubuntu System. Read our next article Installing LAMP Stack on RHEL based systems

    Apache Apache2 lamp MySQL PHP PHP5
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Create a Branch in Remote Git Repository
    Next Article How To Setup NTP Server on Ubuntu & LinuxMint

    Related Posts

    How to Install Composer on Ubuntu 22.04

    Updated:June 24, 20223 Mins Read

    Backup MySQL Databases to Amazon S3 (Shell Script)

    Updated:May 28, 20222 Mins Read

    How to Install MariaDB on Ubuntu 22.04

    Updated:May 28, 20222 Mins Read

    How To Install Apache Solr 9.0 on Fedora 36/35

    Updated:May 26, 20223 Mins Read

    How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04

    Updated:June 19, 20223 Mins Read

    How to Install Apache ActiveMQ on Ubuntu 22.04

    3 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.