Step-By-Step Guide Ubuntu 11.04 Natty Server Installation and Administration by krabah

VIEWS: 1,554 PAGES: 99

1.0 Introduction
In this Hands-on Labs session, we’re going to learn how to install, configure, administer and maintenance of the Linux Ubuntu 11.04 (Natty Narwhal) server option. It’s expected that Ubuntu 11.04, Natty Narwhal, will easily become the platform of choice for anybody who intends to build and deploy large-scale infrastructure, whether you're trying to build the next Facebook, or the next Google, or the next eBay. May be you want to start on [Amazon's cloud-platform] EC2 and migrate to your own managed private cloud, Ubuntu 11.04 is going to be the platform for you. The new Natty Narwhal now has a Default dhcpd server updated from dhcp3 to isc-dhcp (version 4), ISC (or Internet Sharing Connection) is the new dhcp-server.

Hand-on Solution:
In this Hands-on Lab session, you’ll learn how to setup virtual network on VMware (you may also use any other virtual machines like MS VirtualPC, Linux Xen, or VirtualBox from Oracle). In this lab session, we’ll concentrate on installing Linux Ubuntu 11.04 LTS Server which you can then later use to install any other applications as desired. You will learn how to install and configure Java jdk6, Apache2, Apache Tomcat6, MySQL server, PostgreSQL server, Configure SSL to secure Tomcat6. I’ll also show you how to setup static IP address and how to change hostname. You will also learn how to install GNOME Desktop, Webmin to help with installing, configuring and administrating application servers like, MySQL, FTP, DNS, DHCP, NFS etc. Finally, you’ll have an opportunity to do some assignment at the end of the lab session. When successfully done with this lab session you should have gained competence and capability to install and administer Ubuntu 11.04 Natty server and ability to extend it to implement other applications like Cloud computing with UEC, OSCAR EMR etc

More Info
									Global Open Versity ICT Labs                      Step-by-Step Install Guide Linux Ubuntu 11.04 Natty Server v1.1



                            Global Open Versity
            IT System Integration Hands-on Labs Training Manual

  Step-By-Step Guide Ubuntu 11.04 LTS (Natty) Server Installation
                       and Administration
                                         Kefa Rabah
                            Global Open Versity, Vancouver Canada
                                   krabah@globalopenversity.org
                                    www.globalopenversity.org

Table of Contents                                                                                     Page No.

STEP-BY-STEP GUIDE UBUNTU 11.04 LTS (NATTY) SERVER INSTALLATION AND
ADMINISTRATION                                                                                                  4

1.0 Introduction                                                                                                4

Part 1: Install & Configure Ubuntu 11.04 LTS Server                                                             5
  Step 1: Getting Started & Hardware Pre-requisites                                                             5
  Step 2: Install Linux Ubuntu 11.04 LTS                                                                        5
  Step 3: Update Ubuntu 11.04 Operating Systems                                                                20
  Step 4: Ubuntu: How to enable the root account (Optional)                                                    21
  Step 5: Install Desktop Environment (Optional)                                                               21
    The Classic Option:                                                                                        23
  Step 6: Install Apache2 (HTTP) Web Server                                                                    24
  Step 7: Install Webmin                                                                                       25

Part 2: Installing Additional Infrastructure Packages                                                          29
  Introduction                                                                                                 29
  Step 1: Install OpenSSH Package                                                                              29
  Step 2: Install Sun-Java6-JDK Package                                                                        30
  Step 3: Install Ant Package                                                                                  32
  Step 4: Install MySQL Database Server Package                                                                32
  Step 5: Install Apache Tomcat 6 Package                                                                      35
  Step 6: Configuring the Base Packages                                                                        36
  Step 7: Configuring Tomcat6                                                                                  37
  Step 8: Secure Apache Tomcat6 using SSL (now TLS)                                                            37
     8.1 Accessing Tomcat 6 manager and host-manager webapp                                                    39
     8.2 Tomcat Security                                                                                       41
     8.3 Tomcat examples webapps                                                                               42
     8.4 Moving around Tomcat6 under command-line                                                              42
     8.5 Change tomcat server to run on port 80 (Optional)                                                     43
     8.6: Deploy your first JSP pages on Tomcat6 Web Server                                                    43
  Step 9: Install PostgreSQL database server                                                                   45
     9.1 Configuring PostgreSQL                                                                                45
     9.2 Set PostgreSQL Password                                                                               46
     9.3 Modify PostgreSQL Authentication Method                                                               47
     94 Restart PostgreSQL Service                                                                             47
     9.4 Moving around youR PostgreSQL Database                                                                48
     9.5 Creating Database Users                                                                               49
     9.6 Creating and Working with PostgreSQL Database                                                         50
                                                                                                                1
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                                ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs                         Step-by-Step Install Guide Linux Ubuntu 11.04 Natty Server v1.1



    9.7 Get PostgreSQL Admin Guide                                                                                50
  Step 10: Install Pretty Good Privacy (PGP) Package                                                              51
  Step 11: Install CVS                                                                                            52
  Step 12: Install UNZIP Package                                                                                  52
  Step 13: Install Network Time Protocol (NTP) Service                                                            52
  Step 14: Reboot the server                                                                                      53

Part 3: Install PHP5 - Scripting Language                                                                         53
  Step 1: Install PHP5 with MySQL & PostgreSQL                                                                    53
  Step 2: Add PHP5 with MySQL & PostgreSQL Support                                                                54
  Step 3: PHP5 Configuration                                                                                      54
    3.1 Restart Apache 2 Server                                                                                   54
  Step 4: Testing                                                                                                 54

Part 4: Installing & configuring Shorewall firewall in Ubuntu/Debian                                              56
  Step 1: How to install                                                                                          56
  Step 2: Configuring Shorewall                                                                                   56
  Step 3: Zones Configuration                                                                                     57
  Step 4: Interfaces Configuration                                                                                58
  Step 5: Policy Configuration                                                                                    58
  Step 6: Rules Configuration                                                                                     59
  Step 7: Starting Shorewall and Logging Data                                                                     60

Part 5: Network File System (NFS)                                                                                 60
  Step 1: Install NFS Server                                                                                      60
  Step 2: NFS Server Configuration                                                                                61
  Step 3: NFS Client Configuration                                                                                61
    1. Mounting shared Drive                                                                                      61
    2. Method II                                                                                                  61

Part 6: Install and Configure Samba Share                                                                         62
  Step 1: Install SAMBA an Configure SAMBA Share                                                                  62
  Step 2: Create Shared Folders and Add SAMBA users                                                               63
  Step 3: Connecting to a Samba Machine in Linux                                                                  63
  Step 4: Accessing Samba Shares from Windows Desktop                                                             64
    Method 1: Use \\<ip-adress>\sharename                                                                         64
    Method 2: Via Entire Network                                                                                  66

Part 7: Ethernet Interfaces                                                                                       66
  Step 1: Identify Ethernet Interfaces                                                                            67
  Step 2: Ethernet Interface Logical Names                                                                        67
    Step 3: Ethernet Interface Settings                                                                           68
    Step 4: Temporary IP Address Assignment                                                                       69
  Step 5: Dynamic IP Address Assignment (DHCP Client)                                                             70
    Step 6: Loopback Interface                                                                                    70
  Step 7: Name Resolution                                                                                         71
    7.1 DNS Client Configuration                                                                                  71
    Ste 8: Static Hostnames                                                                                       72
  Step 9: Name Service Switch Configuration                                                                       72
  Step 10: Bridging                                                                                               73

Part 8: Install and Configure DNS Server                                                                          75
  Step 1: Configure Network Interface                                                                             75
  Step 2: Change system hostname                                                                                  77
  Step 3: Modify “/etc/hosts” and “/etc/resolv.conf” files                                                        78

                                                                                                                   2
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                                    ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs                      Step-by-Step Install Guide Linux Ubuntu 11.04 Natty Server v1.1



  Step 4: Install and Configure Bind9 for DNS Name Resolution                                                  78
    4.1 Name Resolution                                                                                        78
    4.2 Install & Configure Bind9 DNS server                                                                   78

Part 9: Alternative Method for Installing Servers & Applications on Ubuntu using Tasksel                       81
  Step 1: Tasks List                                                                                           81
  Step 2: Tasksel Usage                                                                                        82
  Step 3: Command line arguments                                                                               82

Part 10: Install & Configure an FTP Server on Ubuntu with ProFTPD                                              83
  Step 1: ProFTPD Features                                                                                     83
  Step 2: Install ProFTPD Server in Ubuntu                                                                     84
  Step 3: Configuring ProFTPD Server                                                                           85
  Step 5: Proftp Client Installation                                                                           86
  Step 6: Login to FTP Server                                                                                  86
  Step 7: Accessing Public FTP Sites                                                                           87
  Step 8: FTP to your personal folder on the Netlabszone network (your H: drive) or Home folder                88
  Step 9: Uploading and Downloading                                                                            90

Part 11: Install & Configure DHCP Server                                                                       90
  Step 1: Install DHCP Server                                                                                  90
  Step 2: Configuring DHCP Server                                                                              90
  Step 3: Define the Interface DHCP Listens on                                                                 92
  Step 4: Modify “dhcpd.conf” file                                                                             92
  Step 5: Using MAC address method                                                                             94
  Step 6: Configure Ubuntu DHCP Client                                                                         95
  Step 7: How to find DHCP server IP address                                                                   96

Part 12: Need More Training on Linux:                                                                          97
  Ubuntu Server Administration Training                                                                        97
  MySQL Database with PHP                                                                                      97

Part 13: Hands-on Labs Assignments                                                                             98




A GOV Open Access Technical Academic Publications
Enhancing education & empowering people worldwide through eLearning in the 21st Century

                                                                                                                3
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                                ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs                     Step-by-Step Install Guide Linux Ubuntu 11.04 Natty Server v1.1



                            Global Open Versity
           IT Systems Integration Hands-on Labs Training Manual

              Step-By-Step Guide Ubuntu 11.04 LTS (Natty) Server
                         Installation and Administration
By Kefa Rabah, krabah@globalopenversity.org                July, 2011                         GTS Institute



1.0 Introduction
In this Hands-on Labs session, we’re going to learn how to install, configure, administer and maintenance
of the Linux Ubuntu 11.04 (Natty Narwhal) server option. It’s expected that Ubuntu 11.04, Natty Narwhal,
will easily become the platform of choice for anybody who intends to build and deploy large-scale
infrastructure, whether you're trying to build the next Facebook, or the next Google, or the next eBay. May
be you want to start on [Amazon's cloud-platform] EC2 and migrate to your own managed private cloud,
Ubuntu 11.04 is going to be the platform for you. The new Natty Narwhal now has a Default dhcpd server
updated from dhcp3 to isc-dhcp (version 4), ISC (or Internet Sharing Connection) is the new dhcp-server.
It’s important to also note that Ubuntu 11.04 is going to be the first release that will comprise of the
OpenStack open source cloud platform in addition to the Eucalyptus platform. That is, it will now provide a
new set of choices for the cloud deployment platform for developers of Linux. Users can now think of
Ubuntu as a cloud native Linux platform.

There are some great feature e.g., the ease-of-use that the Ubuntu 11.04 (Natty Narwhal) release has
brought with it. One of these changes is the ability to allow the automatic installation of Flash, closed-
source drivers, and support for MP3 and other non-free media while installing Ubuntu. Ubuntu Server
delivers services reliably, predictably and economically, and easily integrates with your existing
infrastructure. It has almost 100 open-source and proprietary application providers certifying their
programs on Ubuntu Server Edition. Ubuntu 11.04 includes Alfresco, Ingres, IBM, VMware, Yahoo and
Zimbra. It also includes improved installation and management tools for Ubuntu Enterprise Cloud (UEC)
and Amazon EC2.

Eucalyptus is now the latest stable point release (2.0.2) with security and efficiency fixes. Cloud-init has
been updated to 0.60. It includes support for resizing of the root file system at first boot, adds minimal
OVF transport (iso) support and allows setting of hostname when first booting. Rightscale support has
been added to cloud-config and cloud-init. Cloud images now have support for being run as an LXC guest.
Some of the supporting technologies that have been packaged, these are Cassandra 0.7.0, ZeroMQ,
Membase, and XtraBackup.

Hand-on Solution:
In this Hands-on Lab session, you’ll learn how to setup virtual network on VMware (you may also use any
other virtual machines like MS VirtualPC, Linux Xen, or VirtualBox from Oracle). In this lab session, we’ll
concentrate on installing Linux Ubuntu 11.04 LTS Server which you can then later use to install any other
applications as desired. You will learn how to install and configure Java jdk6, Apache2, Apache Tomcat6,
MySQL server, PostgreSQL server, Configure SSL to secure Tomcat6. I’ll also show you how to setup
static IP address and how to change hostname. You will also learn how to install GNOME Desktop,

                                                                                                               4
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                               ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs                     Step-by-Step Install Guide Linux Ubuntu 11.04 Natty Server v1.1



Webmin to help with installing, configuring and administrating application servers like, MySQL, FTP, DNS,
DHCP, NFS etc. Finally, you’ll have an opportunity to do some assignment at the end of the lab session.
When successfully done with this lab session you should have gained competence and capability to install
and administer Ubuntu 11.04 Natty server and ability to extend it to implement other applications like
Cloud computing with UEC, OSCAR EMR etc.


Part 1: Install & Configure Ubuntu 11.04 LTS Server

Step 1: Getting Started & Hardware Pre-requisites
Ubuntu runs on inexpensive, commodity hardware. To support a small practice like OSCAR EMR, web-
server etc., we recommend a minimum configuration of 200Gb Disk, 2Gb RAM, and a 2GHz Intel Dual
Core CPU. For maximum subsystem compatibility, we suggest that you install the 32bit version of Ubuntu.
If you are purchasing a computer to run e.g., OSCAR EMR, one option is to order the machine with
Ubuntu pre-installed.

In this Hands-on Labs, it’s assumed that your target computer is connected to the internet. After installing
the operating system, log into your machine and ensure you can perform software updates to bring your
system up-to-date.


Step 2: Install Linux Ubuntu 11.04 LTS

1. Hope over to http://www.ubuntu.com/download/server/download website and download the Linux
   Ubuntu 11.04 64-bit ISO which at the time of writing this lab manual was "Ubuntu-11.04-server-
   i386.iso" or change as desired.

2. Once you have downloaded the Ubuntu ISO specific to your distribution, you have the option to
   burning it into CD or just by using the ISO package to install it from your virtual machine, in our case
   VMware.

3. Fire-up a new virtual machine and perform the initial configuration and setup to use ISO package.

4. Start the virtual machine, and you should be able to see the first Ubuntu installation screen.

5. From Fig. 1, select the language desired and hit Enter key.




                                                                                                               5
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                               ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs                     Step-by-Step Install Guide Linux Ubuntu 11.04 Natty Server v1.1




                                                                                    Fig. 1
6. From Fig. 2, select the option desired and then hit the Enter key to commence installation. In our case
   we have selected to Install Ubuntu Server option.




                                                                                                 Fig. 2

7. From Fig. 3, Choose language screen, select English option, and hit the Enter key.




                                                                                                               6
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                               ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs                     Step-by-Step Install Guide Linux Ubuntu 11.04 Natty Server v1.1




                                                                                                 Fig. 3

8. From Fig. 4, Choose language screen, Choose a country, select United States option, and hit Enter




                                                                                                     Fig. 4

                                                                                                               7
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                               ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs                     Step-by-Step Install Guide Linux Ubuntu 11.04 Natty Server v1.1




9. From the Ubuntu installer main menu screen, Fig. 5, accept the default selected <No> and hit the
   Enter key to continue.




                                                                                                     Fig. 5



10. From the Ubuntu installer main menu screen, Fig. 6, Origin of keyboard, select USA and hit
    the Enter key to continue.




                                                                                                     Fig. 6


11. From the Ubuntu installer main menu screen, Fig. 7, Keyboard layout, select USA and hit the
    Enter key to continue.




                                                                                                               8
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                               ICT105 – Ubuntu Server Administration Training
Global Open Versity ICT Labs                       Step-by-Step Install Guide Linux Ubuntu 11.04 Natty Server v1.1




                                                                                                     Fig. 7


12. From Fig. 8, the Detecting hardware to find CD-ROM drives screen, wait for the system complete
    the process.




    Fig. 8: System Detecting hardware to find CD-ROM drives


13. From Fig. 9, the Loading additional components screen, wait for the system complete the process.




    Fig. 9: System Loading additional components




                                                                                                                 9
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                                 ICT105 – Ubuntu Server Administrat
								
To top