RT @uktaxcalculator: As promised, the new version of our iPhone/iPad app is now in the app store. Try it and let me know what you think! ...
Following on from our first post on creating and setting up a rackspace cloud server instance, we go into detail here about further basic configurations for your server:
FTP - To transfer files to/from your cloud server you need some kind of FTP application installed.
You can install FTP or vsFTPd - we install vsFTPd as it secure, fast and stable
First make sure your application repositories are up to date, we will use the apt-get package manager for this one:
# sudo apt-get update # sudo apt-get install vsftpd
This will then update the repository and begin the installation of the ftp program
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: vsftpd 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/106kB of archives. After this operation, 430kB of additional disk space will be used. Selecting previously deselected package vsftpd. (Reading database ... 12201 files and directories currently installed.) Unpacking vsftpd (from .../vsftpd_2.0.7-0ubuntu1_amd64.deb) ... Setting up vsftpd (2.0.7-0ubuntu1) ... * Starting FTP server: vsftpd [ OK ]
As the ftp daemon is auto-started for you, you need to stop it in order to make changes to it's configuration
# sudo service vsftpd stop
Then use the vi editor to edit the configuration file:
#sudo vi /etc/vsftpd.conf
Go through this file and make changes. In the VI editor, you need to press the 'i' key before you can type into the file, then esc key to leave editing mode, to save the file type ':wq' and then enter. Adding a '#' at the start of the line, comments it out and means it won't be processed as part of the configuration.
Find and amend as below, or add where these are not already in the file:
#anonymous_enable=YES local_enable=YES write_enable=YES chroot_local_user=YES
You can choose to restrict users that login, to their own workspace - if you want users to have access at least to the entire file system, comment out the 'chroot_local_user=YES' line.
Once you have saved the file, restart the vsFTPd server as follows and you are done!
# sudo service vsftpd start
You will see the following confirmation:
* Starting FTP server: vsftpd [ OK ]
Time, Time Zone
You need to make sure the cloud server is set at the correct time and timezone as well as making sure that these are kept up to date and maintained as such on a daily basis.
The first thing to set up is your time zone - you need to configure as follows:
# sudo dpkg-reconfigure tzdata
This will bring up a graphical display asking you to select a geographic area for your time zone.
Select your area, then your nearest city and select ok to continue
That should set your system time zone!
To set the date, Ubuntu has an application called ntpdate which can set the system time/date. To keep the system up to date, we need to run this application automatically everyday and have it query the online time server.
To start, create a new file within the cron.daily folder to handle the command:
# sudo vi /etc/cron.daily/ntpdate
In this file enter the following:
#!/bin/sh ntpdate ntp.ubuntu.com
Save and close the file, by typing ':wq' then hitting enter.
Make the file executable by the system using the file permission tool called 'chmod' :
# sudo chmod 755 /etc/cron.daily/ntpdate
That's it! Your server will have its time updated automatically everyday.
Postfix for outbound mail
As a final basic setup step, you need to install Postfix.
Postfix is a free, open-source mail transfer agent - it enables you to send email from within your cloud server.
Installation is pretty straightforward. Firstly, you need to use a package manager to install it and other dependent software:
# sudo aptitude install postfix telnet mailx
You will see a graphical menu option asking for the type of mail configuration. Select 'Internet Site' and hit OK.
Next you will see a dialog asking for a 'system mail name'. It is important what you name the server as here. You should enter the fully qualified domain name of your cloud server, for example, mail.myserver.com - or enter the same domain as what your reverse ip check for your server would resolve to.
Once you have done this, hit OK and you are done.
Congratulations, your cloud server slice is now fully set up to be configured for whatever software you may wish to install on it.
We will keep these blog posts centered around using the cloud server as a web server, so look out for articles in the cloud server category following up on: