User Tools

Site Tools


linux:rhcsa:chap1

Chapter 01: Prepare for Red Hat Hand-on Certifications

I will skip the whole VM introduction stuff and just describe the standard configurations of httpd and vsftp.
These services are required for Kickstart (Chapter 2) installations.
This page shows the default configuration for the RHCSA Exam.

Assumptions

This documentation assumes in the end that you work with the following 3 VMs:

hostname purpose
server1 Workstation and servers to be configured throughout the book, configured as server1.lan.darktemple.ch on the 192.168.122.0/24 network.
This book assumes a fixed IP address of 192.168.122.50.
tester1 Secure shell server that supports remote access, onfigured as tester1.lan.darktemple.ch on the 192.168.122.0/24 network.
Fixed IP Address 192.168.122.150.
outsider1 Workstation on a different subnet. Configured as outsider1.lan.darktemple.ch.
Fixed IP Address 192.168.100.100.

ssh

SSH is installed by default and active as a service. You need to change the iptables settings though.
You have to add the following rule to access your server via SSH from the outside:

-A INPUT -m state --state NEW -m tcp p tcp --dport 22 -j ACCEPT
 
# or alternative:
iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT

httpd

Installation / Configuration

# yum install httpd
# service httpd start
# chkconfig httpd on

Configure Apache as an Installation Serrver

1. Mount RHEL DVD
Either mount the dvd:

mount /dev/dvd /media

Or mount the iso:

mount -o loop rhel-server-6.0-x86_64.iso /media

2. Create an appropriate directory

mkdir /var/www/html/inst

3. Copy the installation files

cp -ar /media/* /var/www/html/inst/

4. SELinux settings

chcon -R --reference=/var/www/html/ /var/www/html/inst

5. Firewall settings

 -A INPUT -m state --state NEW -m tcp p tcp --dport 80 -j ACCEPT

6. Restart httpd

service httpd restart

The directory should be accessible over http://client.network.org/inst

vsftp

vsftp offers a secure FTP service without the hassle of configuration. Whoever connects to the ftp just has access to a special chroot environment created from the following directory:

/var/ftp/pub

Installation / Configuration

1. Install

yum install vsftpd
service vstftpd start
chkconfig vsftpd on
-A INPUT -m state --state NEW -m tcp p tcp --dport 21 -j ACCEPT

2. Copy the installation files

cp -ar /media/* /var/ftp/pub/inst

3. SELinux settings

chcon -R --reference=/var/ftp/pub/ /var/ftp/pub/inst

Your /var/ftp/pub will now be reachable over ftp://hostname/

Personal Notes

  • ssh: The listing in the course material regarding X forwarding didn't work. Use this!
  • bridged networking: Is not yet covered in the course material. To create and use a network bridge for VMs see here!
linux/rhcsa/chap1.txt · Last modified: 2013/02/12 13:16 by skull@darktemple.ch