Step-By-Step Guide CentOS 6 Server Installation and Administration by krabah

VIEWS: 1,856 PAGES: 63

More Info
									                              Global Open Versity
               Systems Integration Hands-on Labs Training Manual

   Step-By-Step Install Guide CentOS-6 Server Administration and
                            Maintenance
                                       Kefa Rabah
                          Global Open Versity, Vancouver Canada
                                  krabah@globalopenversity.org
                                    www.globalopenversity.org

Table of Contents                                                  Page No.


STEP-BY-STEP INSTALL GUIDE CENTOS-6 SERVER ADMINISTRATION AND
MAINTENANCE                                                               4 
Introduction                                                              4 

Part 1: Installing and Updating CentOS-6 Server                           4 
  Step 1: Install CentOS-6 Server                                         4 

Part 2: Post Installation Configurations.                                18 
  Step 1: Perform System Upgrade                                         18 
  Step 3: Check Computer Hostname                                        20 
  Step 4: Modify the Hosts File                                          21 

Part 3: Installing Apache, PHP, MySQL on CentOS-6 Server                 21 
  Step 1: Install LAMP                                                   21 
  Step 2: Test PHP Installation                                          22 
  Step 3: Lockdown MySQL Database Server                                 23 

Part 4: Installing PostgreSQL                                            26 

Part 5: Installing and Configuring Webmin                                29 
  Step 1: Install Webmin                                                 30 

Part 6: Install DNS Server                                               32 
  Step 1: Modify “/etc/hosts” and “/etc/resolv.conf” files               32 
  Step 2: Install and Configure Bind9 for DNS Name Resolution            35 
    2.1 Name Resolution                                                  35 
    2.2 Install & Configure Bind9 DNS server                             36 

Part 7: Install and Configure vsFTP Server                               39 
  Step 1: Install and Configure VSFTPD Server                            39 
  Step 2: Users Login                                                    42 

Part 8: Install OpenSSH Package                                          44 

Part 9: Install JDK6                                                     45 
Global Open Versity, ICT Labs                          Step-By-Step Install Guide Linux CentOS-6 Server v1.2



Part 10: Install Ant Package                                                                              46 

Part 11: Install Apache Tomcat 7 Application Server                                                       47 
    11.1 Accessing Tomcat 6 manager and host-manager webapps                                              49 
    11.2 Tomcat examples webapps                                                                          49 
    11.3 Moving around Tomcat7 under command-line                                                         50 

Part 12: Install and Configure NFS                                                                        50 
  Step 1: Install NFS packages On both Server Side and Client Side                                        50 
  Step 2: On the Server Side                                                                              51 
  Step 3: On the client Side – Fedora 14                                                                  52 

Part 13: Install JBoss: Open Source J2EE Server, and Combined JBoss + JPortal on Linux Server             53 
  Step 1: Install JBoss-Portal                                                                            53 
    1.1 Download JBoss-Portal Software on CentOS-6 Server                                                 53 
  Step 1: Installing JBoss-Portal Bundle on CentOS-6 Server                                               53 

Part 14: Troubleshooting FTP Client Connection Failure                                                    60 

Part 15: Troubleshooting SELinux                                                                          61 
  Step 1: Fully Disabling SELinux                                                                         61 

Part 16: Need More Training on Windows                                                                    61 
  Mastering CentOS-5 / RHEL 5/6 Server Administration and System Integration Training - ICT203            61 
  OpenNebula Cloud Computing Training                                                                     62 

Linux Administration Training                                                                             62 

Part 17: Hands-on Labs Assignments                                                                        62 




A GOV Open Access Technical Academic Publications
Enhancing education & empowering people worldwide through eLearning in the 21st Century
                                                                                                           3
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                  ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2




                            Global Open Versity
             Systems Integration Hands-on Labs Training Manual

         Step-By-Step Install Guide CentOS-6 Server Administration
                              and Maintenance
By Kefa Rabah, krabah@globalopenversity.org               October 2011                     GTS Institute


Introduction
CentOS is a community-supported, free and open source operating system based on Red Hat Enterprise
Linux. It exists to provide a free enterprise class computing platform and strives to maintain 100% binary
compatibility with its upstream distribution .CentOS stands for "Community ENTerprise Operating
System". CentOS is the perfect server for people who need an enterprise class operating system stability
without the cost of certification and support and pocket burning baggage that comes with proprietary
software. And the beauty is CentOS is free.

CentOS-6.0 is based on the upstream release of Red Hat EL 6.0 and includes packages from all variants.
All upstream repositories have been combined into one, to make it easier for end users to work with. It
exists to provide a free enterprise class computing platform and strives to maintain 100% binary
compatibility with its upstream distribution, in this case Red Hat EL 6. To-date, CentOS simply remains the
unrivaled champion of rock solid, and with excellent and modern capabilities, good performance and ultra-
long support.

Hands-on Lab Session
In this Hands-on lab session, you will learn how to install CentOS-6 with two NICs. You’ll also learn how to
perform post-installation configuration e.g., upgrade the system with new patches and bug fixes, configure
static IP address from dynamic one, change the computer hostname, modify hosts file, perform ping test
among others. I’ll also show you how to install and administer LAMP stack, setup NFS server, vsftpd
server, JBoss-Portal server etc. Finally, 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. Upon completion of this Hands-on
training you should have gained enough skill to deploy, maintain and administer CentOS-6 server with
ability to extend it to deploy mainstream applications like webhosting etc.


Part 1: Installing and Updating CentOS-6 Server


Step 1: Install CentOS-6 Server
1. Point your browser to CentOS-6 and download DVD ISO Server
2. Once you have downloaded the CentOS-6 ISO specific to your distribution, you have the option
   burning it into CD or just by using the ISO package to install it from your virtual machine, in our case
   VMware.

3. Fire-up a new virtual machine and perform the initial configuration and setup to use ISO package.
                                                                                                           4
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                           Step-By-Step Install Guide Linux CentOS-6 Server v1.2




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

5. From Fig. 1, and hit Enter key to start installation.




    Fig. 1: Hit the <ENETER> key to start loading & installing CentOS-6.



1. From Fig. 2, select OK to test the press the <ENETER> key, to test the CD media and check and verify
   that it was not in anyway damaged or corrupted during the download or burning stages or Skip to
   continue.




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

www.globalopenversity.org                   ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2




                                                                                                 Fig. 2

2. Next, you should see the screen like shown in Fig. 3. Click Next to continue.




                                                                                                 Fig. 3

3. From Fig. 4, select the language you desired to use during installation process, and then click Next.




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

www.globalopenversity.org                ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2




                                                                                                  Fig. 4

4. From Fig. 5, select the appropriate keyboard for the system as desired, and then click Next.




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

www.globalopenversity.org                ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2



5. From Fig. 6 Storage device, accept the default selection, and then click Next to continue.




                                                                                              Fig. 6

6. From Fig. 7, read the warning on "loss of ALL DATA on this drive". Click Re-initialize all, & then
   Next.




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

www.globalopenversity.org                ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2



7. From Fig. 8, type the desired Hostanme and then click on the Next button to continue.




                                                                                           Fig. 8


8. From Fig. 9, click into map to choose region as desired or accept the default, and then click Next.




                                                                                             Fig. 9

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

www.globalopenversity.org                ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2



9. From Fig. 10, enter & confirm root user password e.g., "xxxxx" and then click Next.




                                                                                      Fig. 10

        Warning! Do not loose your root password as you will need to login to your systems for privileged
        systems administration. Warning! For production server, make sure to enter a password with
        good password complexity, for security reason!
10. From Fig. 11, read and accept the default selection, or change as desired, and then click Next.




                                                                                       Fig. 11
                                                                                                        10
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2



11. From Fig. 12, read the warning on "removing ALL DATA on the Linux partition". Click Write
    changes to disk, and then Next.




                                                                       Fig. 12

12. From Fig. 13, just wait as the installation process performs "Formating" task.




                                                                                      Fig. 13

13. From Fig. 14, click "Customize now" to select desired packages, and then click Next.




                                                                                            Fig. 14

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

www.globalopenversity.org                ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2




14. Next, you should see checking dependency screen, as shown in Fig.15. Just wait for them to
    complete.




                                                                              Fig. 15


15. From Fig. 16, Installation screen, just wait for the system to complete the current process, it will
    continue when done.




                                                                                                 Fig. 16


    From Fig. 17, step through the individual components and their packages, but accept the default




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

www.globalopenversity.org                 ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2




                                                                                            Fig. 17


16. When done with it'll go through installing Bottloader screen.
17. Voila! We have successfully completed the installation of CentOS5. Next, click on the Reboot button,
    as shown in Fig. 18.




                                                                                            Fig. 18

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

www.globalopenversity.org                ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2




18. From Fig. 19; just wait for it to complete the reboot process.




                                                                                                Fig. 19

19. Next, from Fig. 20, read and then click Forward.




                                                                                                Fig. 20

20. From Fig. 21, read and accept the license, and the click on the Forward button.

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

www.globalopenversity.org                 ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2




                                                                                             Fig. 21


21. Next, from Fig. 22, on the Create User, enter username & password as desired, then click Forward.




                                                                                             Fig. 22
                                                                                                        15
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, ICT Labs                        Step-By-Step Install Guide Linux CentOS-6 Server v1.2




22. Next, from Fig. 23, on the Date & Time, set as desired, an then click Forward.




                                                                                              Fig. 23

23. Next, from Fig. 24, accept the default, and then click Finish to complete installation.




                                                                                              Fig. 24
                                                                                                         16
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org                 ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration
Global Open Versity, IC
								
To top