Ubuntu Server 9.04 Manual Lamp Install

Here is a quick Reference guide for installing the components needed for a fresh ubuntu server install to Lamp configuration.
These instructions were originally written 3-2008. As you know that will surely change by the time you need this info.
Hopefully this will give you some idea on how to do it on newer versions of ubuntu server.

Run all as root or sudo

1. change ip from dhcp to static

sudo vi /etc/network/interfaces
[how to setup for dhcp]
Auto eth0
iface eth0 inet dhcp
[how to setup for static]
auto eth0
iface eth0 inet static
[now to setup dns settings]
vi /etc/resolv.conf
On the line ?name server xxx.xxx.xxx.xxx? replace with ip of dns server.

Now to restart network
/etc/init.d/networking restar

2. [get updates for ubuntu]

aptitude update
aptitude upgrade
aptitude dist-upgrade

3. apt-get install apache2
/etc/init.d/apache2 stop

4. apt-get install php5 libapache2-mod-php5
[restart apache]
/etc/init.d/apache2 restart

5. [how to delete full directorys]
rm ?r directory

6. apt-get install mysql-server

If you are running a server you should probably bind your
address by editing bind-address in /etc/mysql/my.cnf and
replacing its value ( by your IP address

how to set root password if not setup in install of mysql
mysql> SET PASSWORD FOR ?root?@’localhost? = PASSWORD(?xxxxxx?);

Try running it

mysql -uroot -pxxx

7. apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

8. Also I had to chown the www folder so that I could easily edit files in it:

cd /var/
sudo chown -R USERNAME www

then created a symlink in my home directory:
ln -s -v /var/www /home/USERNAME/www

9. apt-get install openssh-server

10. http://prdownloads.sourceforge.net/webadmin/webmin_1.400_all.deb

apt-get install openssl libauthen-pam-perl libio-pty-perl libmd5-perl

dpkg -i webmin_1.400_all.deb