This is my personal memo for setting up new Ubuntu servers in my environment. It may not be appropriate for your environment but feel free to use it as a starting point.
- Accept all defaults except as listed here.
- For the machine name use the full name including the local domain, e.g.
new-server.local.domain
- Add a user for all build tasks, name is
Build
, username isbuild
- Do not encrypt the home directory.
- Do not use LVM
- Obviously you need to accept the suggested changes to the partition table.
- Install security updates automatically
In the console:
sudo su
passwd root
apt-get install ssh openssh-server
Now you can continue from a more comfortable SSH connection:
sudo pico /etc/network/interfaces
and add
auto eth0
iface eth0 inet static
address 192.168.1.123
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
dns-nameservers 192.168.1.6
(obviously substitute your actual intended static IP address for 192.168.1.123
). Add this server to your DNS server.
sudo service networking restart
sudo pico /etc/hosts
and make it look like this:
127.0.0.1 localhost.localdomain localhost
192.168.1.123 new-server.local.domain new-server
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Then
sudo su
echo new-server.local.domain > /etc/hostname
/etc/init.d/hostname restart
hostname
hostname -f
apt-get update
apt-get dist-upgrade
reboot
After rebooting:
sudo su
/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
apt-get remove apparmor apparmor-utils
apt-get install ntp ntpdate dkms htop iptables-persistent
echo 'Europe/London' | sudo tee /etc/timezone
dpkg-reconfigure --frontend noninteractive tzdata
exit
sudo pico /etc/apt/sources.list.d/webmin.list
and enter:
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
Then
wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc
sudo apt-get update && sudo apt-get install webmin
- Go to
https://xyzn.xenapto.net:10000/
(use your own instance of course) - Navigate to
Webmin
|Webmin configuration
|Webmin themes
|Install theme
|From ftp or http URL
- Enter
https://webmin-theme-stressfree.googlecode.com/files/theme-stressfree-2.10.tar.gz
and clickInstall theme
- Click
Return to themes list
, selectStressFree theme
and clickchange
- Refresh the browser a few times until all is well.
- Navigate to
System
|Software package updates
and configure Webmin to install all updates.
sudo su
wget -O /etc/apt/sources.list.d/newrelic.list http://download.newrelic.com/debian/newrelic.list
apt-key adv --keyserver hkp://subkeys.pgp.net --recv-keys 548C16BF
apt-get update && sudo apt-get install newrelic-sysmond
nrsysmond-config --set license_key=cf7a3f63ff072ed553adb3c45af33051c1300a5f
/etc/init.d/newrelic-sysmond start
exit
If this is a Virtualbox VM then mount the Guest Additions CD using the menu Devices | Install Guest Additions...
. Then
sudo su
apt-get install build-essential
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
/mnt/cdrom/VBoxLinuxAdditions.run
exit