step-by-step install guide ubuntu 9.10 karmic server

36

Upload: kefa-rabah

Post on 06-Apr-2015

326 views

Category:

Documents


3 download

DESCRIPTION

1.0 Introduction In this Hands-on Labs session, we’re going to lean how to install & configure the Karmic Koala a.k.a Ubuntu 9.10 LTS server option. It’s lean, fast and powerful – Ubuntu 9.10 Server Edition has a bunch of other features that have been tweaked and improved. The server edition includes the MySQL 5.1 database, tighter integration with the PowerNap server quiescing tool, and support for the Web-Based Enterprise Management protocol (WBEM), so system management tools from the major server makers (IBM, Dell, and Hewlett-Packard) as well as those from CA can reach in and monitor and manage Ubuntu as they do other operating systems. The 9.10 server update also sports performance improvements for both the KVM and Xen hypervisors. Just because KVM is the preferred hypervisor doesn't mean Canonical has to ignore Xen, just like Red Hat, which owns the KVM hypervisor (well, essentially) is still tweaking Xen with its releases. ®. It also includes improved installation and management tools for Ubuntu Enterprise Cloud (UEC) and Amazon EC2. You don't have to do anything special to get the Ubuntu Enterprise Cloud tools. They are part of the Ubuntu Server 9.10 distribution. For example, people who have been exploring cloud computing do not have rely only to the public clouds – the UEC allows individuals and companies to build private cloud internally first, and then think about how to make use of public clouds like EC2. Amazon EC2-compatible Ubuntu Enterprise Cloud.Hands-on LabsIn 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 9.10 LTS Server which you can then later use to install any other applications as desired. You will learn how to pre-install DNS server, LAMP server, Mail server, OpenSSL server, PostgreSQL database, Tomcat Java Server during the initial system installation. Once you installed and updated the server, then you can use it to install GNOME Desktop, LAMP; DNS server, Postfix mail server with Dovecot for POP3/IMAP, Evolution mail client, and Webmin to help you with administrating and configuring other application servers like Apache2, MySQL, FTP, DNS etc. You’ll also have opportunity to learn some troubleshooting techniques and also do some lab assignments at the end of the lab session.

TRANSCRIPT

Page 1: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server
Page 2: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

1

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

Step-By-Step Install Guide Ubuntu 9.10 (Karmic Koala) Server

Kefa Rabah Global Open Versity, Vancouver Canada

[email protected] www.globalopenversity.org

Table of Contents Page No.

STEP-BY-STEP INSTALL GUIDE UBUNTU 9.10 (KARMIC KOALA) SERVER 1

1.0 Introduction 1

Part 1: Install & Configure Ubuntu 9.10 LTS (Karmic Koala) Server 1 Step 1: Getting Started & Hardware Pre-requisites 1 Step 2: Install Linux Ubuntu 9.10 Karmic Koala 2 Step 3: Update Ubuntu 9.10 Operating Systems 20

Part 2: Install Optional Additional Packages 21 Step 1: Install Desktop Environment 21

Part 3: Verify Your LAMP Server Installation 23 Step 1: Installing Apache + PHP 23 Ste 2: Installing MySQL Database Server 24

2.1 Manually Creating users to use MySQL and Changing Root Password 24 Step 3: Install phpMyAdmin 26

Part 4: Install OpenSSH Package 29

Part 5: Install Webmin 30

Part 6: Need More Training on Linux: 33 Ubuntu Server Administration Training 34

Part 7: Hands-on Labs Assignments 34 A GOV Open Access Technical Academic Publications Enhancing education & empowering people worldwide through eLearning in the 21st Century

Page 3: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

1

Global Open Versity

IT Systems Integration Hands-on Labs Training Manual

Step-By-Step Install Guide Ubuntu 9.10 (karmic Koala) Server By Kefa Rabah, [email protected] Dec. 8, 2010 GTS Institute

1.0 Introduction In this Hands-on Labs session, we’re going to lean how to install & configure the Karmic Koala a.k.a Ubuntu 9.10 LTS server option. It’s lean, fast and powerful – Ubuntu 9.10 Server Edition has a bunch of other features that have been tweaked and improved. The server edition includes the MySQL 5.1 database, tighter integration with the PowerNap server quiescing tool, and support for the Web-Based Enterprise Management protocol (WBEM), so system management tools from the major server makers (IBM, Dell, and Hewlett-Packard) as well as those from CA can reach in and monitor and manage Ubuntu as they do other operating systems. The 9.10 server update also sports performance improvements for both the KVM and Xen hypervisors. Just because KVM is the preferred hypervisor doesn't mean Canonical has to ignore Xen, just like Red Hat, which owns the KVM hypervisor (well, essentially) is still tweaking Xen with its releases. ®. It also includes improved installation and management tools for Ubuntu Enterprise Cloud (UEC) and Amazon EC2. You don't have to do anything special to get the Ubuntu Enterprise Cloud tools. They are part of the Ubuntu Server 9.10 distribution. For example, people who have been exploring cloud computing do not have rely only to the public clouds – the UEC allows individuals and companies to build private cloud internally first, and then think about how to make use of public clouds like EC2. Amazon EC2-compatible Ubuntu Enterprise Cloud. Hands-on Labs 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 9.10 LTS Server which you can then later use to install any other applications as desired. You will learn how to pre-install DNS server, LAMP server, Mail server, OpenSSL server, PostgreSQL database, Tomcat Java Server during the initial system installation. Once you installed and updated the server, then you can use it to install GNOME Desktop, LAMP; DNS server, Postfix mail server with Dovecot for POP3/IMAP, Evolution mail client, and Webmin to help you with administrating and configuring other application servers like Apache2, MySQL, FTP, DNS etc. You’ll also have opportunity to learn some troubleshooting techniques and also do some lab assignments at the end of the lab session.

Part 1: Install & Configure Ubuntu 9.10 LTS (Karmic Koala) Server

Step 1: Getting Started & Hardware Pre-requisites

Ubuntu runs on inexpensive, commodity hardware. To support a small practice like OSCAR, 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

Page 4: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

2

you are purchasing a computer to run OSCAR, 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 perform software updates to bring your systems up-to-date.

Step 2: Install Linux Ubuntu 9.10 Karmic Koala

1. Hope over to http://releases.ubuntu.com/karmic/. website and download the Linux Ubuntu 9.10 32-bit ISO which at the time of writing this lab manual was "Ubuntu-9.10-server-i386.iso"

2. Once you have downloaded the Ubuntu ISO specific to your distribution, you have the option 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.

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.

Page 5: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

3

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

Fig. 3

Page 6: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

4

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

Fig. 4

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.

Page 7: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

5

Fig. 6 11. From the Ubuntu installer main menu screen, Fig. 7, Keyboard layout, select USA and hit the

Enter key to continue.

Fig. 7

Page 8: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

6

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

14. From Fig. 9a, the Configuring the network with DHCP screen, wait for the system complete the process.

Fig. 9a

15. From Fig. 10, the Configure the network screen, enter desired the Hostname: cloud, change as desired, and hit the Tab key to select <Continue> and hit the Enter key to continue.

Page 9: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

7

Fig. 10

16. From Fig. 11, the setting up the clock screen, wait for the system to complete the process.

Fig. 11 17. From Fig. 12, the Configure the clock screen, accept the default selection for the time zone, or

change as desired, and then hit the Enter key to continue.

Page 10: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

8

Fig. 12

18. From Fig. 13, the Starting up the partitioner screen, wait for the system to complete the process.

Fig. 13 19. From Fig. 14, the Partition disks screen, accept the default selection, or change as desired, and then

hit the Enter key to continue.

Page 11: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

9

Fig. 14

20. From Fig. 15, the Partition disks screen, accept the default selection, or change as desired, and then hit the Enter key to continue.

Fig. 15

Page 12: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

10

21. From Fig. 16, the Partition disks screen, select <Yes>, or change as desired, and then hit the Enter

key to continue.

Fig. 16

22. From Fig. 17, the Partition disks screen, accept the default selection of 21.2GB, or change as desired, and then hit the Tab key to select <Continue> and hit the Enter key to continue.

Fig. 17

Page 13: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

11

23. From Fig. 18, the Partition disks screen, read the warning and then select <Yes>, or change as desired, and then hit the Enter key to continue.

Fig. 18

24. From Fig. 19, the Partition disks screen, wait for the system to complete the process.

Fig. 19

25. From Fig. 20, the Installing the base system screen, wait for the system to complete the process.

Fig. 20

Page 14: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

12

26. From Fig. 21, the Setup users and passwords screen, enter the full name of the user: Net Admin, or change as desired, and then select <Continue> and hit the Enter key to continue.

Fig. 21

27. From Fig. 22, the Setup users and passwords screen, enter the username of the user: netadmin, or change as desired, and then select <Continue> and hit the Enter key to continue.

Fig. 22

Page 15: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

13

28. From Fig. 23, the Setup users and passwords screen; enter the password of the user netadmin, and then select <Continue> and hit the Enter key to continue.

Fig. 23 Note: Reenter the password when prompted.

29. From Fig. 24, the Setup users and passwords screen; accepted the selection <No> not to encrypt your home directory, or change as desired, and then hit the Enter key to continue.

Fig. 24

30. From Fig. 25, the Configuring apt screen, wait for the system to complete the process.

Fig. 25

Page 16: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

14

31. From Fig. 26, the Configuring the package manager screen; leave HTTP proxy blank, hit the Tab key to select <Continue> and hit the Enter key to continue.

Fig. 26 32. From Fig. 27, the Configuring apt screen, the system will continue with configuring apt, wait for the

system to complete the process.

Fig. 27 33. From Fig. 28, the Select and install software screen, select the desired update option, and hit the

Enter key to continue.

Fig. 28

Page 17: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

15

34. From Fig. 29, the Select and install software screen, wait for the system to complete the process.

Fig. 29

35. From Fig. 30, the Software selection screen, choose the software to install, and then hit the Enter key to continue.

Fig. 30

36. From Fig. 31, the Select and install software screen, again wait for the system to complete the process.

Page 18: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

16

Fig. 31

37. From Fig. 30, the Configuring mysql-server-5.1 screen; enter a secure password, and then hit the Tab key to select <Continue> and hit the Enter key to continue.

Fig. 31 Note: Reenter the password when prompted.

38. From Fig. 32, the Postfix Configuration screen; accept the default selection or change as desired,

and then hit the Enter key to continue.

Page 19: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

17

Fig. 32

39. From Fig. 32a, the Postfix Configuration screen; under System mail name: govecloudserver.com, or change as desired, and then hit the Tab key to select <Continue> and hit the Enter key to continue.

Fig. 32a

Page 20: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

18

40. From Fig. 33, the Select and install software screen, again wait for the system to complete the

process.

Fig. 33

41. From Fig. 34, the Installing GRUB boot loader screen, wait for the system to complete the process.

Fig. 34 42. From Fig. 35, the Finish installation screen; Installation complete. Remove the installation

CD, and hit the Enter key to restart the system.

Fig. 35

43. From Fig. 36, the Finish installation screen; Rebooting into your new ... and wait for the system complete rebooting.

Page 21: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

19

Fig. 36

44. From Fig. 37, you can observer the system startup process.

Fig. 37: Ubuntu cloud server startup process.

45. Figure 38 shows the login screen, enter your username and password your entered during the installation stage.

Fig. 38

46. From Fig. 39, enter your username and password, same as the one entered during the installation stage, and hit enter.

Page 22: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

20

Fig. 39: Ubuntu cloud server with successful login.

47. To check you server IP address, if the ifconfig command, as shown in Fig. 40.

Fig. 40: Checking server IP address

48. We’re done with this section

Step 3: Update Ubuntu 9.10 Operating Systems

It is useful to update your system with the latest components and system patches. The first command below asks Ubuntu to update its database of available packages, and the second command installs the latest packages based on your current configuration. We run the upgrade command twice to ensure that any packages that may have post-upgrade dependencies also have an opportunity to be upgraded. 1. From the command line, enter the following commands, one at a time.

$ sudo apt-get update $ sudo apt-get -u upgrade

Page 23: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

21

Note 1: The sudo command is used to run privileged operations on the Ubuntu platform. The first time you run the command, it will ask for your password. Subsequently, it will not ask for your password again for a short period of time (typically 15 minutes). Note 2: apt-get is the program Ubuntu uses for managing the system’s packages. When used to manipulate the core packages of the operating system, it needs to be run in conjunction with the sudo command.

2. We’re done with this section 3. You’re now ready to begin any other application installation as desired!

Part 2: Install Optional Additional Packages If you are a new user and not familiar with command prompt you can install GUI for your Ubuntu LAMP server using the 2 options To do so, perform the following procedure:

1. Install desktop Environment 2. Install Webmin

Step 1: Install Desktop Environment

1. First you nee to make sure you have enabled nniverse and multiverse repositories in /etc/apt/sources.list file once you have enable you need to use the following command to install GUI

sudo apt-get update sudo apt-get install ubuntu-desktop -y

the above command will install GNOME desktop, see Fig. 41.

Page 24: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

22

Fig. 41: GNOME login window

Login with appropriate user credentials as entered during on initial setup, and you should be logged into your Desktop, as shown in Fig. 42.

Page 25: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

23

Fig. 42: GNOME desktop

2. Alternatively, if you want to install KDE desktop use the following command:

sudo apt-get install kubuntu-desktop -y

3. Once done, if desired, you can go ahead and upgrade to the latest version of Ubuntu which at the

time of writing is Ubuntu 10.10 Maverick Meerkat. 4. We’re done with this section

Part 3: Verify Your LAMP Server Installation

Step 1: Installing Apache + PHP

Apache is one of the most famous web server, which runs on most Linux based servers. With just few commands you can configure apache to run PHP 5. If didn’t pre-install them during initial installation then no worries, I’ll show you how to do so. 1. To install Apache2 with PHP5, run:

Page 26: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

24

sudo apt-get install apache2 php5 libapache2-mod-php5

2. Apache configuration file is located at: /etc/apache2/apache2.conf and your web folder is

/var/www. 3. To check whether PHP is installed and running properly, just create a testinfo.php in your

/var/www folder with phpinfo() function exactly as shown below.

vi /var/www/testinfo.php

<?php /* testinfo.php */ phpinfo(); ?>

4. Fire-up your favorite browser and point it to http://ip.address/testinfo.php or http://domain/testinfo.php

and this should show you all your PHP configuration and default settings.

Note: you can edit necessary values or setup virtual domains using apache configuration file. 5. You’re done with this section.

Ste 2: Installing MySQL Database Server

Installing MySQL database server is always necessary if you are running a database driven ecommerce site. Remember running mysql server to a fair extend requires at least 256MB of RAM in your server. So unless you are running database driven sites you don’t absolutely need MySQL. 1. Again if you didn’t pre-install the MySQL database server, then no worries - the following commands

will install mysql 5 server and mysql 5 client.

apt-get install mysql-server mysql-client php5-mysql

Note: the configuration file of mysql is located at: /etc/mysql/my.cnf

Warning! By default there is no root password set for MySQL and it is important to set the password for the ROOT account.

2.1 Manually Creating users to use MySQL and Changing Root Password

2. By default mysql creates user as root and runs with no passport. You might need to setup the root password.

Page 27: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

25

3. To setup MySQL password, run:

# /usr/bin/mysqladmin -u root password 'new-password'

Note: alternatively, you use the following command: mysql -u root mysql> USE mysql; mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root'; mysql> FLUSH PRIVILEGES;

Note: you must never use root password, so you might need to create a user to connect to mysql database for a PHP script. Alternatively you can add users to mysql database by using a control panel like Webmin or phpMyAdmin to easily create or assign database permission to users. We will install Webmin and phpmyadmin during later once we complete basic installation.

4. You can also try remote localhost login as "root" user, as follows:

# mysql -h localhost -u root -p

Fig. 43

1. Now let’s login and create "webserverdb" database and "netadmin" user , as follows:

# mysql -u root -p

> CREATE DATABASE webserverdb DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

> GRANT ALL PRIVILEGES ON webserverdb.* TO 'labadmin'@'localhost' IDENTIFIED BY

'password';

> FLUSH PRIVILEGES;

> QUIT

2. Now let’s test the login for "netadmin" user , as follows:

netadmin@ubunutu:~$ mysql -u netadmin -p

Page 28: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

26

Fig. 44

5. You’re done with this section.

Step 3: Install phpMyAdmin

PhpMyAdmin is a nice web based database management and administration software and easy to install and configure under apache. Managing databases with tables couldn’t be much simpler by using phpMyAdmin. 6. To install phpMyAdmin, run:

sudo apt-get install phpmyadmin

Note: you’ll be prompted to choose the webserver phpMyAdmin will use, as shown in Fig. 45.

Page 29: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

27

Fig. 45

3. On the next page, Fig. 46, accept the default selection and hit enter to continue. You’ll be asked to provide MySQL root user password and database password.

Fig. 46

4. Next issue the command:

sudo ldconfig

Page 30: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

28

7. Now you may need to restart Apache2:

/etc/init.d/apache2 restart

8. Next, fire-up your browser and point it to: http://your-domain/phpmyadmin. Login with appropriate

MySQL database user with appropriate privileges, see Fig. 47. Do ensure that you have enabled cookies for the phpMyAdmin to function properly.

Fig. 47

9. You should now be logged in to your MySQL database as shown in Fig. 48.

Page 31: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

29

Fig. 48 10. That's it! MySQL and phpMyAdmin are ready. Log in with your mysql root password and create users

to connect to database from your PHP script. 11. You’re done with this section.

Part 4: Install OpenSSH Package In order to support secure remote connections to your server, you will need to install the OpenSSH package. This package will come in handy in the future to support administrative tasks on the system. By default this package is already installed in the Ubuntu server option. 12. To install OpenSSH, issue the following command:

$ sudo apt-get install openssh-server -y

13. To log into a remote computer that is running OpenSSH, you use the ssh username@hostname

command, replacing username with a valid user name on the computer you are trying to log into, and

Page 32: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

30

replacing hostname with either the fully qualified host name (e.g. example.com) of your server, or it’s IP address (e.g. 192.168.83.186).

Fig. 49 14. You’re done with this section.

Part 5: Install Webmin Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like "/etc/passwd", and lets you manage a system from the console or remotely. Currently there is no Webmin package in the Ubuntu repositories. This tutorial will explain how to install Webmin in Ubuntu Intrepid Ibex You can install Webmin for your server web interface to configure Apache2, MySQL, FTP, DNS servers and many more. Now we will see how to install Webmin in Ubuntu 9.10 Karmic Koala. Preparing your system 1. First you need to install the following packages

sudo aptitude install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl apt-show-versions

2. Now download the latest Webmin using the following command or from here

Page 33: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

31

wget http://www.webmin.com/download/deb/webmin-current.deb

3. Now we have webmin_1.520_all.deb package install this package using the following command

sudo dpkg -i webmin_1.520_all.deb

Note: incase you encounter any errors or difficulties in installing dependency; then immediately issue the command: sudo apt-get –f install

4. This will complete the installation with final output as follows:

Note: Ubuntu in particular don’t allow logins by the root user by default. However, the user created at system installation time can use sudo to switch to root. Webmin will allow any user who has this sudo capability to login with full root privileges.

Now you need to open your web browser and enter the following: https://localhost:10000/ https://your-server-ip:10000/, https://your-domain:10000

Note: On the “Error – Bad Request” page, click the link to continue.

Page 34: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

32

Note: on the This Connection is Untrusted page, click I Understand the Risk link, and then click Add Exception… button. Final click Get Certificate button, followed by Confirm Security Exception button

5. Now you should see the page similar to the following Screen, see Fig. 63.Enter your username and

password created during the initial installation, in our case user: netadmin and password: xxxxxx.

Fig. 63

Page 35: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

33

Note: Once logged in, you may be asked to install the latest Webmin by clicking Install Update Now button at the bottom of the screen.

6. After login if you want to configure Apache2, MySQL server you need to click on Servers on your left-hand side you should many servers are ready to configure, as shown in Fig. 64.

Fig. 64: Webmin admin page

7. Click Logout link to exit Webmin 8. We’re done with this section

Part 6: Need More Training on Linux: Are you having trouble understanding or comprehending the working of Linux OS, if so, then check out some of our introductory courses on Linux at: Global Open Versity, Vancouver Canada.

Page 36: Step-By-Step Install Guide Ubuntu 9.10 Karmic Server

Global Open Versity ICT Labs Install Guide Linux Ubuntu 9.10 Karmic Koala Server v1.0

© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

34

Ubuntu Server Administration Training

You can now register and take our superb Ubuntu Server Training course, covering Ubuntu 8.04, 9.04, 9.10, 10.04 and 10.10, EHCP and ISPConfig ISP hosting solutions, RESTORE backup, EJBCA PKI solution and many more…

• ICT105 - Ubuntu Server Administration Training

Call us today:

Email: [email protected]. URL: www.globalopenversity.org

Part 7: Hands-on Labs Assignments

1. Install and update Ubuntu 9.10 and configure is as DNS servers 2. On the same machine add LAMP and for your network infrastructure 3. Install and configure Sendmail or Postfix mail server and Evolution mail client 4. Lockdown your server by installing and configuring; Clamd, ClamAV and MailScanner. 5. Install Astaro GS Router to secure your LAN infrastructure. Other Related Articles & Hands-on Lab Manuals:

1. Building and Running Private Cloud With Eucalyptus Systems v1.0 2. Build Private Clouds With Ubuntu 10.10 LTS Enterprise Cloud Platform 3. Using Samba 3 Client Technology and Kerberos for Win2k8 AD-based identity management 4. Step-By-Step Build and Deploy Xen Hypervisor Virtualization on Linux OpenSUSE 11.3 Server 5. Build and Deploy Enterprise sipXecs Integration with Openfire 6. Build & Deploy a Private Cloud using OpenNebula Cloud Computing v1.2 7. Step-By Step Install Guide SugarCRM on PBX in a Flash 8. Step-By-Step Install Guide Linux OpenSUSE 11.3 Server v1.1 9. Using Webmin and Bind9 to Setup DNS Server on Linux 10. Step-by-step Install Guide Moodle on Linux with Sclipo Live Web Class 11. Install Guide Secure Postfix Messaging Server with Dovecot and ClamAV on Linux v1.2 12. Deploy Secure Messaging Solutions using Sendmail & Dovecot Servers with ClamAV on Linux 13. Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server 14. Step-By-Step Install Guide DTC on Linux CentOS5 Server v1.0 15. Install Guide Secure mail with Dovecot & Roundcube Webmail v1.0Send 16. Build your Own Private Data Center Backup Solutions using Ubuntu Powered RESTORE Backup

Server v1.0 17. Install & Setup Astaro Security Gateway to Protect Corporate Network v1.1

----------------------------------------------- Kefa Rabah is the Founder of Global Technology Solutions Institute. Kefa is knowledgeable in several fields of Science & Technology, Information Security Compliance and Project Management, and Renewable Energy Systems. He is also the founder of Global Open Versity, a place to enhance your educating and career goals using the latest innovations and technologies.

Fellow us on Twitter: Global Open Versity and Kefa Rabah A GOV Open Access Technical Academic Publications Enhancing education & empowering people worldwide through eLearning in the 21st Century