模板:Lucid/Servers

来自Ubuntu中文
Oneleaf留言 | 贡献2010年6月25日 (五) 10:31的版本 (以内容'= Servers = Many server packages (such as Apache2, MySQL, PHP, etc.) can be installed individually, on either a Desktop edition or a Server edition (using the tasksel comma…'创建新页面)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索

Servers

Many server packages (such as Apache2, MySQL, PHP, etc.) can be installed individually, on either a Desktop edition or a Server edition (using the tasksel command described below). It is not necessary in general, therefore, to install Ubuntu Server if you only wish to use an occasional server package on a Desktop edition. Most of the instructions for individual server packages will work on the Server edition, on the Desktop edition, or on a Server edition that has had an Ubuntu or Kubuntu desktop installed on it.

Nevertheless, the Server edition is optimised for speed and ease of monitoring and maintenance when implemented in large networks and is therefore recommended. (For complete information see the Ubuntu Server Guide.) It is always possible to add an Ubuntu (Gnome) or Kubuntu (KDE) GUI desktop to an Ubuntu Server at any time.

(If you are attempting to create a dual-boot or multi-boot configuration with multiple operating systems on your computer, then see these tips.)

(Tip: During installation of the server, an initial user / password is created. Many servers are intended to run unattended with little subsequent intervention and it can be easy to forget the original user / password pair that is created at installation. I suggest writing this information down and taping it to the inside of the computer case cover for later reference. (Lock the computer case if you desire extra security.))

There are many server packages that are available to be installed during the Server edition installation process (from the LiveCD menu). It is not critical to install them at the outset, however, because they can also 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

Ultimate Server Walkthrough

  • Here is an installation walkthrough of an ultimate server for Ubuntu. 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.

Add a desktop to an Ubuntu Server

Packages that require server capabilities (such as Drupal with Apache, etc.) are often happier when a Server edition is installed as the base OS. However, adding a desktop can make the administration and maintenance of many packages easier for many users (albeit with a cost of reduced server speed). Add an Ubuntu (Gnome) or Kubuntu (KDE) desktop to a server using:

sudo apt-get install ubuntu-desktop
or
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.

Apache2 + MySQL + PHP

This is the preferred method:

sudo tasksel install lamp-server

(Tip: During installation of the LAMP server, an initial MySQL "root" user password is created. This information will sometimes be needed when installing other server packages that use MySQL. I suggest writing the MySQL password down and taping it to the inside of the computer case cover for later reference. (Lock the computer case if you desire extra security.))

Other servers

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.

eBox (server and network manager)

eBox is a web-browser based server management platform that is useful in managing multiple servers and networking functions in a small to medium business. It is modular so that as the network grows and more networking functions or servers (such as the ones listed below) are added, eBox can manage those, as well. Install:

sudo apt-get install ebox

OpenSSH server

OpenSSH allows encrypted communications through a designated secure port. The OpenSSH server also can be installed as an option during the Ubuntu Server LiveCD installation. Also see setting up an SSH server. Install:

sudo tasksel install openssh-server

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.

Apache Tomcat (Java server)

Tomcat is a free open source platform from Apache which provides a "pure Java" HTTP web server environment for Java code to run (see here for more info).

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.

Print server

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

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.

NOTE: Above URL is largely not applicable to Karmic's openldap installation (2.4.18-0ubuntu1 and probably going forward) as it is significantly different from the one from Jaunty. There is essentially no initial database and dpkg-reconfigure will not help you set it up. If anyone has a working howto or a more official guide for this version, please update this.