Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
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
[email protected] 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 Step 2: Install Mandriva Linux 2010 Spring
3 3
Part 2: Post Installation Configurations. Step 1: Perform System Upgrade Step 3: Change/Set System’s Hostname Step 4: Modify the Hosts file toe set FQDN Step 5: Modify your Screen Resolution when using VMware
15 15 19 21 23
Part 3: management from the command line Step 1: Create New s via Command-line Step 2: Change the ’s Step 3: Add a to a group Step 4: Remove a from a group Step 5: Lock and Unlock s Step 6: Delete a Step 7: Create a new group Step 8: Change a group’s name Step 9: Delete a group
23 24 25 25 25 26 26 26 26 27
Part 4: Mandriva URPMI Utility Step 1: Mandriva: urpm
27 27
Part 5: Install OpenSSH Package
28
Part 6: Installing and Configuring Apache 2 and Webmin Step 1: Install Web server ("httpd") daemon Step 1: Install Webmin Step 2: Installing MySQL Database Server 2.1 Manually Creating s to use MySQL and Changing Root Step 3: Install phpMy
29 29 29 34 34 36
Part 7: Install Bind9 DNS Server
38
Part 8: Need More Training on Windows
44
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
ETC300 - Certificate in Linux for Engineering & IT Applications
1
GTS Institute ICT Labs
Install Guide Mandriva Linux 2010 Spring Server v1.0
OpenNebula Cloud Computing Training
44
Linux istration 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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
ETC300 - Certificate in Linux for Engineering & IT Applications
2
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,
[email protected]
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 the Mandriva Linux 2010 Spring 32bit ISO server, which at the time of writing this lab manual was " mandriva-linux-one-2010spring-GNOME-europe-americas-cdrom-i586.iso" 2. Once you have ed 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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
ETC300 - Certificate in Linux for Engineering & IT Applications
3
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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
ETC300 - Certificate in Linux for Engineering & IT Applications
4
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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
ETC300 - Certificate in Linux for Engineering & IT Applications
5
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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
ETC300 - Certificate in Linux for Engineering & IT Applications
6
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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
ETC300 - Certificate in Linux for Engineering & IT Applications
7
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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
ETC300 - Certificate in Linux for Engineering & IT Applications
8
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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
ETC300 - Certificate in Linux for Engineering & IT Applications
9
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 her!
Fig. 13 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
10
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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
11
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 , and and his/her . Warning! Don’t forget these as you’ll need them to to your system. Click Next when done.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
12
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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
13
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 with Mandriva community or skip it, when done with registration, click on Create my , 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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
14
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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
15
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
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
16
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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
17
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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
18
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
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
19
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
20
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
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 192.168.1.2
localhost 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
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
21
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. © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
22
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: management from the command line Managing s via GUI You can manage your systems and group via GUI, which you can access as follows: 1. Click Mandriva Linux Control Center system icon:
icon Æ select System and click Manage s on the
To access the manage and groups GUI interface, as shown in Fig. 34. © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
23
ETC300 - Certificate in Linux for Engineering & IT Applications
GTS Institute ICT Labs
Install Guide Mandriva Linux 2010 Spring Server v1.0
Fig. 34
Managing s via Command-line Although most Linux distros comes with excellent graphical tool to manage your s (system-configs), there are times, for example when istering a server through SSH, that management has to be done from command line. All operations can be done using the following commands: id, add, mod, del, groupadd, groupdel, groupmod, wd These exist in every Linux distribution with slight differences in each command’s ed options. The following info applies to Fedora and other Red Had based distros like CentOS and Mandriva.
Step 1: Create New s via Command-line 1. To create a , run add command: # add –c "My Example " name In this case, let add krabah: © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
24
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 ’s 1. To change a ’s : # wd name 2. If it’s used without specifying a name, then the currently logged in ’s is changed. 3. You’re done with this section.
Step 3: Add a to a group 1. mod is used to modify a ’s settings. Check the man page for all the available options. One useful use of this command is to add a to a group: # mod -a -G group1 name Note: the -a option is critical. The is added to group1 while he continues to be a member of other groups. If it’s not used, then the 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 from a group 1. Removing a 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 is a member of: © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
25
ETC300 - Certificate in Linux for Engineering & IT Applications
GTS Institute ICT Labs
Install Guide Mandriva Linux 2010 Spring Server v1.0
# id -nG name group1 group2 group3 .... 2. Then you need to put all these groups as a comma-separated list to the "mod -G" option, except for the group from which you want the to be removed. So, to remove the from group2, issue the command: # mod -G group1,group3,... name 3. You’re done with this section.
Step 5: Lock and Unlock s 1. Other common mod uses are to lock and unlock s. To lock out a : # mod -L name 2. To unlock the : # mod -U name 4. You’re done with this section.
Step 6: Delete a 1. del is used to delete a . If the -r option is used then the ’s home directory and mail spool are deleted too: # del -r name 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: © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
26
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 ’s primary group (usually this is the group with name equal to the name) the respective 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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
27
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 secure remote connections to your server, you will need to install the OpenSSH package. This package will come in handy in the future to istrative 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 to a remote computer that is running OpenSSH, you use the ssh name@hostname command, replacing name with a valid name on the computer you are trying to to, 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
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
28
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 istering 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 istration 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 istrate 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 ): # 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 the latest release. You can use RPMs for RHE/CentOS and related systems that binary installations or you can build Webmin from source. Webmin also s 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. © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
29
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
Fig. 38
3. when done you’ll be prompted to 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 name and to authenticate into Webmin, as shown in Fig. 40.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
30
ETC300 - Certificate in Linux for Engineering & IT Applications
GTS Institute ICT Labs
Install Guide Mandriva Linux 2010 Spring Server v1.0
Fig. 40: to Webmin as root &
Note: • For security best practices, never use " " . •
Also note that this is run by root, but you can still give permission to other s with limited privilege to run it.
•
I suggest to never give this power to any other except to you, the .
•
Click on to enter Webmin page and get started, as shown in Fig. 41.
•
You may also be prompted to update Webmin package.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
31
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 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 "lab" the privilege to to the Webmin for testing purposes. 8. Click Webmin on the left hand pane then click Webmin s, 9. From Web s screen, click "Create a new Webmin ", a shown in Fig. 42.
Fig 78: Click Webmin s and then click "Create a new Webmin "
10. Next, from Fig. 43, add the "net". Under authentication". Under Real name, enter: "Net ". © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
,
select
"Unix 32
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 istration control to "net".
Fig. 43: Setting up "net" with the privilege to to the Webmin interface.
•
Finally, scroll down to click on Create button, and you should see "net", as one of the Webmin s, as shown in Fig. 44
.
Fig. 44
11. Now and back this time as "net" and "xxxxxx"; as was setup during the system installation stage. © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
33
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
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. 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 set for MySQL and it is important to set the for the ROOT .
2.1 Manually Creating s to use MySQL and Changing Root 2. By default mysql creates as root and runs with no port. You might need to setup the root . 3. To setup MySQL , run: # /usr/bin/mysql -u root 'new-' Note: alternatively, you use the following command: mysql -u root mysql> USE mysql; mysql> UPDATE SET =('new-') WHERE ='root'; mysql> FLUSH PRIVILEGES; Note: you must never use root , so you might need to create a to connect to mysql database for a PHP script. Alternatively you can add s to mysql database by using a control like Webmin or phpMy to easily create or assign database permission to s. We will install Webmin and phpmy during later once we complete basic installation. 4. You can also try remote localhost as "root" , as follows: # mysql -h localhost -u root -p
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
34
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
Fig. 45
1. Now let’s and create "datactrbk" database and "net" , as follows: # mysql -u root -p > CREATE DATABASE datactrbk DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; > GRANT ALL PRIVILEGES ON datactrbk.* TO 'net'@'localhost' IDENTIFIED BY ''; > GRANT SELECT, LOCK TABLES ON datactrbk.* TO 'net'@'localhost' IDENTIFIED BY ''; > FLUSH PRIVILEGES; > QUIT
Note: The above also creates a backup "net" so that you can use mysqldump to make database backups without accident. 2. Now let’s test the for "net" , as follows: net@server01:~$ mysql -u net -p Enter : mysql> SHOW DATABASES; +--------------------+ | Database
|
+--------------------+ | information_schema | | mysql
|
| test
|
| datactrbk
|
+--------------------+ 2 rows in set (0.07 sec) mysql>exit © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
35
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
BYE net@server01:~$
5. You’re done with this section.
Step 3: Install phpMy PhpMy is a nice web based database management and istration software and easy to install and configure under apache. Managing databases with tables couldn’t be much simpler by using phpMy. 6. You can down and install phpMy from here. When done ing 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 phpMy 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/phpmy/apache.conf Note: the phpmy configuration file is located at: /etc/phpmy folder. 7. Now restart Apache: /etc/init.d/apache2 restart 8. Next, fire-up your browser and point it to: http://your-domain/phpmy. with appropriate MySQL database with appropriate privileges, see Fig. 47.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
36
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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
37
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
Fig. 48
10. That's it! MySQL and phpMy are ready. with your mysql root and create s 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, 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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
38
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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
39
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
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
40
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
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
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
41
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
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
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
42
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.
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
43
ETC300 - Certificate in Linux for Engineering & IT Applications
Install Guide Mandriva Linux 2010 Spring Server v1.0
GTS Institute ICT Labs
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 and take our superb OpenNebula Cloud Computing Training course: •
VCC302 – Building a Private Cloud using OpenNebula Cloud Computing
us today: Email:
[email protected] URL: www.globalopenversity.org
Linux istration 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, 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 EH 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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
44
ETC300 - Certificate in Linux for Engineering & IT Applications
GTS Institute ICT Labs
Install Guide Mandriva Linux 2010 Spring Server v1.0
3. 4. 5. 6. 7. 8. 9.
Using Webmin and Bind9 to Setup Enterprise DNS Server on Linux Build your own ISP Hosting using EH on Ubuntu 10.04 LTS Server Build your own ISP Hosting using ISPConfig on Ubuntu Server v1.0 Step-By-Step Install Guide DTC on Linux CentOS5 Server v1.0 Deploy Secure Messaging Solutions using Sendmail & Dovecot Servers with ClamAV on Linux Install Guide Secure Postfix Messaging Server with Dovecot and ClamAV on Linux v1.2 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 © April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
www.gtechsi.org
45
ETC300 - Certificate in Linux for Engineering & IT Applications