Page 1 of 16 12311 ... LastLast
Results 1 to 10 of 376

Thread: HOWTO: Setup easy web development environment (XAMPP)

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Burlington, ON, Canada
    Beans
    104
    Distro
    Ubuntu 8.10 Intrepid Ibex

    HOWTO: Setup easy web development environment (XAMPP)

    This is a how-to for setting up a web development environment easily. This guide will install the XAMPP lampp stack into /opt, setup an easy way to start it up and shut it down, and link a folder in your home directory to the webserver.

    WARNING
    This guide is aimed at a development environment only and should not be used as a public webserver. To setup a public webserver follow the directions on the Ubuntu wiki https://help.ubuntu.com/community/ApacheMySQLPHP

    As this is Ubuntu, all the major parts of a typical web server are included (in the main repo, or on the Ubuntu Server CD) and this is a great way to setup a server. The ubuntu developers have prepared a great web server and have made the process as seemless as possible.

    But what if even the official way is still to complicated? What if you just want a quick web server for development?

    Fortunately there is the XAMPP project: http://www.apachefriends.org/en/xampp.html. The XAMPP project bundles Apache, PHP4 & 5, Perl, mySQL, and a bunch of other utilities/applications into an simple package for Mac OSX, Windows, Solaris, and Linux. Obviously this HOWTO only deals with the linux version.

    For those of you with already existing Apache/mySQL/php installations it installs everything into /opt so it doesn't conflict with any other installation, and it is completely setup and ready to run.

    Install XAMPP

    Two easy steps:
    1. Download the most recent version of XAMPP: (at time of writing 1.5.3a)
      http://prdownloads.sourceforge.net/x...ar.gz?download
      (Source URL: http://www.apachefriends.org/en/xampp-linux.html#374)
    2. Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)
      Code:
      sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt


    Start XAMPP

    To start it up, open a terminal and type this:
    Code:
    sudo /opt/lampp/lampp start
    Stop XAMPP

    To stop it, open a terminal and type this:
    Code:
    sudo /opt/lampp/lampp stop
    Additional XAMPP commands

    To see additional commands, open a terminal and type this:
    Code:
    sudo /opt/lampp/lampp
    Sweet XAMPP Control Panel



    To use the sweet gtk/python control panel:

    Run in a terminal:
    Code:
    gedit ~/.local/share/applications/xampp-control-panel.desktop
    Paste the following into the open file and save and exit.
    Code:
    [Desktop Entry]
    Comment=Start/Stop XAMPP
    Name=XAMPP Control Panel
    Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
    Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
    Encoding=UTF-8
    Terminal=false
    Name[en_CA]=XAMPP Control Panel
    Comment[en_CA]=Start/Stop XAMPP
    Type=Application
    Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg
    "XAMPP Control Panel" will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

    Test to see if XAMPP is running

    Once XAMPP is up and running open firefox and go to: http://localhost/

    You should see the XAMPP test page:



    Location of files and uploading

    XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
    My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn't a index.php/html/etc file)
    To set this up, run in a terminal:
    1. Make public_html directory in home directory:
      Code:
      mkdir ~/public_html
    2. Link to /opt/lampp/htdocs
      Code:
      sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

    Now any files and folders you place in ~/public_html will be published to your personal webserver.

    Bookmark http://localhost/username to make this easy to access.

    WARNING - SECURITY
    http://www.apachefriends.org/en/xampp-linux.html#381
    Open holes:
    1. The MySQL administrator (root) has no password.
    2. The MySQL daemon is accessible via network.
    3. ProFTPD uses the password "lampp" for user "nobody".
    4. PhpMyAdmin is accessible via network.
    5. Examples are accessible via network.
    6. MySQL and Apache running under the same user (nobody).

    This doesn't leave your whole system wide open, but someone could hack your XAMPP installation, so be wary.
    To fix most of the security weaknesses open a terminal and run:
    Code:
    sudo /opt/lampp/lampp security
    Feedback
    Please read this post.

    ---- EDIT - July 28, 2006 ----
    Minor Edits

    ---- EDIT - August 1, 2006 ----
    Re-did xampp control panel shortcut to make it easier.

    ---- EDIT - August 16, 2006 ----
    Added warning for public web servers and edited intro to make it more accurate.

    ---- EDIT - September 1, 2006 ----
    Added sudo to security command.
    Last edited by petervk; September 1st, 2006 at 02:58 PM.
    Peter VK

  2. #2
    Join Date
    Jun 2006
    Location
    Texas, USA
    Beans
    59
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Setup easy web development environment (XAMPP)

    contained a link to my site which had this tutorial but the one i wrote.

    removed because i shut down the site
    Last edited by gorilla_king; May 23rd, 2007 at 03:09 AM.

  3. #3
    Join Date
    Oct 2005
    Location
    Burlington, ON, Canada
    Beans
    104
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Setup easy web development environment (XAMPP)

    The url is broken for me. It could be the wierd port and the firewall here at school. Do you have it mirrored somewhere else?
    Peter VK

  4. #4
    Join Date
    Jun 2006
    Location
    Texas, USA
    Beans
    59
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Setup easy web development environment (XAMPP)

    Quote Originally Posted by petervk View Post
    The url is broken for me. It could be the wierd port and the firewall here at school. Do you have it mirrored somewhere else?
    yeah if your at school then i'm about 95% sure that it's broken from the firewall, and no i don't mirroed at the moment because i'm just using it as a developement server.

  5. #5
    Join Date
    Oct 2005
    Location
    Burlington, ON, Canada
    Beans
    104
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Setup easy web development environment (XAMPP)

    So far this post has just under 200 views, So great. If you read this and use it could you leave a reply saying if it was useful/useless? I'd like to keep improving this how-to, so feedback would be good.

    Plus, replies bump it up the list.
    Peter VK

  6. #6
    Join Date
    Jun 2006
    Location
    /Earth/Asia/Vietnam
    Beans
    211
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HOWTO: Setup easy web development environment (XAMPP)

    This is a very nice Howto for me, I was wondering how to make php5 and php4 developements working seamlessly together in a handy way, and now I find out that XAMPP will be my best shot now. Thanks so much for this, and I bet that many ppl will find this helpful also, keep up the good work, petervk

  7. #7
    Join Date
    Mar 2007
    Location
    Dallas, TX
    Beans
    55
    Distro
    Ubuntu Studio 10.10 Maverick Meerkat

    Exclamation Re: HOWTO: Setup easy web development environment (XAMPP)

    Quote Originally Posted by petervk View Post
    So far this post has just under 200 views, So great. If you read this and use it could you leave a reply saying if it was useful/useless? I'd like to keep improving this how-to, so feedback would be good.

    Plus, replies bump it up the list.
    Haven't used it yet, but it's my plan to after the semester's over.

  8. #8
    Join Date
    Aug 2007
    Beans
    2

    Re: HOWTO: Setup easy web development environment (XAMPP)

    the instructions that arrived with xampp_ubuntu didn't work; yours worked perfectly

    thank you for your perfectly useful posting on installation/running xampp!

  9. #9
    Join Date
    May 2007
    Location
    Midland, Texas
    Beans
    13
    Distro
    Ubuntu 7.04 Feisty Fawn

    Talking Re: HOWTO: Setup easy web development environment (XAMPP)

    Quote Originally Posted by petervk View Post
    So far this post has just under 200 views, So great. If you read this and use it could you leave a reply saying if it was useful/useless?
    VERY Useful! Thanks alot for putting this together - took just under 2 minutes after the download and I'm up and running my development server... very cool.

    You

  10. #10
    Join Date
    Jan 2009
    Location
    Ontario, Canada
    Beans
    1
    Distro
    Xubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Setup easy web development environment (XAMPP)

    Quote Originally Posted by petervk View Post
    ... If you read this and use it could you leave a reply saying if it was useful/useless? I'd like to keep improving this how-to, so feedback would be good.

    Plus, replies bump it up the list.
    Thank for the tut, very precise. I was wondering if you could add more info about running xampp as a single user...

    Its default is to run as 'nobody'. Some users have had success by..

    chown nobody:user *
    chmod 0775 *

    Possibly adding directions to run as single user so they can chmod files to 0755 or similar for better security.

    Again great work!

Page 1 of 16 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •