Uncategorized

LAMP Server installation in Ubuntu 7.10

I will spare you continued lamenting over Ubuntu desktop’s lack of a simple lamp package.  However, installation was still a breeze with a few apt-get commands from the terminal.  Since I’ve found very few newbie-related step by step guides out there, I’m going to list a few details while I’m recounting my experience.

I installed and setup Apache, Mysql, and PHP in Suse Linux in the past…and got a little overwhelmed, and never ended up actually getting my server up and running.  So far, this has been the difference between night and day.  Whereas in Suse, Yast can download and install those packs for you, installation is still daunting.  I had to manually edit lines of code to configure Apache 2 to work with PHP5 and MySQL…blah blah blah.  I don’t recommend it for a hobbyist like me who has recently come to linux to play around with your own server, and learn some about linux’s capabilities in the process.  It eventually got up and running…I think.

Anyway…Ubuntu has no Yast.  Add/Remove Programs doesn’t even allow you to install the individual programs for Apache, MySQL, and PHP.  A quick search online brought me to this site…which I was not initially sure was what I needed.  But it worked just fine.

It was incredibly easy, and even had a dialog screen pop up for setting the MySQL root password, instead of leaving me to remember to type the commands into the terminal to set it myself. (thanks for that too…I couldn’t remember the commands to do that.)

So, here’s how to do it:  go to accessories, and open up the terminal.  Type this command:

sudo apt-get install apache2 mysql-server php5 libapache2-mod-php5 php5-xsl php5-gd php-pear libapache2-mod-auth-mysql php5-mysql

Just as a note sudo means super-user do.  You’ll have to type in your password, or SU’s password to complete this command.  If you’ve already switched to super-user…just start with “apt-get.”  This will contact ubuntu’s download servers and download apache, mysql, and php5, and install them.  You’ll get one dialog asking for a password for root for mysql.  Neat, huh?

sudo sed -i ’s/; extension=mysql.so/extension=mysql\.so/g’ /etc/php5/apache2/php.ini

This removes the semicolons from php’s config file, allowing it to work with Apache.  I did this by hand during my Suse installation…what a pain.

sudo /etc/init.d/apache2 restart

Finally, restart apache.  I got a message saying “could not determine server’s fully qualified domain name.”  I don’t know if that’s because I haven’t gotten my static IP from my ISP yet.  I’ll be getting that on Monday and see if it changes.

Your LAMP server is now installed.  I’ll be setting it up later.  Please leave comments!

2 thoughts on “LAMP Server installation in Ubuntu 7.10

  1. You can also use the single command:
    sudo taskseland then select the LAMP Server option, press enter and it will install and configure itself, only asking for the MySQL root password.

Leave a Reply