RSS Feed

RSS
Comments RSS

Ubuntu+XAMPP+Python part 1

Do you have Ubuntu running on a system at home or work?  Have you ever wanted to run your own local web server or at least have one available for development work?   Have you ever wanted to craft your own web CGI scripts?  If you answer yes to these, then here is a serials of tutorials on how to get an Apache web server running quickly and easily on your Ubuntu system and how use Python to craft CGI scripts to run on it.

First, let’s get an Apache web server up and running.   Since this is targeted at people running Ubuntu desktop, rather than Ubuntu server, the very simplest way to install Apache is to do it via XAMPP.   XAMPP is a bundled, self-contained Apache web server distribution provided by Apache Friends that is complete and robust.  It includes  features here as listed from the website:

The distribution for Linux systems (tested for SuSE, RedHat, Mandrake and Debian) contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.

The XAMPP distribution is designed simply to be downloaded, unpacked, and run from a self-contained directory.   It does not modify your Ubuntu system at all and can be removed simply by deleting the folder that contains the installation.    Now, follow this link to the Apache Friends website and follow the directions for downloading and installing the XAMPP distribution, after reading the notes I provide here.  You will notice there are also instructions on securing the installation.  This is particularly important if you are using this for anything other than development purposes running on your personal system.  If this will be exposed to others, or the world, be sure to follow the instructions on making XAMPP secure.  Note:  Since this is being targeted for Ubuntu do not use the su command as stated in the XAMPP installations instructions.  Instead, you should install using this single line.

sudo  tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt

XAMPP will be installed in the /opt/lampp folder.   To start it up, go to a shell prompt and type the following.  Again, sudo is required.

sudo /opt/lampp/lampp

Now, open you browser and give http://localhost as the address.  You will be presented with the default XAMPP webpage that is being served out by your local Apache web server.  I encourage you to play around with XAMPP for a while and explore your installation via the default page, then return here for the next installment of this series where we will look further at developing CGI scripts in Python.

One Response to “Ubuntu+XAMPP+Python part 1”

  • Hi.
    I have installed xampp, and my browser give http://localhost/.
    I want to use Python on xampp, but I don’t know how to install it.
    Could you help me with it?
    My OS is Ubuntu11.04.
    (Please be generous in finding my rude expressions,if any. I don’t mean such. It’s simply because I’m poor at English.)









*