I will shortly be setting up my own web design and development company and I have decided that I need to have a development web server and so I am going to use a net top pc running Linux to serve that purpose. This was originally going to be my notes on how to set-up the server, but I have posted it here just in case it can help somebody else.
The net top pc I am going to be using is my Acer Revo R3600 which I got awhile back to act as a multimedia server. Shortly after my PC broke and it took over as my main desktop and now it will serve as a web server.
I will be installing Ubuntu 10.04 Server Edition, but first a little look at the Revo specifications.
The Aspire Revo is small but powerful, fuelled by the latest mini processor, complemented by an advanced NVIDIA ION graphics chip set and HDMI™ connectivity supports full 1080P HD.
Having downloaded Ubuntu Server Edition x86 installation image and used Universal USB Installer to create a bootable USB stick to install from, the installation went perfectly smooth. The actual install is very simple and strait forward. I chose to install the LAMP server (Linux, Apache, Mysql, Php) and OpenSSH. That concludes the "official" installation, and the start of the server setup.
The first thing I needed was a internet connection and that means getting the Wireless adaptor installed and configured. Luckily the wireless card in the Revo was already detected and a driver installed, so al it needed was to be configured.
Wireless configuration is held in a file located in /etc/network/interfaces. This needs to be edited to add adaptor information for wireless lan.
sudo pico -w /etc/network/interfaces
And add the following lines
iface wlan0 inet dhcp
Change WIRELESS_SSID and WIRELESS_KEY to match your network settings. You can then use the command below to restart network interfaces.
Not sure why we have to do this, but it fixes the hostnames properly.
echo <yourservername>.<yourdomain> > /etc/hostname
Now the wireless interface is functioning, I have connected to the update server and downloaded the latest package lists manually.
This may take a while to download all the latest packages and should be followed by a reboot of the system.
I plan on storing all the files for the webserver on a NAS (Buffalo LinkStation) so I need to setup and configure Ubuntu to connect to the drive at boot. My initial attempts to add an entry into /etc/fstab were met with an un-bootable system, so I have decided to put an entry into crontab to execute the manual mount command at bootup.
First create a new folder /usr/www/
sudo mkdir /usr/www
Then edit the crontab.
sudo crontab -e
And add the following line
@boot sudo mount -t cifs //192.168.0.10/websites/www /usr/www
This should mount the NAS at boot time.
We may need FTP on the server so let's install it now. PureFTPd can be installed with the following command:
aptitude install pure-ftpd-common pure-ftpd-mysql
Now edit the file /etc/default/pure-ftpd-common
sudo pico /etc/default/pure-ftpd-common
Then make sure that the start mode is set to standalone and set VIRTUALCHROOT=true:
My installation of PHP did not have any of the extensions loaded, so here is the command I used to manually add them. It can also be used to install PHP if it isn't already installed.
sudo aptitude install libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libopenssl-ruby
Then run the following command to enable the Apache modules suexec, rewrite, ssl, actions, and include:
a2enmod suexec rewrite ssl actions include
Restart Apache for changes to take effect.
I've also made quite a few changes to php.ini to aid with development and debugging.
My website and its content are free to use without the clutter of adverts, tracking cookies, marketing messages or anything else like that. If you enjoyed reading this article, or it helped you in some way, all I ask in return is you leave a comment below or share this page with your friends. Thank you.