Set up a production LAMP server in a clean Ubuntu install
Last updated:First you need to download Apache:
$ sudo apt-get install apache2
Restart Apache:
$ sudo /etc/init.d/apache2 restart
Now download PHP:
$ sudo apt-get install libapache2-mod-php5
Restart Apache
Now download MySQL:
$ sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
Restart Apache
Download PHPMyAdmin:
$ sudo apt-get install phpmyadmin
Restart Apache
if, on pointing your browser to http://yourdomain.com/phpmyadmin you get a 404 not found error message, you need to add the following text at the end of /etc/apache2/apache2.conf (after all other configuration lines).
Include /etc/phpmyadmin/apache.conf
Restart Apache
Download APC (php opcode cache)
$ sudo apt-get install php-pear
$ sudo apt-get install php5-dev
$ sudo apt-get install apache2-dev
$ sudo apt-get install make
$ sudo pecl install apc
Now you need to add the following text to /etc/php5/apache2/conf.d/apc.ini (if the file isn't already there, create it):
extension=apc.so
Restart Apache
troubleshooting
- Include: command not found.
This is not a command. It's text you need to add to the file.