These are my notes for installing the lamp stack on Ubuntu server, Jaunty.
Ingredients:
- 64 bit AMD phenom II quad core machine
- Ubuntu v. 9.04 (Jaunty Jackalope)
- ability to invoke the tasksel application via the command line
1. Set up your environment:
This will update/upgrade your environment w. the latest libraries, restart server if prompted
- sudo apt-get update
- sudo apt-get upgrade
2. Use tasksel to install the stack
Note: tasksel is probably the easiest way to install the stack, in the future, I may publish an a la carte version of this recipe
- sudo tasksel install lamp-server
- tasksel will make you choose a password
3. Configure the extensions dir
- find the mysql.so file (I did it via cd / then sudo find | grep mysql.so)
- write this folder down
- sudo vi /etc/php5/apache2/php.ini
- look for the extension_dir and put the location of the mysql.so file there
4. Configure my.cnf
- change line: bind-address = localhost
- to: bind-address = whatever_your_ip_address_is
5. Install phpmyadmin (optional)
Note: phpmyadmin is a useful tool for configuring/debugging your lamp stack. I don’t use it personally, but a lot of developers do.
- sudo apt-get install phpmyadmin
- phpmyadmin will make you choose a password
6. Test phpmyadmin
- goto: http://WHAT_EVER_YOUR_SERVER_NAME_IS/phpmyadmin
7. Changes to the DocumentRoot (optional)
- Find the line that is DocumentRoot, it should be defaulted to /var/www. Change it whatever you want. The DocumentRoot setting can be found below:
- sudo pico /etc/apache2/sites-available/default
That’s all there’s really to it. My next revision to this recipe will include finding the index.html/index.php and modifying it to complete the installation.
References:
- https://help.ubuntu.com/community/ApacheMySQLPHP#Installing%20Apache%202