Ubuntu Install
From CafeWiki
Ubuntu Server Installation
Important Interjection! At some point during the install, you will need to set up the archive mirror which specifies the server for getting updates. My problem, living in Canada (MST time zone) I made the mistake of checking Edmonton as my location. This leads the server to retrieve updates via somebody's 10mhz 286 connecting to the internet with sedated hamsters. I would suggest selecting a US location if you have a compatible time zone, for me it is Denver and all is good!
Thanks for humoring me and now back to the real instructions...
Here are the basic steps to set up a ubuntu server:
Installation and Setup: Install ubuntu server version appropriate for the target hardware (e.g Ubuntu 8.04 for amd64) from CD. The iso image is available from ubuntu.com During the install, select appropriate regional and keyboard settings then set the initial system user:
User: Full Name username: username password: password
Generally the full disk will be formatted
Select and install at least the SSH option, select other options according to the purpose of the server (webserver, mailserver, etc).
Configuration of System Set a static IP address for the box: In the file /etc/network/interfaces, make bolded changes:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 #iface eth0 inet dhcp #change from dhcp to static address iface eth0 inet static address static_IP_Addr netmask 255.255.255.0 gateway gateway_IP_Addr
Edit /etc/resolv.conf to add the search line
search domain_search_path nameserver nameserver_IP
Restart the eth0 interface
ifdown eth0 ifup eth0
Check the address with
ifconfig
Get the latest updates for the server
atp-get update apt-get upgrade apt-get dist-upgrade (if needed)
Edit the file /etc/ssh/sshd_config to add the line “AllowGroups admin” at the bottom of the file. This restricts ssh access to users in the admin group. Test the ssh server by using putty or winscp to get access to the new server.
Install webmin to make the administration of the box a lot easier (for both apache and mySQL stuff).
Edit the /etc/apt/sources.list file to add the repository that contains the webmin sources and binaries:
## Added to allow install and update of Webmin via apt deb http://download.webmin.com/download/repository sarge contrib
Get the PGP key for the webmin apt install
cd /root wget http://www.webmin.com/jcameron-key.asc apt-key add jcameron-key.asc
Run apt-get update to refresh the sources.list
Install webmin
apt-get install webmin
Test webmin by browsing to https://server_IP_Addr:10000/
It doesn't hurt to save a copy of the install iso image for the server in /usr/local/share/iso.
From this basic installation you can continue with specific configuration of the server depending on its purpose as a web or mail server.
Sometimes after doing a major distribution upgrade (i.e. from 7.x to 8.x) you may get the following type of error when you run apt-get update
W: GPG error: http://ppa.launchpad.net intrepid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 36B474EAC92F154 <example public key, yours will vary> W: You may want to run apt-get update to correct these problems
Simply running apt-get update will not solve the problem, the problem is you have a key mismatch and you need to execute the following
gpg --keyserver subkeys.pgp.net --recv 36B474EAC92F154 <make sure you use the key from your error message, not the one in this example> gpg --export --armor 36B474EAC92F154 | sudo apt-key add -
If you have installed Ubuntu in a VM, don't forget to install the VMWare tools, however before you do that run the following command:
sudo apt-get install build-essential linux-headers-`uname -r`
Then you can untar the VMWare tools archive, and run the script.
