Вы находитесь на странице: 1из 46

GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.

Global Technology Solutions Institute


Systems Integration Hands-on Labs Training Manual

Step-By-Step Install Guide Mandriva Linux 2010 Spring


Kefa Rabah
GTS Institute, Vancouver Canada
krabah@gtechsi.org
www.gtechsi.org

Table of Contents Page No.

STEP-BY-STEP INSTALL GUIDE MANDRIVA LINUX 2010 SPRING 3


Introduction 3

Part 1: Install & Upgrade Mandriva 2010 3


Step 2: Install Mandriva Linux 2010 Spring 3

Part 2: Post Installation Configurations. 15


Step 1: Perform System Upgrade 15
Step 3: Change/Set System’s Hostname 19
Step 4: Modify the Hosts file toe set FQDN 21
Step 5: Modify your Screen Resolution when using VMware 23

Part 3: User management from the command line 23


Step 1: Create New Users via Command-line 24
Step 2: Change the user’s password 25
Step 3: Add a user to a group 25
Step 4: Remove a user from a group 25
Step 5: Lock and Unlock user accounts 26
Step 6: Delete a user 26
Step 7: Create a new group 26
Step 8: Change a group’s name 26
Step 9: Delete a group 27

Part 4: Mandriva URPMI Utility 27


Step 1: Mandriva: urpm 27

Part 5: Install OpenSSH Package 28

Part 6: Installing and Configuring Apache 2 and Webmin 29


Step 1: Install Web server ("httpd") daemon 29
Step 1: Install Webmin 29
Step 2: Installing MySQL Database Server 34
2.1 Manually Creating users to use MySQL and Changing Root Password 34
Step 3: Install phpMyAdmin 36

Part 7: Install Bind9 DNS Server 38

Part 8: Need More Training on Windows 44


1
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

OpenNebula Cloud Computing Training 44

Linux Administration Training 44

Part 9: Hands-on Labs Assignments 44

A GOV Open Knowledge Access Technical Academic Publications


Enhancing education & empowering people worldwide through eLearning in the 21st Century

2
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Global Open Versity


Systems Integration Hands-on Labs Training Manual

Step-By-Step Install Guide Mandriva Linux 2010 Spring


By Kefa Rabah, krabah@gtechsis.org Dec 13, 2010 GTS Institute

Introduction
Mandriva Linux (formerly Mandrakelinux or Mandrake Linux) is a French Linux distribution distributed by
Mandriva (formerly Mandrakesoft). It uses the RPM Package Manager. The product lifetime of Mandriva
Linux releases is 18 months for base updates (Linux, system software, etc.) and 12 months for desktop
updates (window managers, desktop environments, web browsers, etc.). Server products receive full
updates for at least 24 months after their release.

Mandriva Linux contains the Mandriva Control Center, which eases configuration of some settings. It has
many programs known as Drakes or Draks, collectively named drakxtools, to configure many different
settings. Examples include MouseDrake to set up a mouse, DiskDrake to set up disk partitions and
drakconnect to set up a network connection. They are written using GTK+ and Perl, and most of them can
run in both graphical and text mode using the ncurses interface.

Hands-on Lab 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, or Citrix XenServer). In
this lab session, we’ll concentrate on installing Mandriva Linux 2010 Spring server which you can then
later use to install any other applications as desired. After completing the initial installation I’ll show you
how to install DNS server, LAMP server, and Samba file server. You will also learn how to install and
secure SFTP using TSL and finally install and secure MySQL database server. 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 & Upgrade Mandriva 2010

Step 2: Install Mandriva Linux 2010 Spring


1. Hope over to http://wiki.mandriva.com/en/ website and download the Mandriva Linux 2010 Spring 32-
bit ISO server, which at the time of writing this lab manual was " mandriva-linux-one-2010-
spring-GNOME-europe-americas-cdrom-i586.iso"

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

3
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

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

5. From Fig. 1, select the option desired and then hit the Enter key to commence installation. In our case
we have selected to Install Mandriva Linux 2010 Spring option, or change as desired.

Fig. 1: Hit the <ENETER> key to start loading & installing Mandriva 2010

1. Next, you should see streams of information flowing up the screen, followed by the display of
“Booting the system...” screen, as shown in Fig. 2.

4
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 2

2. From Fig. 3, language screen, accept the default selected option or change as desired, and then click
Next key to continue.

Fig. 3
5
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

3. From Fig. 4, read and accept the license, and then click OK to continue.

Fig. 4
4. From Fig. 5, Which is your time zone? screen, accept the default selection or change as desired
and then click Next to continue.

Fig. 5
6
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

5. From Fig. 6, the Date, Clock & Time Zone Settings screen, accept the default or change as desired
and then click Next to continue.

Fig. 6
6. From Fig. 7, Keyboard layout screen, accept the default selection or change as desired and then
click Next to continue.

Fig. 7
7
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

7. From Fig. 8, click on the Next button to continue.

Fig. 8

8. From Fig. 9, accept the default selection or change as desired and then click Next to continue.

Fig. 9

8
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

9. From Fig. 10, wait for the system to complete the current task, it will continue when done.

Fig. 10
10. From Fig. 11, accept the default selection or change as desired and then click Next to continue. As
can be observed, the system will auto remove the unnecessary packages!

Fig. 11

9
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

11. From Fig. 12, wait for the system to complete the current installation task, it will continue when done.

Fig. 12

12. From Fig. 13, accept the default settings and then click Next to continue. Note: don’t enter the
password her!

Fig. 13

10
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

13. From Fig. 14, accept the default settings or change as desired and then click Finish to continue.

Fig. 14

14. From Fig. 15, remove the CD and then click Finish to restart you computer.

Fig. 15

11
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

15. Your system should be now rebooting as shown in Fig. 16.

Fig. 16

16. When the system comes back, it performs some installation of packages, as shown in Fig. 17.

Fig. 17

17. From Fig. 18, enter root admin password, and user and his/her password. Warning! Don’t forget
these password as you’ll need them to login to your system. Click Next when done.

12
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 18

18. From Fig. 19, you’ve successfully installed Mandriva Linux 2010 spring, click on Next to continue.

Fig. 19
13
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

19. From Fig. 20, you’ve the option to register with Mandriva community or skip it, when done with
registration, click on Create my account, and then click Next twice to go to your Mandriva Spring
Desktop.

Fig. 20

20. You should now be logged into your Mandriva Desktop as shown in Fig. 21.

14
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 21

21. You’re done with Mandriva 2010 Linux 2010 spring server installation. In the next section, we’re going
to perform other post-installation work like system upgrade and etc.

Part 2: Post Installation Configurations.

Step 1: Perform System Upgrade


For best practices in IT, it’s important to always perform systems upgrade after initial installation is
completed. To do this, perform the following procedures:

1.1: Perform System Upgrade using Command-line


1. Click Application -> Tools and the select Terminal, as shown in Fig. 22.

15
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 22

1. From Terminal window, issue the command "urpmi.update -a" as shown in Fig. 23: This enables
the system to get the latest patches and bug fixes.

# urpmi.update -a

Fig. 23

16
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

2. Now, from a new Terminal window, issue the "ifconfig" command to view our new IP address.
And from Fig. 24, you can see that our static IP address was configured correctly.

Fig. 24

3. Alternatively, you can update your system by using Mandriva Linux Control Center, which you can
access by clicking monitor with red circle icon as shown in Fig. 25.

Fig. 25

4. From Fig. 26, the Mandriva Linux Control Center screen, from here you can perform other Mandriva
server management functions. For example, click on the "Update you system” icon to perform
system upgrade.

17
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 26

5. Ensure that you have allowed the necessary services that you’ll use for this lab session. To do this,
from Fig. 26, click on Security link and then click “Set up your personal firewall’ icon to access Fig.
27. Check all the desired service and then click OK to apply and close the window. You may be
prompted to bind it to particular interface e.g., eth0.

18
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 27

6. You’re done with this section.

Step 3: Change/Set System’s Hostname


In this section we’re going to change the computer hostname. But first let’s check the current hostname.

1. To check the current hostname issue "hostname" command, as shown in Fig. 28. which shows the
current hostname is: : "localhost"

Fig. 28: Current hostname: "localhost"

2. Next, we’re going to change the hostname to: "server01.govtestlabs.com". To do so, change
to the directory "/etc/sysconfig" and use your favorite Text editor to edit the "network" file.

[root@localhost ~]# gedit /etc/sysconfig/network

19
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Add a line containing “short hostname” as follows:

HOSTNAME=server01

Fig.29

Note 1: The "short hostname" (what you see at the bash prompt) is the leftmost segment of a fully
qualified domain name (FQDN). If the FQDN is your.domain.com, the hostname (the short name)
would be "your".

Note 2: that you do not specify the FQDN with the HOSTNAME variable, it is not even possible.
Quoting the manpage of hostname (the tool that is used to set the hostname): You can't change the
FQDN (as returned by hostname --fqdn) or the DNS domain name (as returned by
dnsdomainname) with this command.

Note 3: the FQDN/DNS domain name is configured in /etc/hosts by default (unless a more
elaborate method like DNS or NIS are used to configure the hostnames – the order in which methods
are tried is defined in /etc/host.conf file)

3. Next in the /etc/hosts file I changed the "127.0.0.1 localhost" to:

127.0.0.1 server01 localhost

7. Reboot the system for the changes to take effect. Or if you want to continue working and restart the
system latter, then you can alternatively issue the command

[root@localhost ~]# /etc/init.d/network restart

8. Next, from the Terminal window, issue the "hostname" command to view our new hostname, as
shown in Fig. 30, and which correctly returns our new hostname.

20
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 30

9. You’re done with this section.

Step 4: Modify the Hosts file toe set FQDN


In this step we want to modify the hosts file to reflect our new "Fully Qualified Domain Name" and
IP address. To do this, from the Terminal window issue the command:

1. Using you favorite Text editor, edit your /etc/hosts file, adding both the long & short names to the
127.0.0.1 line, like so (the FQDN is only needed if you're actually part of the network of the FQDN.
If you just want to name your computer something different than "localhost", then the short-name
is all you need to configure):

127.0.0.1 localhost your.fully.qualified.hostname your

2. If you are configured for a static IP address on your network interface, leave the 127.0.0.1 line
alone, and instead create a new line in the hosts file that links the names to that static IP address, like
so:

127.0.0.1 localhost
192.168.1.2 your.fully.qualified.hostname your

Note: one side benefit of this latter method is that you can put every system on your static-IP-based
LAN into the file in this fashion, and then use a copy of that same /etc/hosts file on every one of
them.

3. In our case, we have:

[root@server01 ~]# gedit /etc/hosts

And add the following line, as shown in Fig. 31:

127.0.0.1 localhost server01.govtestlabs.com servver01

21
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 31a: original Host file

4. Next edit the Hosts file using your favorite Text editor, as shown in Fig. 31(b). Save & Exit.

Fig. 31b: Modified Hosts file. Save & close.

Note: So now the Hostname or Fully Qualified Hostname is: "server01.govtestlabs.com"

5. For the final test, issue the ping command, to see if our hostname can return its own localhost IP
address (see Fig. 32):

[root@server01 ~]# ping server01.govtestlabs.com

Fig. 32: Ping test. (Note: Hit "Ctrl C" to break the ping test)

6. You’re done with Installing and post configuration of CentOS5.


22
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Step 5: Modify your Screen Resolution when using VMware


It is extremely easy to modify your screen resolution from your guest machine running under VMware. To
do this, perform the following procedure:

1. From within X, click System tab Æ Preference Æ select Monitors.

Fig. 33

2. Now, click on the drop-down arrow to select your desired Resolution, and then restarted X.

3. You’re done with this section.

Part 3: User management from the command line

Managing Users via GUI

You can manage your systems user and group via GUI, which you can access as follows:

1. Click Mandriva Linux Control Center icon Æ select System and click Manage users on the
system icon:

To access the manage user and groups GUI interface, as shown in Fig. 34.
23
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 34

Managing Users via Command-line


Although most Linux distros comes with excellent graphical tool to manage your users (system-config-
users), there are times, for example when administering a server through SSH, that user management
has to be done from command line.

All operations can be done using the following commands: id, useradd, usermod, userdel,
groupadd, groupdel, groupmod, passwd

These exist in every Linux distribution with slight differences in each command’s supported options. The
following info applies to Fedora and other Red Had based distros like CentOS and Mandriva.

Step 1: Create New Users via Command-line

1. To create a user, run useradd command:

# useradd –c "My Example User" username

In this case, let add user krabah:

24
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 34

2. You’re done with this section.

Step 2: Change the user’s password


1. To change a user’s password:

# passwd username

2. If it’s used without specifying a username, then the currently logged in user’s password is changed.

3. You’re done with this section.

Step 3: Add a user to a group


1. Usermod is used to modify a user account’s settings. Check the man page for all the available
options. One useful use of this command is to add a user to a group:

# usermod -a -G group1 username

Note: the -a option is critical. The user is added to group1 while he continues to be a member of
other groups. If it’s not used, then the user is added only to group1 and removed from any other
groups. So, take note!

2. You’re done with this section.

Step 4: Remove a user from a group


1. Removing a user from a group is a bit trickier. Unfortunately, there is no direct command, at least not
in most Linux distros, that can do that from command line. At first you need to get a list of groups that
your user is a member of:

25
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

# id -nG username
group1 group2 group3 ....

2. Then you need to put all these groups as a comma-separated list to the "usermod -G" option,
except for the group from which you want the user to be removed. So, to remove the user from
group2, issue the command:

# usermod -G group1,group3,... username

3. You’re done with this section.

Step 5: Lock and Unlock user accounts


1. Other common usermod uses are to lock and unlock user accounts. To lock out a user:

# usermod -L username

2. To unlock the user:

# usermod -U username

4. You’re done with this section.

Step 6: Delete a user


1. Userdel is used to delete a user account. If the -r option is used then the user’s home directory and
mail spool are deleted too:

# userdel -r username

5. You’re done with this section.

Step 7: Create a new group


1. To create a new group, issue the command:

# groupadd groupname

Note: the -r option can be used to create a group with GID<500 (system).

2. You’re done with this section.

Step 8: Change a group’s name


1. Groupmod can be used to change a group name:

26
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

# groupmod -n newgroupname groupname

2. You’re done with this section.

Step 9: Delete a group


1. Groupdel can delete a group:

# groupdel groupname

Note: in order to delete a user’s primary group (usually this is the group with name equal to the
username) the respective user must be deleted previously.

2. You’re done with this section.

Part 4: Mandriva URPMI Utility

Step 1: Mandriva: urpm


1. Mandriva Linux (formerly Mandrake and Connectiva) has a toolset similar to APT called urpmi. To
install software perform the following commands:

]# urpmi packagename

2. To remove software:

# urpme packagename

3. To update the local package database:

# urpmi.update -a

4. To install security updates and bug fixes:

# urpmi --auto-select

Note: for a more in-depth yum tutorial and other resources, see Managing Software with urpm.

5. You’re done with this section.

27
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Part 5: 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 Mandriva server option.

1. To install OpenSSH, issue the following command:

# urpmi openssh -y

2. Now check the status of sshd daemon, if stopped then start it:

Fig. 35

3. 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
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.190).

Fig. 36

28
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

4. You’re done with this section.

Part 6: Installing and Configuring Apache 2 and Webmin


Administering Linux and Unix-based servers does not need to be the scourge of your work day. With a
handy tool called Webmin as part of your arsenal, you can regain full control of your servers’ setup and
configuration via the Web browser.

Webmin is the most powerful administration tool in its nature. You can use it, for example, to setup DNS
Server, but I will not go over it in detail because you will learn more about it in the coming modules. It is
not difficult to use Webmin because it is web based, in any event, you should also know that you can use
it remotely to administrate your network servers.

Step 1: Install Web server ("httpd") daemon


As you may recall, we didn’t install any server during the initial installation stage, however, now we do
require a Webserver to be running to test our Webmin installation.

1. To install a Web server daemon ("httpd"), perform the following procedure (as root user):

# urpmi -a apache2 -y

Note: switch -a will ensure that all the dependencies are installed.

5. Now check the status of httpd daemon, if stopped then start it:

Fig. 37

Step 1: Install Webmin

1. To Install Webmin and get started, drop by www.webmin.com and download the latest release. You
can use RPMs for RHE/CentOS and related systems that support binary installations or you can build
Webmin from source. Webmin also supports a large number of UNIX variants, including Mac OS X.

2. You’ll be prompted to install the Webmin package as shown in Fig. 38, click on the Install button to
install it.
29
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 38

3. when done you’ll be prompted to login to Web via browser at URL:


http://server01:10000

4. Next, make sure that all the required services httpd & Webmin are both running (see Fig. 39).

# service httpd restart


# service httpd webmin

Fig. 39: Restarting httpd and Webmin services.

5. You may also access it via the web browser using any of the following URLs:

http://localhost:100000 or http://127.0.0.1:10000 or http://yourdomain:10000


in our case: http://server01:10000

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

6. Next, enter the root user name and password to authenticate into Webmin, as shown in Fig. 40.

30
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 40: Login to Webmin as root user & password

Note:
• For security best practices, never use "Remember login" password.
• Also note that this is run by root, but you can still give permission to other users with limited
privilege to run it.
• I suggest to never give this power to any other user except to you, the administrator.
• Click on Login to enter Webmin admin page and get started, as shown in Fig. 41.
• You may also be prompted to update Webmin package.

31
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig 41: Webmin interface.

Note: after login if you want to configure Apache2, MySQL server you need to click on Servers on
your left-hand side you should have many servers that are ready to be configured.

7. Next, let’s give our user "labadmin" the privilege to login to the Webmin for testing purposes.

8. Click Webmin on the left hand pane then click Webmin Users,

9. From Web Users screen, click "Create a new Webmin user", a shown in Fig. 42.

Fig 78: Click Webmin Users and then click "Create a new Webmin user"

10. Next, from Fig. 43, add the user "netadmin". Under Password, select "Unix
authentication". Under Real name, enter: "Net Admin".
32
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

• Next, click "Select all", to delegate the Web administration control to user "netadmin".

Fig. 43: Setting up "netadmin" with the privilege to login to the Webmin interface.

• Finally, scroll down to click on Create button, and you should see "netadmin", as one of the
Webmin users, as shown in Fig. 44
.

Fig. 44

11. Now logout and login back this time as user "netadmin" and password "xxxxxx"; as was setup
during the system installation stage.

33
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

12. You’re done with this section.

Step 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.

# urpmi mysql -y

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.

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

34
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 45

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

# mysql -u root -p
> CREATE DATABASE datactrbk DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
> GRANT ALL PRIVILEGES ON datactrbk.* TO 'netadmin'@'localhost' IDENTIFIED BY
'password';
> GRANT SELECT, LOCK TABLES ON datactrbk.* TO 'netadmin'@'localhost' IDENTIFIED BY
'password';
> FLUSH PRIVILEGES;
> QUIT

Note: The above also creates a backup user "netadmin" so that you can use mysqldump to make
database backups without accident.

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

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


Enter password:

mysql> SHOW DATABASES;


+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| datactrbk |
+--------------------+
2 rows in set (0.07 sec)

mysql>exit
35
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

BYE
netadmin@server01:~$

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. You can down and install phpMyAdmin from here. When done downloading you’ll be prompted to
install it as shown in Fig. 46:

Fig. 46

Note 1: you may be prompted to install dependencies’.

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

Note: to manually set up under Apache all you need to do is include the following line in
/etc/apache2/apache2.conf:

Include /etc/phpmyadmin/apache.conf

Note: the phpmyadmin configuration file is located at: /etc/phpmyadmin folder.

7. Now restart Apache:

/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.

36
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 47

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

37
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

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.

Part 7: Install Bind9 DNS Server


In this section of the hands-on labs it’s assumed that you know how to setup and configure a DNS server
using Webmin and BIND DNS Server. If not, then check out excellent hands on manual entitled “Using
Webmin and Bind9 to Setup Enterprise DNS Server on Linux”.

1. To install Bind9 DNS Server, run the command:

# urpmi bind

2. Now you can use Webmin to setup and configure your DNS server on your machine.

3. To do this, login to your Webmin console, and the click Servers Æ BIND DNS Server, and scroll
down to Existing DNS Zone which should look like shown in Fig. 53

• Lick on the Create master zone link to start setup your DNS zones.
38
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 53

4. When done with the setup and configuration your new Existing DNS Zone should now have two
additional icons as shown in red rectangles, see Fig. 54.

39
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 54

5. Scroll to top of page and click Apply Zone followed by Apply Configuration links.

6. You may have to start your DNS service if it’s not already running; you can check this as follows.

service named status

Fig. 55

40
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

7. If, not, then start or restart the service:

service named start

8. Now ensure that your "/etc/resolv.conf" file is configured appropriately:

Fig. 56

9. Similarly, do ensure that your "/etc/hosts" file is configured appropriately:

Fig. 57

10. You may have to restart your DNS service.

11. Now perform dig command test, as follows

# dig server01.govtestlabs.com

41
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 58

12. Now perform NSLOOKUP command test, as follows

# nslookup server01.govtestlabs.com

Fig. 59

13. Now perform NSLOOKUP command test with one of our alias, as follows

# nslookup www.govtestlabs.com

42
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Fig. 60

14. Finally, perform dig command test with our mail server, as follows

# dig mx mail.govtestlabs.com

Fig. 561

15. All is good to set setup mail server using Postfix or Sendmail server or any application like LDAP
which requires DNS server to in place.

43
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

Part 8: Need More Training on Windows


Are you having trouble understanding or comprehending the working of MS Windows OS, if so, then
check out some of our introductory courses on MS Windows at: Global Open Versity, Vancouver Canada.

OpenNebula Cloud Computing Training


You can now register and take our superb OpenNebula Cloud Computing Training course:

• VCC302 – Building a Private Cloud using OpenNebula Cloud Computing

Contact us today:
Email: info@globalopenversity.org URL: www.globalopenversity.org

Linux Administration Training


Make a smart move, its time you reconfigure your skill-sets and move your career into the fastest moving
high tech gravy train of the Linux Open Source world, join our Linux program today:

• Linux Enterprise Infrastructure Engineering Diploma – ICT202

Part 9: Hands-on Labs Assignments


You’re required to complete these assignments as part of class assignments and submit the results to
your respective instructor. Continue assessment progress marks will be awarded as part of the grading
systems:

1. Install Mandriva Linux 2010 Spring and ensure it’s updated with the latest patches and bug fixes.
2. Install and configure LAMP Server
3. Install and configure Linux Mandriva 2010 or Linux distros VM and install DNS Server, Sendmail
server with SquirrelMail Webmail on it.
4. On a second VM, install and configure Linux Ubuntu 10.04 LTS (Lucid Lynx) VM and install
Webserver, ftp server on it.
5. On a third VM, install and configure Linux Ubuntu 10.04 LTS (Lucid Lynx) VM and install EHCP IS
Hosting on it.

Other Related Articles & Hands-on Lab Manuals:


1. Step-By-Step Install Guide eyeOS Cloud Computing Operating System
2. Build your Own Private Cloud using Ubuntu 10.04 Eucalyptus Enterprise Cloud Computing
Platform

44
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications


GTS Institute ICT Labs Install Guide Mandriva Linux 2010 Spring Server v1.0

3. Using Webmin and Bind9 to Setup Enterprise DNS Server on Linux


4. Build your own ISP Hosting using EHCP on Ubuntu 10.04 LTS Server
5. Build your own ISP Hosting using ISPConfig on Ubuntu Server v1.0
6. Step-By-Step Install Guide DTC on Linux CentOS5 Server v1.0
7. Deploy Secure Messaging Solutions using Sendmail & Dovecot Servers with ClamAV on Linux
8. Install Guide Secure Postfix Messaging Server with Dovecot and ClamAV on Linux v1.2
9. Build your Own Private Data Center Backup Solutions using Ubuntu Powered RESTORE Backup
Server v1.0
10. 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

45
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada

www.gtechsi.org ETC300 - Certificate in Linux for Engineering & IT Applications

Вам также может понравиться