P. 1
Step-By-Step Install Guide CentOS 6 Server Administration and Maintenance

Step-By-Step Install Guide CentOS 6 Server Administration and Maintenance

|Views: 24,237|Likes:
Published by Kefa Rabah
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.
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.

More info:

Published by: Kefa Rabah on Oct 06, 2011
Copyright:Attribution Non-commercial
List Price: $24.99 Buy Now

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
See more
See less

09/14/2013

$24.99

USD

Global Open Versity Systems Integration Hands-on Labs Training Manual

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

Table of Contents

Page No.

STEP-BY-STEP GUIDE LINUX CENTOS-6 SERVER INSTALLATION AND ADMINISTRATION
Introduction Part 1: Installing and Updating CentOS-6 Server Step 1: Install CentOS-6 Server Part 2: Post Installation Configurations. Step 1: Perform System Upgrade Step 3: Check Computer Hostname Step 4: Modify the Hosts File Part 3: Installing Apache, PHP, MySQL on CentOS-6 Server Step 1: Install LAMP Step 2: Test PHP Installation Step 3: Lockdown MySQL Database Server Part 4: Installing PostgreSQL Part 5: Installing and Configuring Webmin Step 1: Install Webmin Part 6: Install DNS Server Step 1: Modify “/etc/hosts” and “/etc/resolv.conf” files Step 2: Install and Configure Bind9 for DNS Name Resolution 2.1 Name Resolution 2.2 Install & Configure Bind9 DNS server Part 7: Install and Configure vsFTP Server Step 1: Install and Configure VSFTPD Server Step 2: Users Login Part 8: Install OpenSSH Package Part 9: Install JDK6

4
4 4 4 18 18 20 21 21 21 22 23 26 29 30 32 32 35 35 36 39 39 42 44 45

Global Open Versity, ICT Labs

Step-By-Step Install Guide Linux CentOS-6 Server v1.0

Part 10: Install Ant Package Part 11: Install Apache Tomcat 7 Application Server 11.1 Accessing Tomcat 7 manager and host-manager webapps 11.2 Tomcat examples webapps 11.3 Moving around Tomcat7 under command-line Part 12: Install and Configure Jetty HTTP Application Server Part 13: Install and Configure NFS Step 1: Install NFS packages On both Server Side and Client Side Step 2: On the Server Side Step 3: On the client Side – Fedora 14 Part 14: Install JBoss: Open Source J2EE Server, and Combined JBoss + JPortal on Linux Server Step 1: Install JBoss-Portal 1.1 Download JBoss-Portal Software on CentOS-6 Server Step 1: Installing JBoss-Portal Bundle on CentOS-6 Server Part 15: Troubleshooting FTP Client Connection Failure Part 16: Troubleshooting SELinux Step 1: Fully Disabling SELinux Part 17: Need More Training on Windows Mastering CentOS-5 / RHEL 5/6 Server Administration and System Integration Training - ICT203 OpenNebula Cloud Computing Training Linux Administration Training Part 18: Hands-on Labs Assignments

46 47 49 49 50 50 52 52 52 54 55 55 55 55 62 63 63 63 63 64 64 64

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

g. free and open source operating system based on Red Hat Enterprise Linux. With a handy tool called Webmin as part of your arsenal. Global Open Versity. You’ll also learn how to perform post-installation configuration e. All upstream repositories have been combined into one. to make it easier for end users to work with. configure static IP address from dynamic one. change the computer hostname. setup NFS server. krabah@globalopenversity. JBoss-Portal server etc. It exists to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution . and with excellent and modern capabilities. CentOS-6. And the beauty is CentOS is free. Hands-on Lab Session In this Hands-on lab session.CentOS stands for "Community ENTerprise Operating System". 3.0 is based on the upstream release of Red Hat EL 6. you will learn how to install CentOS-6 with two NICs. Fire-up a new virtual machine and perform the initial configuration and setup to use ISO package. you have the option burning it into CD or just by using the ISO package to install it from your virtual machine. maintain and administer CentOS-6 server with ability to extend it to deploy mainstream applications like webhosting etc.0 Global Open Versity Systems Integration Hands-on Labs Training Manual Step-By-Step Guide Linux CentOS-6 Server Installation and Administration By Kefa Rabah. vsftpd server. Finally. perform ping test among others. Vancouver Canada www. you can regain full control of your servers’ setup and configuration via the Web browser. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.0 and includes packages from all variants.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .. Point your browser to CentOS-6 and download DVD ISO Server 2.org October 2011 GTS Institute Introduction CentOS is a community-supported. in this case Red Hat EL 6.globalopenversity. Kefa Rabah. To-date. upgrade the system with new patches and bug fixes. Upon completion of this Hands-on training you should have gained enough skill to deploy. modify hosts file. I’ll also show you how to install and administer LAMP stack. Part 1: Installing and Updating CentOS-6 Server Step 1: Install CentOS-6 Server 1. Administering Linux and Unix-based servers does not need to be the scourge of your work day. Once you have downloaded the CentOS-6 ISO specific to your distribution. good performance and ultralong support. CentOS simply remains the unrivaled champion of rock solid. in our case VMware. 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. 4 © April 2007. It exists to provide a free enterprise class computing platform and strives to maintain 100% binary compatibility with its upstream distribution.Global Open Versity.

1. select OK to test the press the <ENETER> key. 1: Hit the <ENETER> key to start loading & installing CentOS-6. and you should be able to see the first CentOS-6 installation screen. 2. 5 © April 2007.Global Open Versity.0 4.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Vancouver Canada www. and hit Enter key to start installation. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. 1. Global Open Versity. 5. From Fig. Start the virtual machine. Fig. From Fig.globalopenversity. 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. Kefa Rabah.

org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .0 Fig. Vancouver Canada www. 6 © April 2007. 4. Next. Kefa Rabah. 2 2. Click Next to continue. 3.Global Open Versity. select the language you desired to use during installation process.globalopenversity. and then click Next. From Fig. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Global Open Versity. you should see the screen like shown in Fig. Fig. 3 3.

0 Fig. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. 5 7 © April 2007. 5.globalopenversity. Kefa Rabah. Vancouver Canada www. select the appropriate keyboard for the system as desired. 4 4.Global Open Versity.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . and then click Next. Fig. From Fig. Global Open Versity.

Click Re-initialize all.0 5. 6 6. 7. accept the default selection. & then Next. Global Open Versity. From Fig. From Fig. Fig. and then click Next to continue. Vancouver Canada www. 6 Storage device. read the warning on "loss of ALL DATA on this drive".org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Fig. 7 8 © April 2007.Global Open Versity. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.globalopenversity. Kefa Rabah.

8 8. Kefa Rabah. type the desired Hostanme and then click on the Next button to continue. 8.globalopenversity.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Vancouver Canada www. Global Open Versity. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. and then click Next. 9 9 © April 2007. From Fig. 9.Global Open Versity.0 7. Fig. click into map to choose region as desired or accept the default. From Fig. Fig.

0 9. make sure to enter a password with good password complexity. and then click Next. 10. Fig.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . read and accept the default selection. Vancouver Canada www.globalopenversity. "xxxxx" and then click Next.g. 11 10 © April 2007. Global Open Versity. 11.Global Open Versity. for security reason! 10. Fig. From Fig. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. enter & confirm root user password e. Warning! For production server. Kefa Rabah. 10 Warning! Do not loose your root password as you will need to login to your systems for privileged systems administration. or change as desired.. From Fig.

Fig. 12 12.globalopenversity. 14. Fig.Global Open Versity.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Click Write changes to disk. just wait as the installation process performs "Formating" task. 12. 13. 13 13.0 11. and then Next. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. From Fig. Kefa Rabah. read the warning on "removing ALL DATA on the Linux partition". Fig. and then click Next. From Fig. click "Customize now" to select desired packages. Global Open Versity. From Fig. Vancouver Canada www. 14 11 © April 2007.

0 14. Just wait for them to complete. step through the individual components and their packages.15. Kefa Rabah.Global Open Versity.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . 15 15. 16. Next.globalopenversity. Vancouver Canada www. Fig. you should see checking dependency screen. just wait for the system to complete the current process. From Fig. 16 From Fig. Fig. Global Open Versity. 17. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. it will continue when done. as shown in Fig. Installation screen. but accept the default 12 © April 2007.

Fig. 17. Global Open Versity. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. 17 16.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . 18. Voila! We have successfully completed the installation of CentOS6. When done with it'll go through installing Bottloader screen. Next. click on the Reboot button. as shown in Fig. 18 13 © April 2007.globalopenversity.0 Fig. Vancouver Canada www.Global Open Versity. Kefa Rabah.

14 © April 2007.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .Global Open Versity. From Fig. Kefa Rabah.globalopenversity.0 18. read and accept the license. 20. read and then click Forward. Next. 19 19. just wait for it to complete the reboot process. and the click on the Forward button. Fig. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Fig. From Fig. 20 20. from Fig. Vancouver Canada www. 21. 19. Global Open Versity.

then click Forward. on the Create User. from Fig. Next. 21 21. 22. Kefa Rabah.Global Open Versity. Global Open Versity.0 Fig.globalopenversity. Vancouver Canada www. 22 15 © April 2007. enter username & password as desired. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Fig.

24. and then click Finish to complete installation. Next. Vancouver Canada www. Kefa Rabah. from Fig. Global Open Versity. on the Date & Time.0 22. an then click Forward. from Fig.Global Open Versity. Fig. accept the default. 23. set as desired. Fig. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. 24 16 © April 2007.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .globalopenversity. Next. 23 23.

Vancouver Canada www.globalopenversity. Global Open Versity. You should now be on the root user Desktop (or Home).org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . as shown in Fig. from Fig.Global Open Versity. Fig. 25. Next. 26. Kefa Rabah. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.0 24. login with username "Net Admin" and password "xxxxxx". which we had created earlier during the installation stage. 25b 25. 17 © April 2007. 25a Fig.

0 Fig. we’re going to perform other postinstallation work like system upgrade etc. Vancouver Canada www.globalopenversity. You’re done with CentOS-6 server installation. as shown in Fig. Click Application -> System Tools and the select Terminal. 18 © April 2007. Kefa Rabah. Global Open Versity.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . perform the following procedures: 1. To do this. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. 26 26. In the next section. Step 1: Perform System Upgrade For best practices in IT.Global Open Versity. 27. it’s important to always perform systems upgrade after initial installation is completed. Part 2: Post Installation Configurations.

globalopenversity. From Terminal window. 28: This enables the NIC to be activated. issue the command "ifconfig" to view your interface IP address. 29: Fig. Vancouver Canada www. Kefa Rabah.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . as shown in Fig. 27 2.0 Fig. issue the command "ifup eth0" as shown in Fig. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. 28 3. Next. Fig.Global Open Versity. 29 19 © April 2007. Global Open Versity.

But first let’s check the current hostname.0 4. 30 5. then you can alternatively issue the command [root@centos6 ~]# /etc/init. To check the hostname issue "hostname" command.globalopenversity. 1.Global Open Versity. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.com" Fig. issue the "hostname" command to view and verify that our new hostname was indeed correct. 30: This enables the system to get the latest patches and bug fixes. 31 2. 1. In the next section we’re going to learn how to change NIC adapter configuration from dynamic IP address to static IP address. from the Terminal window. Fig. Global Open Versity. [root@centos6 ~]# gedit /etc/sysconfig/network change the hostname as desired remember to save it.govsystemhos. In case you’re interested in changing the hostname to. Step 3: Check Computer Hostname In this section we’re going to change the computer hostname. say: "server1. Or if you want to continue working and restart the system latter. as shown in Fig. Vancouver Canada www. Kefa Rabah.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .mydomain. 31. which shows the current hostname is: : "rhel6. issue the command "yum update –y" as shown in Fig. To do so. From Terminal window. 20 © April 2007. change to the directory "/etc/sysconfig" and use your favorite Text editor to edit the "network" file.d/network restart Next. Reboot the system for the changes to take effect.org". You’re now down with system update.

Part 3: Installing Apache. Configure the service to start automatically /sbin/chkconfig httpd on /sbin/chkconfig --add mysqld /sbin/chkconfig mysqld on /sbin/service httpd start /sbin/service mysqld start 3. We’ll use "yum" to handle of the required packages Step 1: Install LAMP 1. In this step we want to modify the hosts file to reflect our new "Fully Qualified Hostname" and IP address. database-driven web site. Kefa Rabah. Vancouver Canada www. This is the opportunity to install Apache2 (httpd). -y 21 © April 2007. PHP. MySQL on CentOS-6 Server These will the basic components for a dynamic. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. from the Terminal issue the command: [root@centos6 ~]# gedit /etc/hosts 2. yum install httpd php mysql -y Note: Troubleshooting: In case you encounter dependencies problem. and the component that allows PHP to talk to MySQL database: Run this command if you didn’t initially install any during the initial installation. as shown in Fig.Global Open Versity. MySQL (server and client). PHP.0 Step 4: Modify the Hosts File 1. Test your httpd functionality. then you can perform yum command with "—skip-broken" option. go to http://localhost or http://your-domain or http://ip-address. and if all works well.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . it should display RHEL6 Test Page.globalopenversity. Global Open Versity. as follows: yum install httpd php mysql --skip-broken 2. To do this. You’re done with this section. 32.

0 Fig. Create a test PHP script "testinfo. Global Open Versity. Following the above steps for Apaache2 setup. You’re done with Apache2 server setup and testing. A useful test script sample: <?php phpinfo(). Step 2: Test PHP Installation 1. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Kefa Rabah. 22 © April 2007. 33. 32 4.Global Open Versity. Copy the testinfo. the document root for Apache is "/var/www/hmtl/" 2. as follows cp testinfo. ?> 3.php file to the /var/www/html/ directory.php /var/www/html Now fire-up your browser and type: http://localhost/test. Vancouver Canada www.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .php and you should the browser rendered as shown in Fig.globalopenversity.php" and place it in the documents root.

you’re prompted to setup MySQL root user password! 23 © April 2007. ANY user on the box can login to mysql as database root. if you haven’t done so. Without a password. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.0 Fig. Kefa Rabah. 33 5. Step 3: Lockdown MySQL Database Server IMPORTANT! Set up the MySQL database root password.globalopenversity. Vancouver Canada www.Global Open Versity. Global Open Versity. Start MySQL (mysqld) daemon service. run: # service mysqld start Note: from the figure below.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . 4. The mysql root account is a separate password from the machine root account. You’re done with PHP5 setup and testing.

Global Open Versity. When initially installed. Kefa Rabah. Global Open Versity. Vancouver Canada www.globalopenversity.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.0 Fig. 34 5. 35): $ mysql –u root 24 © April 2007. the MySQL database has no password and you can simply login without password by typing (see also Fig.

perform the following procedure: 1.user WHERE user =''. Create a database and database user for your data. Make additional security-related changes to lockdown MySQL server. mysql> FLUSH PRIVILEGES. mysql> FLUSH PRIVILEGES. 35 To lockdown MySQL server. mysql –u root –p mysql> DROP DATABASE test.Global Open Versity. Kefa Rabah. mysql> GRANT ALL PRIVILEGES ON webdb. The "GRANT" statement actually creates a new MYSQL user account. mysql> GREATE DATABASE webdb. mysql> DELETE FROM mysql. mysql>quit 25 © April 2007. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.globalopenversity. as follows: mysqladmin –u root password 'new-password' \\quotes are required mysqladmin –u root –h localhost password 'new-password' -p'new-password' 6.* TO 'webuser'@'localhost' IDENTIFIED BY 'weppass'. Create a password for MySQL root user account. mysql>quit \\removes the test dbase \\removes anonymous across 7.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . You will use this database and username in your database connection string.0 Fig. Global Open Versity. Vancouver Canada www.

org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . 37 9. Do this if you didn’t initially install it.globalopenversity. configuration and testing. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.0 Fig. Fig. You’re done with MySQL setup. 36 8. 37: Fig. You’re done with this section Part 4: Installing PostgreSQL Here we’ll install the PostgreSQL database server and the component required to write PHP scripts that communicate with postgresql. To check if your just created database has been created correctly. as follows. Global Open Versity. 10. We use yum to handle dependencies 26 © April 2007. Kefa Rabah. loin as user ″webuser″ with password ″webpass″. Vancouver Canada www.Global Open Versity.

to enter the default postgresql database -bash-4.0 and gather all of the http://www. Global Open Versity.1$ psql template1 The whole sequence is as shown in Fig. 38. Kefa Rabah. We need to initialize PostgreSQL database.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . "psql template1". Configure the new service to start automatically on boot: # /sbin/chkconfig –-level 345 postgresql on # /sbin/service postgresql start Note: when you start postgresql for the first time.postgres \\the dash "-" is important! 4. Run: # service postgresql initdb 3. 27 © April 2007. issue the command. 4. it’ll initialize the database. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.postgresql. # su . see 1. Start the postgresql interactive shell and create your first user and database. For more information on PostgreSQL. Vancouver Canada www. Next. To install PostgreSQL and the component that allows PHP to talk to it. run: # yum -y install postgresql postgresql-server php-pgsql 2.Global Open Versity.org required packages.globalopenversity.

Next create the database "webdb" -bash-4. Kefa Rabah. 5. Check the version of your postgresql database: Fig. Vancouver Canada www.1$ createdb –O webadmin webdb -bash-4. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.globalopenversity.0 Fig.Global Open Versity.1$ 11.7 28 © April 2007. Now connect into your newly created database: -bash-4. 39 6. 38 Note: "template1"is the database that is included by default with PostgreSQL.1$ -bash-4. Global Open Versity.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Now create dbase user "webadmin" and make him a superuser: -bash-4.1$ psql webdb Psql (8.4.1$ createuser -P webadmin Enter password for new role: Enter it again: Shall the new role be a superuser? (y/n) y -bash-4.1$ 1.

web_db=# 12. Modify the local line to use "md5" based authentication rather than "ident". Test your connection. but I will not go over it in detail because you will learn more about it in the coming modules. Webmin is the most powerful administration tool in its nature. It is not difficult to use Webmin because it is web based. Global Open Versity. Restart the postgresql database service. Logout of your dbase: webdb=# \q -bash-4.globalopenversity. in any event. # /sbin/service postgresql reload 16. Edit the postgres host based access "pg_hba" configuration file: # vi /var/lib/pgsql/data/pg_hba. You’re on installing and configuring PostgreSQL database. Log back into the server # su – postgres 17. Hooray! – Enjoy LAMP server. 19. Kefa Rabah.Global Open Versity. for example. Please review the PostgreSQL documentation before making this change and take the security local all all md5 15.conf 14. 29 © April 2007. you can regain full control of your servers’ setup and configuration via the Web browser. you should also know that you can use it remotely to administrate your network servers.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .0 Type "help" for help. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. # psql -U webadmin webdb \\ or psql webdb \\ restarts postgresql 18. You can use it. With a handy tool called Webmin as part of your arsenal.1$ logout [root@centos6 ~]# 13. to setup DNS Server. Vancouver Canada www. Part 5: Installing and Configuring Webmin Administering Linux and Unix-based servers does not need to be the scourge of your work day.

ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. as shown in Fig. At the time of writing this hands-on it was version: webmin-1. and type in: "rpm –ivh webmin*". From Fig. including Mac OS X. Fig. 3. To install the rpm. enter your login credentials.noarch. open your favorite Web browser and go to: http://localhost:10000 or in our case http://centos6. 40 5. change to the download directory. To Install Webmin and get started. in this case root user.530-1. 2. Webmin also supports a large number of UNIX variants. Kefa Rabah. Vancouver Canada www.com and download the latest release. drop by www. and click on Login. Global Open Versity. Your browser will be promise you with “Error –Bad Request”. 30 © April 2007.Global Open Versity.com:10000 4.globalopenversity. 41.e.webmin. You can use RPMs for RHE/CentOS and related systems that support binary installations or you can build Webmin from source. i.: # rpm –ivh webmin* • When done.0 Step 1: Install Webmin Now we need to install Webmin to ease your server administration pain! 1. simply open a terminal session. Click on the link to proceed and accept the Untrusted certificate.govsystemhost..org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .rpm. 40.

Vancouver Canada www. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Login with root user credentials and you should be able to access the Webmin admin page as shown in Fig. 42: Webmin Admin page 31 © April 2007. Kefa Rabah. Global Open Versity.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .Global Open Versity. You may be prompted to update Webmin! Fig.0 Fig.globalopenversity. 42. 41 6.

Part 6: Install DNS Server In this section it’s assumed that you know how to install and configure a DNS Server on a Linux machine. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Edit "/etc/hosts" file to reflect the correct hostname. 43.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Vancouver Canada www. You’re done with this section.conf” files 1. 43 2. run: # vi /etc/sysconfig/network-scripts/ifcfg-eth0 and the set the details as shown in Fig.globalopenversity. as shown in Fig.Global Open Versity. Kefa Rabah. Step 1: Modify “/etc/hosts” and “/etc/resolv. then check out our excellent Hands-On Labs training manual. Global Open Versity. 44. entitled “Using Webmin and Bind9 to Setup DNS Server on Linux” to get you started.0 7. Now to set static IP on eth0. Fig. if not. Here we’re going to use Webmin and Bind9 to deploy DNS Server. Click Logout to exit Webmin 8. 32 © April 2007.

Global Open Versity. Kefa Rabah. Vancouver Canada www.Global Open Versity. 44 Note: alternative you can use "system-config-nework" command to achieve the same task. On the following screen. 33 © April 2007. system-config-nework Fig.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . as shown in Fig. 45. and hit enter.globalopenversity. select eth0 device.0 Fig. 45 3. and select Device Configuration. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.

edit "/etc/resolv.conf" file to reflect the correct nameserver. should show the same parameters we just entered under the command line above.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .0 4. Next. 47. Fig. Figure 46. select DNS Configuration and change the details to match your environment.globalopenversity. 55 above. and the select OK and hit enter.Global Open Versity. Kefa Rabah. as shown in Fig. Vancouver Canada www. Global Open Versity. 47 6. 34 © April 2007. Fig. 48. 46 5. see Fig. domain and search. Next from Fig. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.

org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Fig.globalopenversity. Vancouver Canada www. The following section will explain how to install Bind9 35 © April 2007. We’re done with this section Step 2: Install and Configure Bind9 for DNS Name Resolution 2. to check and verify your settings. we need to bring the network interface down and back up. 49 9.0 Fig. 48 7.Global Open Versity.1 Name Resolution Name resolution as it relates to IP networking is the process of mapping IP addresses to hostnames. 8. making it easier to identify resources on a network. Kefa Rabah. Now use ifconfig command. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. To apply changes. issue "ifdown eth0" and "ifup eth0" commands to restart eth0 interface. Global Open Versity.

ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . scroll down to the Existing DNS Zones heading. Global Open Versity. as shown in Fig.0 DNS Server and how to properly configure your system for name resolution using DNS and static hostname records.Global Open Versity. if it’s not already installed.globalopenversity. Next. Kefa Rabah. Vancouver Canada www. 50 3. Next click on Servers link on the left-hand pane and then click BIND DNS Server. On the right pane. as shown in Fig. 50. by issuing the following command yum install bind* -y 2. Use yum to download and install Bind9. Now fire-up your browser and point it to Webmin admin page: http://localhost:10000.2 Install & Configure Bind9 DNS server 1. and when done. 51. you should have a modified Existing DNS Zones with two additional icons. 36 © April 2007. Fig. 2. configure the DNS server.

com".govhostinglabs.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . then instead issue the "dig @localhost centos6. Kefa Rabah. 51 4. 52. Now issue the "dig centos6.govhostinglabs. Global Open Versity. 52 Note: if you encountered any error. if you encountered any error like shown in Fig. however. Note: you can also run. like “connection timed out no servers could be reached”.globalopenversity. "tail /var/log/messages" to view what’s going on! 37 © April 2007. Vancouver Canada www.com".Global Open Versity.0 Fig. Fig. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.

Global Open Versity. Now issue "dig @localhost mx centos6. Kefa Rabah.com".org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Vancouver Canada www. 53 5.0 Fig. 54. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. 38 © April 2007.globalopenversity. Global Open Versity. as shown in Fig.govsystemhost.

Step 1: Install and Configure VSFTPD Server 1. run: 39 © April 2007. Kefa Rabah. 54 6. most importantly. stable.Global Open Versity. and. Part 7: Install and Configure vsFTP Server The Very Secure FTP Daemon (vsftpd) is designed from the ground up to be fast. You’re done with this section.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . let’s verify if vsftpd is installed on your system: # yum list installed | grep ftp Note: If nothing.globalopenversity. Its ability to handle large numbers of connections efficiently and securely is why vsftpd is the only stand-alone FTP distributed with Red Hat Enterprise Linux. You can install these with yum very easily (yum or rpm utility to install it) 1.0 Fig. First. secure. Vancouver Canada www. To install vsftpd using YUM. Global Open Versity. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. the standard CentOS packages seem to be vsftp and proftp.

2.rpm" (in your CentOS-6 DVD ISO under Centos folder). Global Open Versity. using either one of these: # netstat -nap | grep 21 or: # ps -ef | grep -i ftp If it's not installed then run: # yum install ftp -y or more simply: # ftp localhost 40 © April 2007. Alternatively. Let’s vsftpd auto-at start boot-time. issue the command # chkconfig vsftpd on 6.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .globalopenversity. 4. To start vsftpd service: # service vsftpd start 5.Global Open Versity. Vancouver Canada www. You can also grab it from DVD.0 # yum install vsftpd -y Note: you can also use "rpm -iUVh vsftpd*. ensure your firewall is not blocking (you might temporary disable firewall to diagnose first). you can open port 21.conf 3. You can now edit "vsftpd. Kefa Rabah.conf" file and make necessary changes # vi /etc/vsftpd/vsftp. Now check if ftp client is running. "service iptables stop". Next. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.

Kefa Rabah. and browse to the desired folder.globalopenversity. then check troubleshooting notes at the en of this training manual. Vancouver Canada www.Global Open Versity. Global Open Versity. 7. 55 Note: you’ll be required to login with appropriate username credentials. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. You can also test vsftpd from your browser: ftp://localhost address. In case you get login failure .0 Fig. or http:/domain-name or http://ip- 41 © April 2007.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .

ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. To restart vsftpd service: # service vsftpd restart 10. Step 2: Users Login 12. Kefa Rabah. as root type: # /sbin/service vsftpd condrestart 9. To stop vsftpd service: # service vsftpd stop 11. and as you can see I have one file listed in it. as user szulu with password xxxxxx.Global Open Versity. because it does not start the daemon if it is not running. Let’s login using ftp client.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .0 Fig. You’re done with this section. The condrestart (conditional restart) option only starts vsftpd if it is currently running. To conditionally restart the server. This option is useful for scripts.globalopenversity. 8. 56 Note: the pub folder is located under "/var/ftp" directory. Global Open Versity. Vancouver Canada www. as follows: 42 © April 2007.

58 14. Now let’s change to "/home". ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Global Open Versity. ftp> cd /home Fig. Vancouver Canada www. While still logged in as user Shaka Zulu (szulu). and you should be able to access all files and folder under this directory. 57 13. ftp> cd /var/ftp/pub Fig.0 [root@centos6 ~]# ftp localhost Fig.Global Open Versity. 59 43 © April 2007. Kefa Rabah. you should only be able to access files and folder under only you home directory. and although you can see all the other users’ home folders.globalopenversity.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . change to "/var/ftp/pub" directory.

g. you will need to install the OpenSSH package. You’re done with this section.Global Open Versity. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. To log into a remote computer that is running OpenSSH. close the ftp connect and exit.globalopenversity. issue the following command (skip if you have installed it!): # yum install openssh-server -y # /sbin/chkconfig --level 345 sshd on # service sshd start 2.com) of your server.40.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . When done. By default this package is already installed in the RHEL6 server option. ftp> • Now try login to your own home directory: ftp> cd /home/szulu 250 Directory successfully changed. example. 192.168.83. 1. For example. replacing username with a valid user name on the computer you are trying to log into. ftp 15. or it’s IP address (e.g.168. Kefa Rabah. This package will come in handy in the future to support administrative tasks on the system. as follows: ftp> ftp> close 221 Goodbye. ftp> quit [root@centos6 ~]# 16. 3. To install OpenSSH. Global Open Versity. Vancouver Canada www. run: 44 © April 2007. Part 8: Install OpenSSH Package In order to support secure remote connections to your server. you use the ssh username@hostname command.83.0 • Now try to change into user scraig’s home directory: ftp> cd /home/scraig 550 Failed to change directory.40). let’s login remotely to server via SSH as user szulu with password xxxxx and IP address 192. and replacing hostname with either the fully qualified host name (e.

which you can verify by typing: ]# java -version Fig. To download Java SE SDK 6.0 ssh szulu@192. Kefa Rabah. 2. You’re done with this section. in case you wish to install the Sun Java. 61 However.jsp.Global Open Versity. you can perform the following procedure: 1.40 Note 1: you’ll be asked to respond to yes/no and also enter root’s password.bin. 4. they can install PuTTY: a free telnet/ssh client.sun. and save it in /usr/java directory. And as you can observe we have successfully remotely logged in as user root. Part 9: Install JDK6 CentOS-6 now comes pre-installed with OpenJDK.globalopenversity. and follow the instructions to download a file called: jdk-6u23-linux-x64-rpm.83. Vancouver Canada www.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Now you can use your usual Linux commands to remotely manage your Linux server. 60 Note: for those using Windows based systems. now Oracle. You may have to create the java directory if it’s not there. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Fig. just go to http://java.com/javase/downloads/index.bin /usr/java # cd /usr/java 45 © April 2007. just type following commands in /usr/java directory. Global Open Versity. To install Java SE SDK. # mkdir –p /usr/java # cp jdk-6u23-linux-x64-rpm.168.

0_23 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=$CLASSPATH:. and save it in /usr/ directory. Next. so that it now look like: export JAVA_HOME=/usr/java/jdk1.0_23 which displays the path to your Java SDK. Verify that JAVA version is defined correctly. To download Tomcat 6.2-bin. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1./jdk-6u23-linux-x64-rpm.8. run: # cp apache-ant-1.tar.tar. 4. # ln –s /usr/apache-ant-1.apache.tar. 5. Kefa Rabah.gz 3.gz /usr/ # cd /usr # tar -zxvf apache-ant-1. run: ]# echo $JAVA_HOME /usr/java/jdk1.cgi. You have now successfully installed JDK6.Global Open Versity. You’re done with this section.bin #. Set the JAVA_HOME environment variable. and follow the instructions to download a file called: apache-ant-1.6.bin 3. You have the option to create a symbolic link to the ant directory. run: ]# java -version 6.org/bindownload.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . 2.8. Vancouver Canada www.2-bin.8. Add Tomcat to the profile file /etc/profile.2 /usr/ant 4. in /etc/profile is run at startup and when a user logs into the system.gz. just go to http://ant.6. Global Open Versity.2-bin. Verify that JAVA_HOME is defined correctly. Part 10: Install Ant Package 1.8. we are going to install tomcat in /usr directory.0 # chmod +x jdk-6u23-linux-x64-rpm. so you will need to log out and log back in for JAVA_HOME to be defined.0_23 export ANT_HOME=/usr/ant export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH 46 © April 2007. by modifying /etc/profile so it includes the following: export JAVA_HOME=/usr/java/jdk1.globalopenversity.6.

To download Tomcat 7. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Kefa Rabah. # ln –s /usr/tomcat7/apache-tomcat-7.7.Global Open Versity. Before we begin.0 5. issue the following command to update /etc/profile file: # source /etc/profile 6. # $CATALINA_HOME/bin/startup. we will need to ensure that ANT_HOME is correctly set. run: # cd /usr # tar -xvzf apache-tomcat-7. you can start Tomcat with the following command. so that it now look like: export JAVA_HOME=/usr/java/jdk1. just go to http://tomcat. we are going to install tomcat in /usr directory. Next.5.0. Before we begin.gz. 2.0_23 export ANT_HOME=/usr/ant export CATALINA_HOME=/usr/tomcat export PATH=$JAVA_HOME/bin:$CATALINA_HOME/bin:$ANT_HOME/bin:JETTY_HOME/bin:$PATH CLASSPATH=$CLASSPATH:. we will need to ensure that CATALINA_HOME is correctly set. 5.6.org/. To do this.globalopenversity. Add Tomcat to the profile file /etc/profile.tar. Vancouver Canada www.apache.0. We’re done with this section Part 11: Install Apache Tomcat 7 Application Server 1.0. we open a terminal and run: # echo $CATALINA_HOME 7.gz 3. If everything is fine.tar. we open a terminal and type the following: # echo $ANT_HOME 6.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . and follow the instructions to download a file called: apache-tomcat-. Global Open Versity.22.sh 47 © April 2007. and save it in /usr/directory. The following command creates a symbolic link to the tomcat directory.22 /usr/tomcat 4. To do this.

open a Web browser. If everything is fine.0 Fig.Global Open Versity. Fig. Logout and login again for the environment setup to take effect: 9. To verify that the Tomcat installation is complete.globalopenversity. or you can also simply use http://localhost:8080. and type in following URL: http://<your-tomcat_IP>:8080. 62 8.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . you should be able to see a web page such as one shown in Fig. DNS. Global Open Versity. 63 48 © April 2007. 63. Kefa Rabah. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Vancouver Canada www.

11. or http://ip-address:8080/manager/html. You can install them.xml and you need to add he following text (note change as desired!) <tomcat-users> <role rolename="admin-gui"/> <role rolename="admin-scrip"/> <user username="tomcat" password="s3cret1" roles="admin-gui. by entering the following command in the terminal prompt: # yum install tomcat7-examples 4.globalopenversity.2 Tomcat examples webapps The tomcat6-examples package contains two webapps that can be used to test or demonstrate Servlets and JSP features.0 10.admin-script"/> <user username="user1" password="mypassword" roles="standard. Point your browser to: http://yourserver:8080/examples 5. type: # $CATALINA_HOME/bin/shutdown. which you can access them by default at http://yourserver:8080/examples . Now restarted tomcat service.Global Open Versity. You’re done with this section. Using your favorite Text editor. managerscript"/> </tomcat-users> 2.1 Accessing Tomcat 7 manager and host-manager webapps In this section you’ll learn how to setup Tomcat7 manager role in http://localhost:8080/manager/html. open: # vi /usr/tomcat7/conf/tomcat-users. if you haven’t done so yet. To stop Tomcat. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. 49 © April 2007.xml" file to add the roles and user as follows: 1. Global Open Versity. Using appropriate user credentials you should be able to access http://localhost:8080/manager/html. Kefa Rabah. you’ll need to modify "/usr/tomcat/conf/tomcat-users. which will prompt for a username and password. Vancouver Canada www. You’re done with section.sh 7.sh 3.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . order to access To do this. run: # $CATALINA_HOME/bin/startup. 11.

Global Open Versity, ICT Labs

Step-By-Step Install Guide Linux CentOS-6 Server v1.0

11.3 Moving around Tomcat7 under command-line 1. Open anew Terminal widow and change to /usr/tomcat7/ folder which is writeable and run: ls /usr/tomcat7/ Note: you should see these directories bin, conf, lib, logs, webapps, temp, and work • webapps - is where your servlets will go ( or at least a xml file that points to them ) as a test download this war file http://simple.souther.us/SimpleServlet.war • Once you have .war file, then you can use the tomcat management page and select war file to deploy (in the deploy section) to upload this file to your server. 2. Optionally you can download the .war files directly to your the webapps folder cd /usr/tomcat/weapps/ wget http://simple.souther.us/SimpleServlet.war tomcat should recognize the war file and expand it with everything you need 3. Point your browse to http://serverip:8080/SimpleServlet/

4. You’re done with this section.

Part 12: Install and Configure Jetty HTTP Application Server
Jetty is a pure Java-based HTTP server and Java Servlet container. Jetty is developed as a free and open source project as part of the Eclipse Foundation. The web server is used in products such as ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Google App Engine, Eclipse, FUSE, Twitter's Streaming API and Zimbra. Jetty is also the server in open source projects such as Lift, Eucalyptus, Red5 50
© 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.0

and Hadoop. Jetty supports the latest Java Servlet API (with JSP support) as well as protocols SPDY and WebSocket. 1. To download Jetty, just go to here which at the time of writing this article, was: "jetty-distribution9.0.5.v20130815.tar.gz", and save it in /usr/directory. 2. Next, we are going to install tomcat in /usr directory, run: # cd /usr # tar -xvzf jetty-distribution-9.0.5.v20130815.tar.gz 3. The following command creates a symbolic link to the tomcat directory. # ln –s /usr/jetty-distribution-9.0.5.v20130815 /usr/jetty 4. Add Jetty to the profile file /etc/profile, which should now look like: export export export export JAVA_HOME=/usr/java/jdk1.6.0_23 JETTY_HOME=/usr/jetty ANT_HOME=/usr/ant CATALINA_HOME=/usr/tomcat

export PATH=$JAVA_HOME/bin:$CATALINA_HOME/bin:$ANT_HOME/bin:JETTY_HOME/bin:$PATH

CLASSPATH=$CLASSPATH:. 5. Finally, point your browser to: http://localhost:8080 or http://ip-address:8080, or http://domain-name:8080.

51
© 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.0

6. Jetty did most of the work for us by providing the jetty.sh script (under the bin directory). Just copy this file to /init.d/ : # cp jetty/bin/jetty.sh /etc/init.d/jetty

7. By now, you can start jetty by executing : /etc/init.d/jetty start or service jetty start 8. You're done with this section.

Part 13: Install and Configure NFS
To use NFS successfully, you have to configure the server and the client. In this section, the client is "192.168.83.5" and the server is "192.168.83.40". The folder to be shared is "/nfs-public", and is to be mounted to "/mnt" on the client side. NSF Server: NSF Client: 192.168.83.40 192.168.83.5 centos6.govhostinglabs.com server01.govhostinglabs.com

Note: before starting to setup NFS, please do ensure that you can ping both machines, e.g., from server to client machine and vise versa.

Step 1: Install NFS packages On both Server Side and Client Side 1. On the bothe server RHEL6 and on client machine running F13 ensure that nfs package is installed, if not then issue the following command: # yum install nfs* -y Step 2: On the Server Side A server exports a file system to the specified hosts and allows them to mount it. 1. Make directory that you want to use. # mkdir /nfs-public 2. Using you favorite Text editor, edit "/etc/exports", insert the client machine's IP address: 52
© April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org

ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration

d/nfs start # /etc/init.255.globalopenversity.com: /nfs-public centos6. Kefa Rabah.Global Open Versity.255. Global Open Versity.allow" # vi /etc/hosts.168. Next. 53 © April 2007.wdelay.d/rpcbind start Note: under CentOS-6 portmap service has been replaced by rpcbind service 7.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . You’re done with this section. start nfs and rpcbind services: # /etc/init. Save the file.0/255.com(rw. 4.govhostinglabs. Verify that "exportfs -v" command that it got exported correctly: [root@centos6 ~]# exportfs -v /nfs-public centos6.0 5.govhostinglabs. 6.govhostinglabs. Vancouver Canada www.sync) 3. Finally.no_root_squash.com [root@centos6 ~]# 9.0 # vi /etc/exports and add this line: /nfs-shared centos6. Now verify using "showmount -e" command: [root@centos6 ~]# showmount -e centos6 Export list for centos6.govhostinglabs.com(rw.allow and add this line: ALL:ALL ALL: 192.root_squash. edit "/etc/hosts. Save the file. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.83.no_subtree_check) [root@centos6 ~]# 8.

Kefa Rabah. Check "/var/log/messages" for any error that might occur # tailf /var/log/messages 7.com 10.d/nfs start # /etc/init.com 3.d/rpcbind start Note: under server01 portmap service has been replaced by rpcbind service 4.83. Make mount-point directory: # mkdir /mnt/nfs-public 5. Edit "/etc/fstab" to mount the shared folder on boot: # vi /etc/fstab and add this line: 192. otherwise you’ll end-up with 6. Similarly from the server side repeat the same: # ping server01. you can test this using ping command. from client side. Vancouver Canada www. Use mount command to check if the folder is mounted properly: [root@server01 ~]# mount 8.0 Step 3: On the client Side – Fedora 14 2.intr 0 0 9.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Mount the nfs folder # mount –t nfs4 centos6:/nfs-public /mnt/nfs-public Note: remember to use nfs4 instead of just nfs in the above command-line.5:/nfs-public /mnt/nfs-public nfs rw. Finally.168.hard. Global Open Versity.govhostinglabs.Global Open Versity.govhostinglabs. Save the file 54 © April 2007. First and foremost make sure you have connectivity to the NFS server from the NFS client and vise versa. as follows: # ping centos6. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.globalopenversity. start nfs and rpcbind services: # /etc/init. For example.

open source Java application server. It is the most widely used application server on the market. The ready availability of the source code allows you to debug the server. Global Open Versity.0 10.7.bundled. 1. Add JBoss+Portal to the profile file /etc/profile. You’re done with this section Part 14: Install JBoss: Open Source J2EE Server. The highly flexible and easy-to-use server architecture has made JBoss AS the ideal choice for users just starting out with J2EE. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.globalopenversity. and Combined JBoss + JPortal on Linux Server Step 1: Install JBoss-Portal This section covers installation of JBOSS (Open Source J2EE Application Server) on CentOS-6. You can also use JPortal to manage network users. Download "jboss-portal-2. Kefa Rabah.2. Move the downloaded to the /usr/jportal directory and then unzip it: # mv jboss-portal-2. as well as senior architects looking for a customizable middleware platform.2.GA-bundled.Global Open Versity.0_23 export JBOSS_HOME=/usr/jportal/jboss-portal-2. This guide will show you how to install JBoss AS 6.zip /usr/jportal # cd /usr/jportal # unzip jboss-portal-2.4-certified. I am also going to show you how to install the bundled JBoss+JPortal as Application Server that you can use to develop and setup Single-Sign-On (SSO) Identity Management access control using LDAP (OpenLDAP).jboss.GA-bundled. You will learn how to start and stop your JBoss instance.6.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .zip 1.2 55 © April 2007. modify it so that it now looks like: export JAVA_HOME=/usr/java/jdk1.1 Download JBoss-Portal Software on CentOS-6 Server Step 1: Installing JBoss-Portal Bundle on CentOS-6 Server 1.0. Vancouver Canada www. JBoss AS is a J2EE 1.7. Create a jportal directory in /usr/ directory as follows: # mkdir /usr/jportal 3. and you will also learn about the directory structure and understand what the key services and configuration files are.org/jbossportal/download. You can use 'man exports' to see the options available for "/etc/exports". learn its inner workings and create customized versions for your personal or business use.zip" from: http://www.html 2. 11.7.2.7.

sh –S \\ change to bin directory \\ stop server or hit "Ctrl C" 6.7./run. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Before we begin. 2. note the difference in front page color./shutdown. To do this. run: # cd $JBOSS_HOME/bin # sh .2 4. To stop JBoss-portal.Global Open Versity. point your browser to: http://localhost:8080/.globalopenversity. 65.2 3. as shown in Fig. we open a terminal and type the following: # echo $JBOSS_HOME /usr/jportal/jboss-portal-2. To start JBoss-portal.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . 64 5. Log back in and check that the environment is set correctly by issuing this command: ]# echo $JBOSS_HOME /usr/jportal/jboss-portal-2.0 export PATH=$JAVA_HOME/bin:$JBOSS_HOME/bin:$PATH CLASSPATH=$CLASSPATH:. Vancouver Canada www. Global Open Versity. To access JBoss AS.7. 56 © April 2007. run: # cd $JBOSS_HOME/bin # sh .sh \\ change to bin directory \\ start server Fig. Kefa Rabah. we will need to ensure that JBOSS_HOME is correctly set.

to access the login window.0 Fig. and then click on the Login button. and login with the default admin credentials Username ″admin″ and password ″admin″.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. point your browser to: http://localhost:8080/portal Note: click on the Login link. Note: this is a Community Release version. 57 © April 2007. You can always get the Enterprise version from Red Hat.globalopenversity. 65 7. Global Open Versity. Now to access JBoss-Portal server. It’s recommended that you change admin user login credential from the default one. Vancouver Canada www.Global Open Versity. Kefa Rabah.

0 Fig.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . To add a new user. Vancouver Canada www. 58 © April 2007. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.globalopenversity. click on the Admin link at the top right-hand corner Members tab. Global Open Versity. Kefa Rabah. 67 8.Global Open Versity. 66 Fig.

Kefa Rabah. 68 9. 59 © April 2007. a shown in Fig. and complete the required fields.globalopenversity. click Create a new user account. Global Open Versity. Vancouver Canada www. 69.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Under User Management.0 Fig.Global Open Versity. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.

Vancouver Canada www. When done click on the Submit button. Global Open Versity.Global Open Versity. and click on the Submit button complete user addition. 69 10.0 Fig. 70.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .globalopenversity. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Kefa Rabah. 60 © April 2007. Add the new user to Administrator role. as shown in Fig.

org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Vancouver Canada www. Logout and try to login with new user account. 61 © April 2007.globalopenversity. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1.Global Open Versity. 70 11. 71. Global Open Versity. as shown in Fig.0 Fig. Kefa Rabah.

13. 72 2. Vancouver Canada www. 69. Global Open Versity.globalopenversity.Global Open Versity. To solve the problem.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . and all should be OK. Kefa Rabah.0 Fig. For testing purposes. the check that your firewall or SELinux is not blocking the connection. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. If you try to ftp into your ftp server using "ftp localhost" and you’re confronted with error “500 OOPS: cannot change directory: /home/user1”. as shown in Fig. disable SELinux. Enjoy JBoss-Portaling ! Part 15: Troubleshooting FTP Client Connection Failure 1. you may go ahead and disable firewall and SELinux. Fig. 71 12. You’re done with this section. run: 62 © April 2007.

edit the default "/etc/selinux/config" file and change the SELINUX line to "SELINUX=disabled": # This file controls the state of SELinux on the system.0 # setsebool -P ftp_home_dir=1 3. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. if so. For more info.gen. # disabled .SELinux security policy is enforced. Disabling will completely disable all SELinux functions including file and process labeling. Save and then reboot the system.crypt. # strict .Only targeted network daemons are protected.Full SELinux protection.globalopenversity. then check out some of our introductory courses on MS Windows at: Global Open Versity. # SELINUX= can take one of these three values: # enforcing . 6. CentOS and RedHat Enterprise. using your favorite Text editor.ICT203 You can now register and take our superb Mastering CentOS-5 /RHEL 5/6 Server Administration.SELinux prints warnings instead of enforcing.No SELinux policy is loaded. Kefa Rabah. You’re done with this section. Vancouver Canada www. You're done with section. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted . Part 17: Need More Training on Windows Are you having trouble understanding or comprehending the working of MS Windows OS. In Fedora Core. 4. Mastering CentOS-5 / RHEL 5/6 Server Administration and System Integration Training . # permissive .org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . SELINUXTYPE=targeted 5. administration and system integration from simple task to cloud computing with Eucalyptus and OpenNebula cloud. This Training cover compete server installation. check: http://www.html Step 1: Fully Disabling SELinux Fully disabling SELinux goes one step further than just switching into permissive mode.Global Open Versity. Vancouver Canada. Enforcing and Disabled depending on your requirements. Global Open Versity. • ICT203 – Mastering CentOS-5/6 and RHEL 5/6 Training 63 © April 2007. Part 16: Troubleshooting SELinux You have the option to set SELinux into three options: Permissive.nz/selinux/disable_selinux.

6. Sendmail server with SquirrelMail Webmail on it.org URL: www. 4. install and configure Linux Ubuntu 10.2 Build and Deploy Enterprise sipXecs Integration with Openfire Integrate MS Outlook 2007 Addressbook with SugarCRM Contacts on Windows Build Private Clouds with Ubuntu 10. 6. 2. Install Linux CentOS-6 server and ensure it’s updated with the latest patches and bug fixes. ftp server on it. 5.Global Open Versity.04 LTS (Lucid Lynx) VM and install Webserver.0 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. Global Open Versity. Kefa Rabah.org Linux Administration Training Make a smart move. Continue assessment progress marks will be awarded as part of the grading systems: 1. join our Linux program today: • Linux Enterprise Infrastructure Engineering Diploma – ICT202 Part 18: Hands-on Labs Assignments You’re required to complete these assignments as part of class assignments and submit the results to your respective instructor. 3. install and configure Linux Ubuntu 11. 4.04 LTS (Natty) VM and install EHCP IS Hosting on it. 2.10 LTS Enterprise Cloud Platform 64 © April 2007. Using Webmin and Bind9 to Setup Enterprise DNS Server on Linux 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. Vancouver Canada www.globalopenversity. Install and configure Linux RHEL6 or Linux distros VM and install DNS Server. 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.globalopenversity. Sendmail server with SquirrelMail Webmail on it. On a third VM. 3. On a second VM.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration . Install and configure Linux CentOS-6 or Linux distros VM and install DNS Server. 5. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Install and configure Xen Hypervisor virtualization on your CentOS-6. Other Related Articles: 1.

20. 23.04 LTS VM on Citrix XenServer v1.0 Build your own ISP Hosting using EHCP on Ubuntu 10. Global Open Versity.Global Open Versity. Kefa is knowledgeable in several fields of Science & Technology. He is also the founder of Global Open Versity. 8.0 7.10 Maverick Meerkat Server Step-By-Step Install Guide Linux CentOS-5 VM on Citrix XenServer v1.0 Step-By-Step Deploy Ubuntu 10. 16. Thunderbird Mail Client with Addressbook using OpenLDAP on Linux HowTo v1. 12.3 27.0 Step-By-Step Install Guide Mahara ePortfolio & Integration with Moodle LMS v1.2 Install Guide Linux Samba as Primary DC and SSO Identity Management Using Samba 3 Client Technology and Kerberos for Win2k8 AD-based identity management Step-by-step Install Guide for Moodle with Dimdim Web Meeting Step-By-Step Install Guide Alfresco Community 3.04 LTS Server v1. Kefa Rabah. 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 65 © April 2007.0 26. 21. 19.org ICT203 – Mastering CentOS-5/6 RHEL 5/6 Server Administration .04 LTS Server Step-By-Step Install Guide DTC on Linux CentOS5 Server v1.0 Step-By-Step Install Guide Xen Hypervisor on Linux Server v1. Vancouver Canada www. 18.0 Step-By-Step Build & Deploy Citrix XenServer and XenCenter v1.1 Step-By-Step Build & Deploy Citrix XenServer and XenCenter v1. 14.globalopenversity.3g on RHEL5 Server v1. 9. 25. Build and Deploy Your Own Private PIAF-GOLD with Asterisk VoIP Telephony System Step-By-Step Install Guide Ubuntu 10.0 Deploy Secure Messaging Solutions using USendUmail & Dovecot Servers with ClamAV on Linux Build your Own Private Data Center Backup Solutions using Ubuntu Powered RESTORE Backup Server v1. 17. 22. and Renewable Energy Systems. 15. Install & Setup Astaro Security Gateway to Protect Corporate Network ----------------------------------------------- Kefa Rabah is the Founder of Global Technology Solutions Institute. 10.0 Step-By-Step Install Guide Joomla CMS on Ubuntu 10.0 Install Guide Linux CentOS-5 VM on Windows Server 2008 Hyper-V R2 Step-By-Step Install Guide Windows Server 2008 R2 Virtualization With Hyper-V v1. 24. 11. ICT Labs Step-By-Step Install Guide Linux CentOS-6 Server v1. Information Security Compliance and Project Management. a place to enhance your educating and career goals using the latest innovations and technologies. 13.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->