How To Install XAMPP On Ubuntu 12.04 LTS



previous tutorial I had explained How to install webserver locally using XAMPP in windows. Currently I will explain to you how it can work in Ubuntu 12.04 LTS. Apache friends provide the support either Linux or Windows.


The fisrt step you have to do is download the source XAMPP for Linux. You can donwload it from this link.

After you've got it, you open the terminal so that you can install it via command line. Press CTRL + ALT + T to open the terminal. After the terminal is opened go to the target, that is XAMPP location. For this example XAMPP location is located in /home/winata/Downloads.

So type this command,
sudo tar xzvf /home/winata/Downloads/xampp-linux-1.7.7.tar.gz -C /opt/

now you can start you webserver service using this command,
sudo /opt/lampp/lampp start

you will see this result,
Starting XAMPP for Linux 1.7.7...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.

If you have got result like above, it means you have installed it successfully.

Now, you should make folder so that you can access and put you project easily. Normaly XAMPP provide fodel htdocs to put any file for our website like php, html, css, js etc. in XAMPP linux your htdocs file is located in /opt/lampp/htdocs, but this folder sill using root permission, so that you can use it easily you have to change that folder permission. But you can second way without change the permission htdocs folder. That way is, you make the folder in your home directory and linked to htdocs folder.

To do that, first you make folder ini your home directory, the command is,
cd /home/winata/ → ENTER
mkdir public_html → ENTER
sudo ln -s /home/winata/public_html/ /opt/lampp/htdocs/ → ENTER

now you can addd, edit, or delete your website file easily. You can access your file via this url,

to detailed command for XAMPP linux you can go to this link

Comments

  1. Hi.. this is lohith and i am using first time ubantu in my pc.. i want to install xampp and i extracted tar file and i pasted it on desktop.. later i moved to desktop using cd desktop but i am getting like this error msg.. how to install xampp need help>?

    loki@loki-Inspiron-1525:~/Desktop$ tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt
    tar (child): xampp-linux-1.7.3a.tar.gz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    loki@loki-Inspiron-1525:~/Desktop$

    ReplyDelete
  2. it should succeed
    try place the tar file in home directory

    or if you want extract from desktop, using complete path desktop

    like this;
    sudo tar xzvf /home/winata/Desktop/xampp-linux-1.7.7.tar.gz -C /opt/


    ReplyDelete
  3. i have make new directory in /data/jasmine/My\ Lab/hosting
    then try make a symlink
    sudo ln -s /data/jasmine/My\ Lab/hosting/ /opt/lampp/htdocs/

    but, when i try open http://localhost/hosting,
    access forbidden

    can u help me?

    ReplyDelete
  4. tar (child): /home/winata/Desktop/xampp-linux-1.7.7.3a.tar.gz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now

    what is my fault

    ReplyDelete
  5. In XAMPP 1.8.2 the install process is much simpler and it is done via a graphical setup wizard.
    Installing XAMPP and web apps like Wordpress is now easier than ever.
    See link below for tutorial Installing XAMPP for Linux on Ubuntu 12.04.
    Good Luck.

    http://irishlightandcolour.blogspot.ie/2013/10/install-xampp-for-linux-on-ubuntu-1204.html

    ReplyDelete
  6. (y) good,,, GUI installer
    i just known

    ReplyDelete

Post a Comment