Many individual server packages (such as Apache2, MySQL, PHP, etc.) can be installed individually on either a Desktop edition or Server edition (using the tasksel command as described below). It is not necessary in general, therefore, to install Ubuntu Server if you only wish to use a few server packages on a Desktop edition.
The Server edition is optimised for speed and ease of monitoring and maintenance when implemented in large networks. Most of the instructions for server packages will work, however, on the Server edition, the Desktop edition, or on a Server edition with an Ubuntu or Kubuntu desktop installed on top of it.
Ubuntu Server edition installation
- Download the latest Ubuntu Server ISO image from Ubuntu downloads.
- See this guide for burning the ISO image to a LiveCD.
- Use the LiveCD for installation of the Server edition.
Note that Jaunty Jackalope is not a long-term support version, and there are many changes from Hardy Heron to Jaunty Jackalope, including some new bugs in Jaunty Jackalope. Unless new features, such as Xen (virtualization) support or the Tomcat (Java) server, are desired, some users highly recommend 8.04 Hardy Heron's stability (especially if planning to use a server/KDE 3.5 desktop combination).
There are many server packages that are available for installation (from the installation menu) when using the LiveCD. It is not critical to install them at initial installation, however, because most of these server packages can later be added (as a one-step task) using the tasksel command. For a list of server packages that can be installed at any time using the tasksel command:
sudo tasksel --list-tasks
Add a desktop to an Ubuntu Server
You can add a GUI desktop to any Ubuntu Server edition. Packages that require server capabilities (such as Drupal with Apache, etc.) are often happier when a Server edition is installed as the base. If you will use a large number of server packages, it is best to install Ubuntu Server edition first and then install the Ubuntu (Gnome) or Kubuntu (KDE) desktop afterwards. Add a desktop to any existing Server edition installation with the commands:
sudo apt-get update sudo apt-get upgrade sudo apt-get install ubuntu-desktop
sudo apt-get install kubuntu-desktop
LAMP server installation
During server installation, you will have the option of installing a LAMP (Linux, Apache, MySQL, PHP) server stack. Many (but not all) open source servers use this integrated server stack. Drupal, for example, needs to have a LAMP server installed. If you intend to install a groupware server, however, make sure it is compatible with a LAMP server stack before choosing this option. Many groupware servers will install LAMP (or their own variation) automatically, so you do not need to install the LAMP stack. Others will install and use postgreSQL instead of MySQL, so you would not need to install a LAMP server. If you did not install a LAMP server stack at initial installation, you can do it at any time:
sudo tasksel install lamp-server
Ultimate Server Walkthrough
- Here is an installation walkthrough of an ultimate server for Ubuntu Jaunty. Using instructions from Ubuntuguide, this ultimate server has two wikis (MediaWiki), two Drupal websites, a Moodle online learning website, a BigBlueButton teleconferencing server, an Ubuntu desktop, and dynamic DNS access from the web. All components can be expanded and/or additional servers added.
- To run multiple servers on multiple computers on a LAN using only a single IP address and router, see this solution using reverse proxies in Apache.
During server installation, you can choose other servers to install, as well. These include a Mail server (Postfix with Dovecot), a DNS server (bind9), the OpenSSH server, a print server, a Tomcat Java web server, a Samba file server (for use with Windows networks), and a virtual machine host (Xen). Again, if you are using a groupware solution, you should be careful about installing these services, as they may conflict with similar (but competing) servers which the groupware solution will install by default.
OpenSSH allows encrypted communications through a designated secure port. The OpenSSH server can be installed as an option during the Ubuntu Server LiveCD installation. Alternatively, it can be installed at any time:
sudo apt-get install openssh-server
Note: An OpenSSH server can also be set up on a Windows server using Cygwin. See these instructions.
Limit authorized SSH users
OpenSSH Public Key Authentication
In brief, it is necessary to generate a public / private key pair. On your client machine, generate the pair:
A prompt asks for a passphrase. If you wish to use SSH without a password from a secure client (to which no one but you has access), leave the passphrase blank. If you enter a passphrase, you will be asked for this passphrase each time you use the SSH client. By default, a 2048-bit RSA key pair is generated and stored in the /home/user/.ssh folder. The private key is named id_rsa and is meant to stay in that folder. The public key is id_rsa.pub and is meant to be copied to the SSH server. On the SSH server, there is a similar folder /home/user/.ssh (for whichever user is hosting the SSH server). In that folder is a file called authorized_keys2. The contents of id_rsa.pub must be copied into that authorized_keys2 file. (You can use a text editor or can concatenate the files with the cat command).
To keep keys private, they should be accessible only to user, the owner of the file. For example,
chmod 600 /home/user/.ssh/id_rsa
This makes the file only accessible to user. You could also make the entire .ssh folder accessible only to user:
chmod 700 /home/user/.ssh
Postfix (Mail Server)
Postfix is a free open source mail server. It can be installed as the "Mail server" option when installing the Ubuntu server from the LiveCD. It interfaces directly to Dovecot, the free open source IMAP and POP3 server.
Bind9 (DNS server)
BIND DNS servers are the most commonly used on the Internet. Bind9 is the current edition and is installed by selecting the "DNS server" option when installing Ubuntu server from the LiveCD. See the usage instruction here, and also refer to the Ubuntu wiki or Ubuntu help page. You can install it at any time:
sudo tasksel install dns-server
Apache Tomcat (Java server)
It is not part of the Apache2 web server. Installation can be done by checking the "Install Tomcat server" option at the time of the initial Ubuntu server installation from LiveCD.
Xen virtual machine host
Xen is a free open source virtualization platform that allows the host to run "guest" operating systems simultaneously (see here for more info). Xen implementation in the (K)ubuntu server is based on integration with KVM, the kernel-based virtualization platform in Linux. KVM integrates with QEMU components, which have been merged with Xen.
Note: KVM requires a 64-bit processor with a virtualization extension, i.e. an Intel VT or AMD-V CPU, therefore this package currently is successful only with the 64-bit Ubuntu server installation and on those CPUs.
Installation can be done by checking the "Install virtual machine host" option at the time of the initial Ubuntu server installation from LiveCD.
Ubuntu uses the CUPS print server, which is integrated into the desktop. Installing a print server in Ubuntu Server is necessary only if you do not intend to use a desktop (i.e. you intend a "headless" server). Because this guide is orientated towards users who will install a Ubuntu desktop on top of the server, please see Ubuntu server documentation for this option.
Apache2 Webserver with PHP and Perl support
To install an Apache webserver (but not the entire LAMP stack) with both PHP and Perl CGI support, see this guide.
OpenLDAP is a community-based LDAP server that allows directory querying over TCP/IP, generally for organizations arranged by domain. Ubuntu uses the slapd daemon for the OpenLDAP server. See the official Ubuntu documentation for more information about installation and setup.
DAViCal Calendar Server
sudo apt-get install davical
Then see these detailed installation instructions.
Darwin Calendar Server
Darwin Calendar Server is an open-source port of Apple's CalDAV-based calendar server that works with Mozilla Thunderbird/Lightning/Sunbird, Evolution, and other calendar clients. Install version 1.2 from the repositories (then see the website for usage instructions):
sudo apt-get install calendarserver
WebCalendar is an ICS-based server for group calendars that can use many different databases as the backend, is written in PHP, and is compatible with clients such as Sunbird/Thunderbird (Lightning), Apple iCal, and Evolution. The newest version can also be viewed using RSS clients. See the website and the wiki for installing the newest (1.2) version. Install the older (1.05) version from the repositories:
sudo apt-get install webcalendar
Network Monitoring and Management
Monitor your network or datacenter with a framework of utilities. Comparable to IBM Tivoli (which can cost thousands of dollars), these solutions are generally available as either community or enterprise editions.
- Hyperic is an open-source network monitoring framework that can be used in either a datacenter or a cloud environment (it is used for Amazon Cloud). Both a free community version and a subscription enterprise version are available.
- Groundwork OpenSource offers a community edition that integrates other packages such as Nagios, Nmap, and others. There is a subscription enterprise version as well. It has its roots in a university setting.
- OpenQRM is the GPL-licensed, free open-source community successor to the very popular network monitoring solution Qlusters. It is available as a Debian/Ubuntu package. See the website for details.
- Canonical offers the Landscape network management service for $150 per node, with a free trial available.
- Zenoss is a commercial network monitoring subscription package (about $150/node) with a limited free "core" edition also available.
Nagios is a free open source network monitoring solution. It is available as a package installation in Ubuntu. It is administered from a web interface (http://localhost/nagios) and is expandable using a large number of available plugins. Install:
sudo apt-get install nagios3
Cacti Monitoring Server
Cacti is a complete, free open source network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. It uses MySQL and PHP (part of the LAMP server stack). All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with hundreds of devices. For more info see Cacti Server Setup.
Cluster (cloud) computing
Eucalyptus is a project from University of California Santa Barbara to facilitate cluster computing on Ubuntu servers that have Xen enabled. It has been included in the Jaunty Jackalope server edition, but is very much in development. It is not meant for mission-critical deployments at this time. See the website for details.
Create a root user password
Once you have completed installation of your (K)Ubuntu operating system, you can create a root user password. While performing actions as a root superuser is not recommended, at times it is easier to perform many system maintenance tasks at once as the root user.
- Create a root user password
sudo passwd root
- and enter the password you intend to use for root
- Login as the root user
Internet Cafe software
Internet Cafe (or CyberCafe) software is specialized LAN-administration software that includes time usage monitoring, billing, and administration. It can also be used in schools, libraries, and organizations with multiple monitored workstations requiring usage limits.
OutKafe is a free, open-source, GPL-licensed cybercafe solution based on a postgreSQL database server stack. It is run on hundreds of sites. It is GTK-based.
OpenKiosk is a free open source multi-platform server/client solution for administering and monitoring groups of workstations, such as in libraries, school labs, and internet cafes. Installation is from source files. See the website for details.
CafePilot is a free multi-platform Java-based server/client solution for real-time monitoring and billing of Cybercafe workstations. A complete custom Ubuntu-based LiveCD server/multiple-client solution (including OS and many applications for unlimited workstations) is available for $100 here.
Pessulus (Lockdown Editor)
Pessulus is a GTK (Gnome)-based utility that allows an a computer administrator to restrict acccess to several administrative functions, including the command-line Terminal and many other functions. This is useful on public kiosk PCs, for example. Install:
sudo apt-get install pessulus
Enterprise Network Firewall
IPCop is a free open source (GPL-licensed) firewall solution for use as an independent appliance (on a dedicated PC) in an enterprise network. It allows remote management and can protect multiple servers, including web and email servers. IPSec-based OpenVPN is supported. The CD image .iso and other files can be downloaded here. Installation instructions are on the website.
SmoothWall Express is an award-winning, free, open source (with a GPL license) firewall solution for use as an independent appliance (on a dedicated PC) in an enterprise network. Download the installation CD .iso image here (server OS included), burn onto a CD, and install on a new, dedicated PC. Many features, however, such as VPN server, database access authentications, and content filtering are only implemented in a commercial version, however, and are not available in the community version.
Endian is a very robust, free, open source universal threat management appliance similar to IPCop and Smoothwall. It also incorporates OpenVPN. Like Smoothwall, Dansguardian is used for content filtering (and is included in the community edition). Commercial and hardware versions with some additional features, automatic updates, and professional support are available. See the website for details.