Recently I got hold of an empty Rackspace server in which we have installed Ubuntu 11.04 Natty Narwhal version. My next step was to setup the LAMP stack in that server to run our PHP site.
First I tried to install XAMPP for Linux. But unfortunately, it failed because XAMPP only supports 32 bit operating system and ours was 64. I didn't want to spend much time on fixing that issue, so I moved to setup the LAMP stack by other means.
Here's what I did (after googling/referring a lot):
- **sudo apt-get install tasksel **[installs the tasksel that helps you to install multiple packages as a single task]
- **sudo tasksel install lamp-server **[it will install the lamp stack in location /etc/]
- *http://yourdomain.com *should work now.
2. Configure PHP Curl module
- **sudo apt-get install php5-curl **[downloads and installs curl module]
- sudo /etc/init.d/apache2 restart [restarts server for the changes to take effect]
3. Install phpmyadmin
- **sudo apt-get update **[updates the packages repository. When I first tried to install phpmyadmin without updating, it complained that phpmyadmin isn't found.]
- **sudo apt-get install phpmyadmin **[will trigger a installation wizard]
- Choose **apache2 **for the server configuration and choose **no **for **database configuration **(since we have already installed database).
- **sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d **[copies the server configuration so that it is accessible via web]
- sudo /etc/init.d/apache2 restart
- http://yourdomain.com/phpmyadmin should work now.
That's it. Now our server is ready for serving the traffic. Place your website files under **/var/www/ **which will be served to the world.