Intro Tutorial to Setting up a Ubuntu Server

This is a brief overview and does not cover anything in the way of performance tuning, security, or any other form of optimization.

Your initial setup:

  1. sudo passwd followed by prompt for new root password
  2. aptitude install apache2 mysql-server php5 php5-mysql curl php5-curl phpmyadmin libapache2-mod-proxy-html
  3. For mod_rewrite to work go to “/etc/apache2/sites-available” and in “default” change “AllowOverride None” to “AllowOverride All” for any directory you want to allow mod_rewrite to work.  You’ll also want to run “a2enmod rewrite” to load the rewrite module.
  4. Restart apache: “/etc/init.d/apache2 restart”
  5. Not required, but I’ll install libapache2-mod-security2 as well.
  6. Not required either, but it’s also a great idea to increase your memory limit in your “php.ini” to a higher number.  For most sites 32M is fine.  I typically set it to around 96M for my Drupal sites.
  7. Adding mod_deflate will decrease processing and load time to your sites’ pages.  Here’s how: ”
    a2enmod deflate”.  Then restart Apache again.  On Apache2, all we need to do is load the module since it should already be installed on the system.

To make sure everything is working correctly, enter your IP in an address bar of any browser and you should get an apache “It works!” message in the page.

To verify that your PHP is installed and serving pages correctly, you can go to “/var/www/” and create any PHP file, and try putting something like “<?php print phpinfo(); ?>” in it.  Then go to “http://your_ip/your_file.php” in any browser.  You should get a full printout of information regarding your server configuration.  Generally, it’s a good idea to delete this afterwords, since you don’t want anyone and their uncle seeing your undercarriage.

Step B: Start adding websites.

My next post will have some details on how to add multiple sites and be able to manage them independently, cleanly, etc.

Bookmark and Share
blog comments powered by Disqus

©2005-2010 Norfolk, VA | Epiphany Digital is proudly powered by Badgers and Web Design is by Epiphany Digital
Entries (RSS) and Comments (RSS). 33 queries. 5.890 seconds.

Thank you for visiting this site. The web fairy will visit you in your sleep... you know, I was going somewhere with this, but it really doesn't have as much innocent charm as the tooth fairy, especially when I picture the web fairy as someone much like the Simpsons' Comic Book Guy but with wings. It's just not something I want.