Linux Server Configuration Apache,dns,ftp server detailed

Source: Internet
Author: User
Tags bind ftp site mkdir

I. Configuration of Apache servers
Purpose of practical training
Master the configuration of the Apache server
Practical training equipment and environment
1. A server equipped with a Redhat Linux9 system, a PC equipped with Windows Professional.
2. RedHat Linux9 installation CD.
3. Two machines TCP/IP is set in the same subnet. and ensure LAN connectivity.
Training Content
1. Installation of Apache server.
2. Configuration of Apache server.
Training steps
1. Apache Server Installation
To install Apache from RPM, the installation commands are as follows:

#rpm-IVH httpd-2.0.40-21.i386.rpm
#rpm-IVH httpd-manual-2.0.40-21.i386.rpm

2. Apache Server Configuration
(1) Create a default site with the default configuration. When the Apache installation is complete, the default site can be started automatically.
(2) Create a Web site with 192.168.100.10 IP address.
Add a include file to the main configuration file

#cd/etc/httpd
#echo "Include vhost-conf.d/*.conf" >> conf/httpd.conf

Create a virtual host configuration file directory

#mkdir VHOST-CONF.D

Edit a child configuration file

#vi vhost-conf.d/ip-vhost12.conf

Add the following configuration line

<virtualhost 192.168.1.200>
Documentroot/www/ip-vhost1

Create a home page for the root document directory

#mkdir-P/www/ip-vhost1
#echo "Ip-vhost1" >/www/ip-vhost1/index.html

II. Configuration of DNS servers
Purpose of practical training
Learn how to set up a DNS server
Practical training equipment and environment
1. A server equipped with a Redhat Linux9 system, a PC equipped with Windows Professional.
2. RedHat Linux9 installation CD.
3. Two machines TCP/IP is set in the same subnet. and ensure LAN connectivity.
Training Content
1. The installation of BIND
2. Configure BIND Service
Training steps
1. Install the DNS server. Install the DNS server in RPM package.
The first-CD-ROM is installed with the following contents:

#rpm-IVH bind-9.2.1-16.i386.rpm
#rpm-IVH bind-utils-9.2.1-16.i386.rpm
#rpm-IVH redhat-config-bind-1.9.0-13.noarch.rpm

The third CD is installed with the following contents:

#rpm-IVH caching-nameserver-7.2-7.noarch.rpm

2. Complete the DNS configuration with the following parameters: Host Name: Sev.111cn.net,ip address: 192.168.100.1, at the same time complete the DNS configuration of three domain names: www.111cn.net,ftp.111cn.net,mail.111cn.net.
(1) Modify the main configuration file
Add a 111cn.net.net zone declaration to the primary configuration file/etc/named.conf
To add a forward zone declaration

Zone "111cn.net" in {
Type master;
File "Xjnet.zone";
};

Add a reverse zone declaration

Zone "100.168.192.in-addr.arpa" in {
Type master;
File "111cn.net.rev";
};

(2) To create a forward resolution database file
To create a forward resolution database file/var/named/xjnet.zone

$TTL 86400
@ in SOA sev.111cn.net. Root.sev.111cn.net (
9 · Serial
28800; Refresh
7200; Retry
604800; Expire
86400; Ttl
)
In NS sev.111cn.net.
www in A 192.168.100.1
FTP in A 192.168.100.1
Mail in CNAME www.111cn.net.

(3) 3. Create a file to reverse parse a database
Reverse Parse Data file/var/named/xjnet.rev

$TTL 86400
@ in SOA sev.111cn.net. Root.sev.111cn.net. (
2; Serial
28800; Refresh
7200; Retry
604800; Expire
86400; Ttk
)
@ in NS sev.111cn.net.
1 in PTR sev.111cn.net.

Third, the FTP server configuration
Purpose of practical training
1. Master the installation and configuration of FTP server
2. Learn to configure the FTP service for local users in Linux systems
Practical training equipment and environment
1. A server equipped with a Redhat Linux9 system, a PC equipped with Windows Professional.
2. RedHat Linux9 installation CD.
3. Two machines TCP/IP is set in the same subnet. and ensure LAN connectivity.
Training Content
Installing an FTP server
Configuring a virtual FTP server
Training steps
1. Install FTP server
Complete the installation of the FTP server in RPM package and test the default FTP server.
Install packages (on the third installation CD)

#rpm-IVH vsftpd-1.1.3-8.i396.rpm

2. Configure the virtual FTP server. Set the IP address of the Linux server to 192.168.100.1 and configure the IP based virtual FTP server with this address.
Refer to section 13.4 to complete the virtual FTP server configuration, mainly including the following steps:
(1) View the existing IP address of this machine

#ifconfig | Grep-1 eth0

(2) Configure a virtual network interface eth0:1

#ifconfig eth0:1 192.168.100.1 up

(3) Establishment of virtual FTP server directory

#mkdir-P/var/ftp2/pub

(4) Generate test files in the download directory

#echo "Hello" >/var/ftp2/pub/test_file

(5) The local user mapped by the anonymous user who created this virtual server FTP2

#useradd-D/var/ftp2-m FTP2

(6) Modify the original standalone run server configuration file/etc/vsftpd/vsftpd.conf

listen_address=192.168.100.1

(7) Generate the primary configuration file for the virtual FTP server with the default primary profile of the original backup/etc/vsftpd/vsftpd_site2.conf

#cp/etc/vsftpd/vsftpd.conf.rh9/etc/vsftpd/vsftpd_site2.conf

(8) Modify the master configuration file for the virtual host

#vi/etc/vsftpd/vsftpd_site2.conf
listen_address=192.168.100.1
Ftp_username=ftp2
Ftpd_banner=this is the alternative FTP Site,and vsftpd in "standalone" mode.

(9) Reboot VSFTPD

#service vsftpd Restart

(10) Start Virtual FTP server

#/usr/sbin/vsftpd/etc/vsftpd/vsftpd_site2.conf &

3.  Test FTP server
authenticate to log on to the FTP server through Windows Professional client.
IV, thinking and practising
(1) How do I use the command line in  linux to host network configuration?
(2)   How to access files and printers shared by the Samba server through the Windows system?
(3)   What is the Apache server's characteristics compared to Windows IIS?
(4) What is the role of the primary and district files in the  dns server?
(5)   How do I implement aliases, message logging settings in the DNS server configuration for basic bind?
(6)   What are the characteristics of the default VSFTP server?
(7) What user databases are available in the  sendmail server, and what are the characteristics of each?

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.