Академический Документы
Профессиональный Документы
Культура Документы
2
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
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.
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
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
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
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
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
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
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
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
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
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
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
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
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.
15
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
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
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
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
Fig. 27
1. To check the current hostname issue "hostname" command, as shown in Fig. 28. which shows the
current hostname is: : "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.
19
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
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)
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
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
Fig. 30
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):
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.
21
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
4. Next edit the Hosts file using your favorite Text editor, as shown in Fig. 31(b). Save & Exit.
5. For the final test, issue the ping command, to see if our hostname can return its own localhost IP
address (see Fig. 32):
Fig. 32: Ping test. (Note: Hit "Ctrl C" to break the ping test)
Fig. 33
2. Now, click on the drop-down arrow to select your desired Resolution, and then restarted X.
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
Fig. 34
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.
24
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
Fig. 34
# passwd username
2. If it’s used without specifying a username, then the currently logged in user’s password is changed.
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!
25
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
# 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 -L username
# usermod -U username
# userdel -r username
# groupadd groupname
Note: the -r option can be used to create a group with GID<500 (system).
26
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
# 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.
]# urpmi packagename
2. To remove software:
# urpme packagename
# urpmi.update -a
# urpmi --auto-select
Note: for a more in-depth yum tutorial and other resources, see Managing Software with urpm.
27
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
# 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
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.
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
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
Fig. 38
4. Next, make sure that all the required services httpd & Webmin are both running (see Fig. 39).
5. You may also access it via the web browser using any of the following URLs:
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
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
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
• 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
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
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.
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:
34
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
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.
mysql>exit
35
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
BYE
netadmin@server01:~$
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 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
/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
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
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.
# 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
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
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.
Fig. 55
40
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
Fig. 56
Fig. 57
# dig server01.govtestlabs.com
41
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
Fig. 58
# 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
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
Contact us today:
Email: info@globalopenversity.org URL: www.globalopenversity.org
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.
44
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada
-----------------------------------------------
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.
45
© April 2007, Kefa Rabah, Global Technology Solutions Institute, Vancouver Canada