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./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./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:
Start XAMPP To start it up, open a terminal and type this: Code:
sudo /opt/lampp/lampp start To stop it, open a terminal and type this: Code:
sudo /opt/lampp/lampp stop To see additional commands, open a terminal and type this: Code:
sudo /opt/lampp/lampp ![]() To use the sweet gtk/python control panel: Run in a terminal: Code:
gedit ~/.local/share/applications/xampp-control-panel.desktop Code:
[Desktop Entry] 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:
Bookmark http://localhost/username to make this easy to access. WARNING - SECURITY http://www./en/xampp-linux.html#381 Open holes:
To fix most of the security weaknesses open a terminal and run: Code:
sudo /opt/lampp/lampp security |
|