Comprehensive file server test (question 1-2)

Source: Internet
Author: User

Double Star technology needs to configure an RHEL6.3 file server so that enterprise employees can easily share resources.


1. set up the network environment as shown in. Except for the RHEL6.3 system in the Department, clients in other departments are WinXP. Each department is configured with a test client, and the IP address must be shown in; the DHCP server allocates addresses for the marketing department and Finance Department. The IP addresses of the test clients must be automatically obtained from the servers. Vmnet8 in the server area, Vmnet1 in the marketing department, Vmnet2 in the Finance Department, and Vmnet3 in the technical department)

650) this. width = 650; "title =" 1.jpg" src = "http://www.bkjia.com/uploads/allimg/131228/0054042642-0.jpg"/>

 

First, ensure normal communication between virtual machines to build a network environment)

 

Server
1. Install the dhcp Software Package

[root@localhost ~]# yum install dhcp -y

2. Configure the master configuration file of the dhcp service

[root@localhost ~]# cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf -fcp: overwrite `/etc/dhcp/dhcpd.conf'? y[root@localhost ~]# vim /etc/dhcp/dhcpd.conf[root@localhost ~]# cat /etc/dhcp/dhcpd.conf

Subnet 192.168.0.0 netmask 255.255.255.0 {
}
Subnet 192.168.10.0 netmask 255.255.255.0 {
Range 192.168.10.10 192.168.10.250;
Option routers 192.168.10.254;
}
Subnet 192.168.20.0 netmask 255.255.255.0 {
Range 192.168.255.10 192.168.255.250;
Option routers 192.168.255.254;
}
Subnet 192.168.30.0 netmask 255.255.255.0 {
Range 192.168.30.10 192.168.30.250;
Option routers 192.168.30.254;
}

 

3. Restart the service

[root@localhost ~]# service dhcpd restartShutting down dhcpd:                                       [  OK  ]Starting dhcpd:                                            [  OK  ]

# Set the Automatic startup of the dhcpd Service

[root@localhost ~]# chkconfig dhcpd on

4. Disable the Firewall

[root@localhost ~]# iptables -F[root@localhost ~]# setenforce 0

# The above two firewall policies are temporarily disabled. To enable or disable the firewall, follow these steps:

[Root @ localhost ~] # Chkconfig iptables off [root @ localhost ~] # Vim/etc/sysconfig/selinux [root @ localhost ~] # Grep ^ S/etc/sysconfig/selinuxSELINUX = disabled # selinux policy SELINUXTYPE = targeted


 

Repeater
# Add three NICs (vmnet)
# Configure the ip addresses of the four NICs as 192.168.0/0/10/20/30.254 respectively. This host is used as a router.
1. Enable the routing function

[root@localhost ~]# vim /etc/sysctl.conf[root@localhost ~]# sysctl -pnet.ipv4.ip_forward = 1

2. modify the configuration file of the dhcrelaydhcp Relay Service.

[root@localhost ~]# vim /etc/sysconfig/dhcrelay[root@localhost ~]# tail -4 /etc/sysconfig/dhcrelay

# DHCPv4 only
INTERFACES= "Eth0 eth3 eth2 eth1"
DHCPSERVERS="192.168.0.8"

# Check whether the dhcrelay service is enabled by checking port 67

[root@localhost ~]# lsof -i :67

Command pid user fd type device size/OFF NODE NAME
Dhcrelay27657 root 8u IPv4 37609 0t0 UDP *: bootps

[Root @ localhost ~] # Service dhcrelay restart # restart the dhcrelay service

Shutting down dhcrelay: [OK]
Starting dhcrelay: [OK]

[Root @ localhost ~] # Chkconfig dhcrelay on # Set startup

Client
# The client can automatically obtain the ip address through the dhcp relay service and dhcp service as long as the corresponding vmnet is configured.
# Ensure that the client can communicate with the server and build a network environment before Automatically Obtaining the ip address

 

 

2. Configure the FTP-based yum source for the server. The yum source is/ftp/yum /.Automatic mount deviceAutomatically mount the optical drive to/ftp/yum, enable gpgcheck, And the yum source of the Technology Department points to the server

1. Install the required software package

[root@localhost ~]# yum install vsftpd autofs -y

2. Modify the dhcp master configuration file

[Root @ localhost ~] # Vim/etc/vsftpd. conf [root @ localhost ~] # Grep yum/etc/vsftpd. confanon_root =/ftp/yum # modify the root directory of anonymous users to the specified directory/ftp/yum

3. Modify The autofs main configuration file

[Root @ localhost ~] # Vim/etc/auto. master [root @ localhost ~] # Cat/etc/auto. master | grep yum/ftp/yum/etc/auto. yum # Add a magic directory

4. Modify the magic directory configuration file

[Root @ localhost ~] # Cp-a/etc/auto. misc/etc/auto. yum [root @ localhost ~] # Vim/etc/auto. yum [root @ localhost ~] # Cat/etc/auto. yum | grep rhelrhel6.3-fstype = iso9660, ro, nosuid, nodev:/dev/cdrom # Add an automatic mount point

5. create the desired directory and restart the service.

[root@localhost ~]# mkdir /ftp/yum -p[root@localhost ~]# service autofs restartStopping automount:                                        [  OK  ]Starting automount:                                        [  OK  ]
[root@localhost ~]# service vsftpd restartShutting down vsftpd:                                  [FAILED]Starting vsftpd for vsftpd:                            [  OK  ]

6. Set startup

[root@localhost ~]# chkconfig vsftpd on[root@localhost ~]# chkconfig autofs on

7. Verify the automatic mount point
# The following shows that automatic mounting is successful.

[root@localhost ~]# ls /ftp/yum/[root@localhost ~]# ls /ftp/yum/rhel6.3

Eula readme RELEASE-NOTES-hi-IN.html RELEASE-NOTES-pa-IN.html repodata
GPL RELEASE-NOTES-as-IN.html RELEASE-NOTES-it-IT.html RELEASE-NOTES-pt-BR.html ResilientStorage

......

 

8. Configure the yum source client
# Both the server and the technical department client are configured in the same way.

[root@localhost ~]# vim /etc/yum.repos.d/local.repo[root@localhost ~]# cat /etc/yum.repos.d/local.repo

[Ftp]
Name = ftp
Baseurl = ftp: // 192.168.0.8/rhel6.3
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[Root @ localhost ~] # Rpm -- import/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release # import the gpg file [root @ localhost ~] # Yum clean all

Loaded plugins: product-id, refresh-packagekit, security, subrole-manager
Updating certificate-based repositories.
Unable to read consumer identity
Cleaning repos: InstallMedia ftp
Cleaning up Everything

[root@localhost ~]# yum list

Use yum list to check whether the yum source is available

 

This article is from the sweet linux road blog, please be sure to keep this source http://su92wei.blog.51cto.com/1963948/1264116

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.