RedHatLinux8.0 basic service Configuration Manual

Source: Internet
Author: User
Tags nslookup nslookup command
Article title: RedHatLinux8.0 basic service Configuration Manual. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
System versions: 7.3 and 8.0
Prerequisites and requirements:
(1) when installing RedHat Linux 7.3 or RedHat Linux 8.0, select the software package for installing telnet, ftp, and dns network services.
(2) determine the machine name, IP address, and route. for example:
  
Hostname: mail.orizone.com
Ip: 10.0.0.100
Netmask 255.255.255.0
Gateway: 10.0.0.1
  
(3) services to be started. The following describes how to configure network adapters and telnet, ftp, and dns services.
  
Specific configuration steps:
  
   1. ensure the network is smooth (configure the network card and IP address)
In Redhat, the network configuration is complete during system installation. All configuration data is stored in/etc. You can configure the network during running without restarting the system.
  
Use the command ifconfig first? A. Check whether the NIC is found. If no Nic is found, perform step 1. otherwise, perform step 2. The following information should be displayed when you find the Eni:
  
Eth0 Link encap: Ethernet HWaddr 00: 80: C8: 43: BC: 79
Inet addr: 10.0.0.100 Bcast: 10.0.0.255 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 148 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 244 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 fig: 100
RX bytes: 10065 (9.8 Kb) TX bytes: 15140 (14.7 Kb)
Interrupt: 9 Base address: 0x300
  
Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Up loopback running mtu: 16436 Metric: 1
RX packets: 98 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 98 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 9312 (9.0 Kb) TX bytes: 9312 (9.0 Kb)
  
Linux usually automatically detects all installed NICs of this brand type, which is no problem for the PCI driver; but for the ISA Nic, it is insecure to find a network card. Therefore, you need to provide the I/O address of the network card and the module to know where to find it. This information is stored in the file/etc/modules. conf.
1. modify the/etc/modules. conf file and add the following information:
Alias eth0 network module name (. o not required)
Options network module name I/O = I/O address irq = IRQ (sometimes this item can be left empty)
For example:
  
Alias parport_lowlevel parport_pc //
Alias usb-controller usb-uhci //
Alias eth0 ne
Options eth0 io = 0x300 irq = 9
  
2. run modprobe eth0 to test it.
3. modify/etc/sysconfig/network-scripts/ifcfg-eth0 as follows:
  
DEVICE = eth0
ONBOOT = yes
BOOTPROTO = static
IPADDR = 10.0.0.100 // The IP address you set for the server
NETMASK = 255.255.255.0
BROADCAST = 10.0.0.255
GATEWAY = 10.0.0.1 // GATEWAY
  
4. running the/etc/rc. d/init. d/network restart Nic will take effect. Run ifconfig? A. Check whether the Nic has been found. If no error is found in the configuration above. If you find the NIC and run ifconfig eth0, the corresponding information should be displayed:
  
Eth0 Link encap: Ethernet HWaddr 00: 80: C8: 43: BC: 79
Inet addr: 10.0.0.100 Bcast: 10.0.0.255 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 3135 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 628 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 fig: 100
RX bytes: 219744 (214.5 Kb) TX bytes: 54105 (52.8 Kb)
Interrupt: 9 Base address: 0x300
  
   II. TELNET service (although telnet is mentioned here, it is best to use ssh for security purposes. this program is now installed by default on popular unix systems)
Modify the following two files so that the system can be accessed by users of other machines on the network. it is necessary to enable the TELNET service for the root remote operation machine.
1./etc/securetty, add the following lines:
...... // Omitted
Pts/0
Pts/1
......
Pts/5 // you can add multiple rows
  
2./etc/xinetd. d/telnet
  
# Default: on
# Description: The telnet server serves telnet sessions; it uses # unencrypted username/password pairs for authentication.
Service telnet
{
Disable = no
Flags = REUSE
Socket_type = stream
Wait = no
User = root
Server =/usr/sbin/in. telnetd
Log_on_failure + = USERID
}
  
Make sure disable = no
  
   III. FTP service
1. the user in the/etc/ftpusers file is denied to respond to the ftp service. Use # to shield root:
# Root
In this way, the root user is not restricted by this configuration file, and can request the ftp service provided by this user on other machines.
2./etc/ftpaccess # comment out the following two lines,
Deny-uid %-99% 65534
Deny-gid %-99% 65534
After annotation:
# Deny-UUID %-99% 65534
# Deny-gid %-99% 65534
3./etc/xinetd. d/wu-ftpd determines whether the ftp service can be provided.
Make sure disable = no. you can activate the ftp service to other machines.
  
   4. configure the cache-only DNS service
Modify (add if no) the following files:
1./etc/resolv. conf this file specifies the IP address of the domain name server and the search sequence.
  
Nameserver 202.103.44.5 // IP address of the domain name server
Search localdomain
  
2. /etc/nsswitch. conf the file processes the host table and DNS order, tells the system where to find specific types of configuration information (that is, service), and replaces the rows starting with host with the following lines:
Hosts: files nisplus dns
After replacement:
  
# Example:
# Passwd: db files nisplus nis
# Shadow: db files nisplus nis
# Group: db files nisplus nis
  
Passwd: files nisplus
Shadow: files nisplus
Group: files nisplus
  
# Hosts: db files nisplus nis dns
Hosts: files nisplus dns
  
# Example-obey only what nisplus tells us...
# Services: nisplus [NOTFOUND = return] files
# Networks: nisplus [NOTFOUND = return] files
# Protocols: nisplus [NOTFOUND = return] files
# Rpc: nisplus [NOTFOUND = return] files
# Ethers: nisplus [NOTFOUND = return] files
# Netmasks: nisplus [NOTFOUND = return] files
  
Bootparams: nisplus [NOTFOUND = return] files
  
Ethers: files
Netmasks: files
Networks: files
Protocols: files nisplus
Rpc: files
Services: files nisplus
  
Netgroup: files nisplus
  
Publickey: nisplus
  
Automount: files nisplus
Aliases: files nisplus
  
3../etc/named. conf
  
Options {
Directory "/var/named"; // Here/var/named is used to store the following three configuration files:
// You can specify a directory as another one.
/*
* If there is a firewall between you and nameservers you want
* To talk to, you might need to uncomment the query-source
* Directive below. Previous versions of BIND always asked
* Questions using port 53, but BIND 8.1 uses an unprivileged
* Port by default.
*/
// Query-source address * port 53;
};
  
//
// A caching only nameserver config
//
Controls {
Inet 127.0.0.1 allow {localhost;} keys {rndckey ;};
};
Zone "." IN {
Type hint;
File "named. ca ";
};
  
Zone "localhost" IN {
Type master;
File "localhost. zone ";
Allow-update {none ;};
};
  
Zone "0.0.127.in-addr. arpa" IN {
Type master;
File "named. local ";
Allow-update {none ;};
};
  
There are three corresponding configuration files, which do not need to be modified;
(1)./var/named. ca // do not modify it
(2)./var/named. local
  
$ TTL 86400
@ In soa localhost.
  
  
In ns local
  
1 in ptr localhost.
(3)/var/named/localhost. zone /// built-in system, do not modify
  
$ TTL 86400
$ ORIGIN localhost.
@ 1D in soa @ root (
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
  
1D in ns @
1D in a 127.0.0.1
Everything is ready. run the following command:
# Service named restart or
#/Etc/init. d/named restart
Make the configuration take effect. Use the nslookup command to test whether the correct address resolution can be performed. For example:
# Nslookup www.sina.com.cn
Bytes ----------------------------------------------------------------------------------------------------------------------
Note: nslookup is deprecated and may be removed from future releases.
Consider using the 'dig or 'host programs instead. Run nslookup
The '-sil [ent] option to prevent this message from appearing.
Server: 202.103.44.5
Ad
Related Article

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.