Wednesday, June 18, 2014

How to install PHP & MySQL on Lubuntu 14.04


PHP and MySQL are 2 very important things if you want to do web development, you will also need Apache web server, so it's actually 3 important things.

On lubuntu (and other linux), you can install one by one and then setup them so that they can work together, but that's a lot of works.

The easiest way to get those three (PHP, MySQL, and Apache) is to use XAMPP installer. XAMPP has everything we need for web development.

XAMPP is not available on lubuntu/ubuntu repository yet, so you have to download manually from apache friends website, here. If you running on 64 bit machine download the 64 bit version, if not download the 32 bit version.

After you download the XAMPP installer file (it should be .run), open terminal and then go to folder where the XAMPP installer is located:

Since mine was on "Downloads" folder so i go there by typing (i'm currently on home directory):

cd Downloads

And then type ls command to make sure the XAMPP installer file is there:

kernelpanic@lubuntulaptop:~/Downloads$ ls
xampp-linux-1.8.3-4-installer.run

Now i need to give permission to execute the installer file, so i type:

chmod +rx xampp-linux-1.8.3-4-installer.run

The installer file should be executable now (if you ls again it will turn green), next i type the following command to open the XAMPP setup wizard:
 
sudo ./xampp-linux-1.8.3-4-installer.run

The XAMPP installation wizard should be starting by now, and all you have to do is hit next and next until finish. I think you already know what to do so i don't have to explain anything.

Once the setup wizard is finish, you will see a GUI like this :


With that GUI you can start, stop and restart the apache, mysql, and proFTP service (click on "Manage Servers" tab).

Once you start the apache service, go ahead open web browser and then type localhost, you should see something like this:



Congratulation, you just install PHP, MySQL and Apache (through XAMPP) on your lubuntu. I will talk more about XAMPP in the next article.


If you want to install PHP Mysql without using XAMPP, you can take a look at this article:

http://lubuntuhowto.blogspot.co.id/2016/02/how-to-install-php-mysql-on-lubuntu-1510.html

~ cheers ~

5 comments:

  1. Thank you a big help and worked like a dream. I have just install Lubuntu and this is a great source.
    Well done

    ReplyDelete
  2. Thanks. Am a newbie in Linux, any article or books that you can recommend? Email me at nyugoh@gmail.com
    I will be more than grateful.

    ReplyDelete
  3. Thanks. Am a newbie in Linux, any article or books that you can recommend, email me at nyugoh@gmail.com . I will be grateful.

    ReplyDelete
    Replies
    1. there's a lot of books that you can read, such as 'beginning ubuntu for windows and mac users'
      http://www.apress.com/9781484206096

      Delete