Introduction to Ubuntu Linux - Getting Started - Ubuntu 15.04 Server with systemd: Administration and Reference (2015)

Ubuntu 15.04 Server with systemd: Administration and Reference (2015)

Part I. Getting Started

Chapter 1. Introduction to Ubuntu Linux

Ubuntu Linux is currently one of the most popular end-user Linux distributions (www.ubuntu.com). Ubuntu Linux is managed by the Ubuntu foundation, which is sponsored by Canonical, Ltd (www.canonical.com), a commercial organization that supports and promotes open source projects. Ubuntu is based on Debian Linux, one of the oldest Linux distributions, which is dedicated to incorporating cutting-edge developments and features (www.debian.org). Mark Shuttleworth, a South African and Debian Linux developer, initiated the Ubuntu project. Debian Linux is primarily a Linux development project, trying out new features. Ubuntu provides a Debian-based Linux distribution that is stable, reliable, and easy to use.

Ubuntu is designed as a Linux operating system that can be used easily by everyone. The name Ubuntu means "humanity to others." As the Ubuntu project describes it: "Ubuntu is an African word meaning 'Humanity to others", or "I am what I am because of who we all are." The Ubuntu distribution brings the spirit of Ubuntu to the software world."

The official Ubuntu philosophy lists the following principles.

1. Every computer user should have the freedom to download, run, copy, distribute study, share, change, and improve their software for any purpose, without paying licensing fees.

2. Every computer user should be able to use their software in the language of their choice.

3. Every computer user should be given every opportunity to use software, even if they work under a disability.

The emphasis on language reflects Ubuntu's international scope. It is meant to be a global distribution that does not focus on any single market. Language support has been integrated into Linux in general by its internationalization projects, denoted by the term i18n. You can find information about il8n at http://www.openi18n.org.

Making software available to all users involves both full accessibility supports for users with disabilities, as well as seamless integration of software access using online repositories, making massive amounts of software available to all users at the touch of a button. Ubuntu also makes full use of Linux's automatic device detection ability, greatly simplifying installation as well as access to removable devices and attached storage.

Ubuntu aims to provide a fully supported and reliable, open source and free, easy to use and modify, Linux operating system. Ubuntu makes the following promises about its distribution.

Ubuntu will always be free of charge, including enterprise releases and security updates.

Ubuntu comes with full commercial support from Canonical and hundreds of companies around the world.

Ubuntu includes the very best translations and accessibility infrastructure that the free software community has to offer.

Ubuntu CDs and DVDs contain only free software applications; we encourage you to use free and open source software, improve it and pass it on (Ubuntu repositories contain some proprietary software like vendor graphics drivers that is also free).

Ubuntu provides both long-term and short-term support releases. Long-term support releases (LTS), such as Ubuntu 12.04, are released every two years. Short-term releases, such as 15.04, are provided every six months between the LTS versions. They are designed to make available the latest applications and support for the newest hardware. Each has its own nickname, like Vivid Vervet for the 15.04 release. The long-term support releases are supported for three years for desktops and five years for servers, whereas short-term support releases are supported for 18 months. In addition, Canonical provides limited commercial support for companies that purchase it.

Installing Ubuntu is easy to do. A core set of applications are installed, and you can add to them as you wish. Following installation, additional software can be downloaded from online repositories. There are only a few install screens, which move quickly through default partitioning, user setup, and time settings. Hardware components, such as graphics cards and network connections, are configured and detected automatically.

All Linux software for Ubuntu is currently available from online repositories. You can download applications for desktops, Internet servers, office suites, and programming packages, among others. Software packages are distributed primarily through the official Ubuntu repository. Downloads and updates are handled automatically by your desktop software manager and updater.

Ubuntu Server

Those who want to run Ubuntu as a server in order to provide an Internet service such as a Web site, would use the Ubuntu Server edition. The Ubuntu Server is a collection of Linux servers, like those for a Web or FTP site, as well as networking support like a DNS server. The Ubuntu Server CD will install the Ubuntu versions of the Linux servers, with a command line interface. Keeping just the command line interface provides significant efficiency gains for intensely used servers. The server edition also provides Cloud computer support. Ubuntu maintains its own site for the server edition at:

http://www.ubuntu.com/server/

You can download the Server edition from:

http://www.ubuntu.com/download/server/

The http://releases.ubuntu.com site holds Ubuntu Server CD download configuration files for BitTorrent, jigdo, and metalink downloads from multiple mirrors, and zsync files for synchronizing downloads.

For more detailed information on configuration and management check the Ubuntu Server Guide for Ubuntu 15.04 at:

https://help.ubuntu.com/stable/serverguide/index.html

The Server edition provides only a simple command line interface; it does not install the desktop. It is designed primarily to run servers. You could, however, just install the servers individually on a standard Ubuntu Desktop, and then install the optimized Ubuntu linux server kernel for use on the desktop. You do not have to install the Server edition to install and run servers.

Ubuntu 15.04 Server Installation Alternatives and Options

There are several ways to install the Ubuntu server software. It is recommended that you install using the Ubuntu Server CD. This release holds a version of the Linux kernel that has been optimized for use by servers. The Server CD though does not install a desktop. You are provided the command line interface only. The aim is to provide a streamlined and efficient server with as little overhead as possible. Desktops, with their X Windows System, include a lot of overhead.

One important drawback to the Server CD is that, without the desktop, you will not be able to use many of the desktop server configuration tools. These tools often provide a very effective and simple way to configure your servers. Ubuntu will perform basic automatic configuration designed for Ubuntu. With the just the command line interface, though, you will have to perform any additional configuration using the command line editors, working directly on the various server configuration files.

Server on the desktop installation

As an alternative you could install the Desktop DVD and then just install the server kernel and the server packages from the Ubuntu repository, instead of from the Server CD. All the servers are available on the Ubuntu repository, as well as the optimized server kernel.

The name of the server kernel meta package is:

linux-server

Once installed, an entry will be placed for it in the GRUB menu. Your desktop kernel will remain. You can choose to boot with either.

This configuration still starts up the X Windows System, involving much more overhead. You end up running much more software than the servers actually need to use.

If you are running servers for a small or home network, the overhead involved with the desktop is not significant. Most likely your servers will be lightly used. At the same time the additional support provided by the desktop server configuration tools would be extremely helpful.

Desktop on the Server installation

You could install the Server CD and then later install the Ubuntu desktop from the Ubuntu repository. This would provide you with the optimized server kernel, and still give you desktop support. You can install either the complete Ubuntu desktop or just the minimal GNOME desktop interface.

Minimal GNOME desktop

If you want to install just a minimal GNOME desktop, you would install the GNOME core, xauth, and xorg (X server) package. The following command will install the core GNOME desktop, GNOME without few added applications. Be sure to update your package listing first. It is recommended, though, that you install the Ubuntu desktop instead, for greater compatibility.

sudo apt-get update
sudo apt-get install gnome-core xauth xorg

The gnome-core package is now dependent on the GNOME GDM Display Manager (lightdm package), which it will install, running the X server. The initial default desktop will be Ubuntu, which is not installed, so change the desktop to GNOME in the login window.

Other than the GNOME preference tools and the text editor, no additional software is installed, including administrative tools. You may want to install the Synaptic Package Manager (software management), the GNOME terminal, GNOME system tools (user and time management), gnome-utils (log viewer), the GNOME disk utility, and the update manager as shown here.

sudo apt-get install synaptic gnome-terminal gnome-system-tools gnome-utils gnome-disk-utility update-manager

In addition, there are several administrative tools you may want, like system-config-printer-gnome, system-config-samba, and gnome-nettool.

sudo apt-get install system-config-printer-gnome system-config-samba gnome-nettool

The basic GNOME theme is installed. If you want to use the Ubuntu Ambiance or Radiance themes, install the light-themes package, and then open Applications | System Tools | System Settings, Appearance, and choose the Themes tab to change to the Ubuntu Ambiance or Radiance themes.

sudo apt-get install light-themes

Should you want to use the Hardware drivers, you can install jockey-gtk. For a Web browser you can install the firefox or epiphany-browser packages.

sudo apt-get install firefox

ubuntu-desktop

For desktop features, it is recommended that you install the entire Ubuntu desktop. The Ubuntu desktop will install the complete set of desktop packages, including multimedia and graphics packages, which you may have no use for on your server. The added packages do not degrade the server; they just take up additional disk space (about 1 GB or more). At the same time, the Ubuntu desktop also installs all the administrative packages you may want to use, like the Synaptic Package Manager, Network Manager, User and Group management, and the Update manager.

You install the Ubuntu desktop using the ubuntu-desktop meta-package and the tasksel software management tool (you could also use apt-get). Run tasksel with the sudo command and then use the arrow keys to move to the Ubuntu Desktop entry and press the spacebar. Then tab to the OK button and press ENTER.

sudo tasksel

You also could use apt-get with the ubuntu-desktop meta-package, as shown here.

sudo apt-get install ubuntu-desktop

Download and setup can take an hour or more. You then logout and restart your system. The LightDM will start up as shown in Figure 3-2 .

Note: You could also perform installations of the KDE or XFCE desktops, using either of them instead of GNOME. For XFCE install xfce4 with xauth and xorg. For a minimal KDE desktop, install the kdebase package with xauth and xorg. For the complete KDE desktop, including the KDM login screen, install the kubuntu-desktop package.

Server install options

To recap, your options are:

Server cd only with server optimized kernel, but using the command line interface alone. No support or access to server desktop configuration tools.

Server cd first, giving you the server optimized kernel, and then installing the minimal GNOME desktop from the Ubuntu repository (gnome-core, xauth, xorg), which installs the GDM display manager. Install added packages you may want, like gnome-utils, gnome-system-tools,gnome-nettool, and light-themes.

Server cd first, giving you the server optimized kernel, and then installing the Ubuntu Desktop from the Ubuntu repository (ubuntu-desktop). Will implement automatic X Window System startup for LightDM.

Desktop DVD first, and then install server kernel (linux-server) and server packages from the Ubuntu repository using Synaptic Package Manager. You will always have the X Window System running as additional overhead. But, you can use server desktop configuration tools and desktop editors. Efficiency degradation would be minor for a small or home network.

Choose the option that works best for you. Keep in mind that you do not need the Server cd to run servers. All the servers on the Server cd are available on the Ubuntu repository and can be run from any desktop install. What you would lose is the optimized server kernel, which is not needed for small or home networks, or which you can install and use later.

Also, unless you are performing a professional install or are comfortable with editing configuration files directly, you should not underestimate the help that server desktop configuration tools can provide. There are very good tools for local network servers like NFS, CUPS, and Samba. There are few for Internet servers like Apache and FTP, and most of these are too simple with few options. For most heavy duty Internet servers, direct editing of server configuration files will be required.

Ubuntu 15.04 Features

Check the Ubuntu Release Notes for an explanation of changes. For the Ubuntu server, there are key changes to the Apache Web server.

https://wiki.ubuntu.com/VividVervet/ReleaseNotes

Ubuntu 15.04 Server includes the following features.

There are key changes to the configuration directories and files for the Apache 2.4 Web server.

systemd replaces SysVinit and Upstart as the system and session manager. systemd uses unit file located in the /lib/systemd/system and /etc/systemd/system directories to manage services, filesystems, and device.

Some sevices, such as Apache, still install SysV init scripts in the /etc/init.d directory. These are used to generate systemd files automatically, which are placed in the /run/system/generator.late directory.

Ubuntu 15.04 server images are available on the Amazon EC2 cloud, and are listed on the Ubuntu Cloud Images site at: http://cloud-images.ubuntu.com. A Web browser is required.

Ubuntu 15.04 server images are available for use on the Ubuntu OpenStack and the Amazon EC2 cloud: http://www.ubuntu.com/ cloud and https://help.ubuntu.com/community/EC2StartersGuide.

Metal as a Service (MAAS) allows you to deploy, manage, log, and monitor multiple services. It is designed for use on enterprise data centers, and installs provisioning,

Security features: see https://wiki.ubuntu.com/Security/Features for documentation, including topics like AppArmor, firewalls, filesystem encryption, and hardware security (hardening).

Managing Systems with Landscape

Landscape is Ubuntu's administration and monitoring management service accessed through a hosted Web interface. You can register online with Ubuntu for the Landscape service. With Landscape you can administer, monitor, and maintain machines on your network, as well as install and update hosts software. You can find out more about Landscape at:

http://www.ubuntu.com/management

Machines can be organized into groups, letting you install packages on different groups. Your custom repository can be accessed directly with Landscape, using it to install software on your machines. You can also manage users and servers, adding and removing users, as well as starting and stopping servers.

Landscape also installs its own monitoring application on each machine, providing reports on usage, hardware status, and performance. You can also manage processes, detecting those that use the most resources.

In addition, Landscape supports cloud computing, letting you manage instances of a system on a cloud as you would machines on your network. Landscape can manage Ubuntu instances on the Amazon EC2 cloud and on the Ubuntu Cloud Infrastructure.

Ubuntu Linux Help and Documentation

A great deal of help and documentation is available online for Ubuntu, ranging from detailed install procedures to beginner questions (see Table 1-1 ). The documentation for Ubuntu 15.04 is located at https://help.ubuntu.com/15.04/. This site includes the Ubuntu Server Guide. The Firefox Web browser start page displays links for two major help sites: Ubuntu documentation at https://help.ubuntu.com and Ubuntu Community at http://community.ubuntu.com. For answers to commonly asked questions check http://askubuntu.com/. It provides detailed answers to many technical issues.

For detailed online support use the Ubuntu forums at http://ubuntuforums.org. In addition, there are blog and news sites as well as the standard Linux documentation. Ubuntu Community features Ubuntu documentation, support, blogs, and news. A Contribute section links to sites where you can contribute to development, artwork, documentation, and support.

For mailing lists, check https://lists.ubuntu.com. There are lists for categories like Ubuntu announcements, community support for specific editions, and development for areas like the desktop, servers, or mobile implementation. For more specialized tasks like Samba support and LAMP server installation, check http://www.ubuntugeek.com.

Site

Description

https://help.ubuntu.com

Help for the desktop, server, and installation

http://packages.ubuntu.com

Ubuntu software package list and search

http://ubuntuforums.org

Ubuntu forums

http:/askubuntu.com/

Answers to commonly asked questions

http://www.tldp.org

Linux Documentation Project Web site

http://community.ubuntu.com/

Links to Documentation, Support, News, and Blogs

https://lists.ubuntu.com

Ubuntu mailing lists

Table 1-1: Ubuntu help and documentation

help.ubuntu.com

Ubuntu-specific documentation is available at https://help.ubuntu.com. Here on listed links you can find specific documentation for different releases. Always check the release help page first for documentation, though it may be sparse and cover mainly changed areas. The Ubuntu LTS release usually includes desktop, installation, and server guides. For 15.04 the Documentation section provides the Ubuntu Desktop Guide (Ubuntu Desktop Help) and the Ubuntu Server Guide.

One of the more helpful pages is the Community Contributed Documentation page, https://help.ubuntu.com/community. Here you will find detailed documentation on installation of Ubuntu releases, using the desktop, installing software, and configuring devices. Always check the page for your Ubuntu release first.

ubuntuforums.org

Ubuntu forums provide detailed online support and discussion for users (http://ubuntuforums.org). An Absolute Beginner section provides an area where new users can obtain answers to questions. Sticky threads include both quick and complete guides to installation for the current Ubuntu release. You can use the search feature to find discussions on your topic of interest. The main support categories section covers specific support areas like networking, multimedia, laptops, security, and 64-bit support.

Other community discussions cover ongoing work such as virtualization, art and design, gaming, education and science, Wine, assistive technology, and the Ubuntu cloud. Here you will also find community announcements and news.

The forum community discussion is where you can talk about anything else. The http://ubuntuforums.org/ site also provides a gallery page for posted screenshots as well as RSS feeds for specific forums.

Linux documentation

The Linux Documentation Project (LDP) has developed a complete set of Linux manuals. The documentation is available at the LDP home site at http://www.tldp.org. The Linux documentation for your installed software will be available at your /usr/share/doc directory.