Friends or family? Register and get access to the restricted area (holiday photos etc.)
Login
No account yet? Register
 
Home arrow Ubuntu arrow My Guides arrow Ubuntu LAMP server
Ubuntu LAMP server Print E-mail
Written by Rob   
Saturday, 13 January 2007

Linux is becoming more and more desktop friendly but the most common use of Linux and Unix like OSs is for a web server. If you wish to set up a web server at zero cost this guide will give you some pointers.

What is LAMP server? Its short for Linux-Apache-MySQL-PHP.

First, to be clear, you can use any Linux flavor but this guide is for Ubuntu as that is the OS I'm currently using on my PCs.

Firstly you need to decide if your server will be a server only, without graphical interface and desktop environment, or it will be a usual desktop setup with a added on server. Either way you can find a Ubuntu desktop and server install CDs at ubuntu.com

I will be discussing here a server install on a Desktop pc as this guide is meant for beginners.

Once you have a Ubuntu system up and running the way you want and you have enabled universe and multiverse repositories (find out how to do things in Ubuntu section) you can start installing extra bits required for a server.

You can find a complete guide at Ubuntu Documentation site.

To install Apache + PHP5 + MySQL

write following into the terminal (one line at the time):

sudo aptitude update
sudo aptitude install apache2 mysql-server libapache2-mod-auth-mysql php5-mysql

A useful application to control MySQL database is called MyPHPadmin and you can install it by:

sudo aptitude install phpmyadmin
To run it go to your browser and http://localhost/phpmyadmin

Use the following command to run Apache :

sudo /usr/sbin/apache2ctl start

To stop it, use :

sudo /usr/sbin/apache2ctl stop

Finally, to restart it, run :

sudo /usr/sbin/apache2ctl restart

If you get this error when you start Apache2:

apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

then edit

gksudo gedit /etc/apache2/apache2.conf

and add

ServerName localhost

at the end of the file

Using Apache

You can access apache by typing 127.0.0.1 or http://localhost (by default it will be listening on port 80) in your browser address bar. By default the directory for apache server pages is /var/www . It needs root access in order to put files in. To change permissions to yourself type in terminal (change yourusername):

sudo chown -R yourusername /var/www

Now this was a very short version of how to get a LAMP server. There are few bits that you should know and also you may want to install PHP4 instead of PHP5.

Ubuntu wiki has more information on how to get the Ubuntu Server going, some troubleshooting tips, how to create a database tips etc. - Here>>
Apaches website - Here>>





Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Newsvine!Yahoo!Ma.gnolia!FeedMeLinks!Free social bookmarking plugins and extensions for Joomla! websites! title=
Last Updated ( Tuesday, 03 April 2007 )
 
< Prev   Next >

What do I listen to?

Listen to Virgin Radio - the music we all love
Listen to Virgin Radio Xtreme - new music, no limits
Listen to Virgin Radio Classic Rock - the classic rock authority
Listen to Virgin Radio Groove - non-stop classic soul and Motown

News Feed

Green Hosting

Site Status

Members: 18
News: 55
Web Links: 23
Visitors: 287897