Install Ubuntu Server
This page shows how to install and configure Ubuntu Server. Download the ISO image and follow the instructions to burn a CD or write to USB-stick. Boot from the CD and complete the Installation Guide.
Setup
Network
If you want to assign a static IP address just edit this file.
1 2 3 4 5 6 | |
DNS settings in /etc/resolv.conf and hostname in /etc/hostname and /etc/hosts.
Type service networking restart to apply the changes.
Create a user
Creating a new user and provide sudo access:
1 2 3 4 | |
An alternative way is to run visudo. Go to the end of file and add the following line:
1
| |
Tired of running sudo -s -H to stay in the shell and update home path when sudoing? Add this to sudoers file:
1 2 3 4 | |
SSH remote access
Install OpenSSH and permit SSH-traffic through firewall.
1 2 | |
Generate a SSH key on your local computer (if you not already got one):
1
| |
Copy your public key to the server:
1
| |
On the server we want to add the SSH key to the authorized_keys file. We must also verify the file permissions.
1 2 3 4 | |
Diable SSH login via password. Change sshd_config to read:
1 2 | |
Configure the Firewall
1 2 3 4 5 6 | |
Type service ufw force-reload to apply the changes.
Set locale
List installed locales, generate new and set:
1 2 3 | |
Cron
In order for users to have their cron jobs executed, they must be added to the /etc/cron.allow file. Or if there is no /etc/cron.allow file then the /etc/cron.deny file must exist and the user can’t be in that file.
In the case where neither file exists, only root cron jobs get executed.
Install and configure SNMP
1
| |
Edit snmpd.conf to contain this single line:
1
| |
Make SNMP listen to all interfaces:
1 2 | |
Don’t forget to open the firewall and restart the SNMP service for settings to apply.
1 2 3 4 | |
Test the SNMP service by query for information (preferably from outside the firewall):
1
| |
Notes
XenServer user?
Create a VM using the Ubuntu Lucid Lynx 10.04 64-bit template.
Install from http://archive.ubuntu.net/ubuntu. After installation completes install the XenServer Guest Tools and reboot.
1 2 | |
Filesystem
Force filesystem check next time you boot:
1
| |
Remove unneeded packages
This is just an example how to list and remove unwanted packages.
1 2 | |