Linux System Network Service management configuration

Source: Internet
Author: User

Version 7.0 Service Management

Adopt the management thought of SYSTEMD

/usr/lib/systemd/system

View boot status for all services in the system

Example: Systemctl list-unit-files grep ssh

How the service is named: Process name. service configuration only need to write the process name

Example: Sshd.service

#systemctl Restart sshd Restart Service

#systemctl Start sshd Open service

#systemctl Stop sshd Deactivation Service

#systemctl Status sshd service state

#systemctl enable sshd to boot automatically

#systemctl Disable sshd boot disable service


Graphical Network configuration

#systemctl status NetworkManager services that support graphical network configuration

#systemctl Restart NetworkManager

#nmtui go to the graphical configuration menu Automatic Auto get;Manual manual Configuration

Modify the configuration file directly, but not immediately, need to restart the network service

#systemctl Restart Network

1. View network Parameters

1)IP address, subnet mask

Ifconfig-a Viewing network card information ( active NIC and inactive Nic )

Ifconfig network card name down disable NIC

Ifconfig network card name up enable Nic

2) Gateway

Route-n viewing the native Routing table View gateway

Destination reach the target network segment

Gateway Gateways

Genmask Network Segment Mask

Flags flag (u means Nic is on,UG stands for Gateway)

3)DNS

configuration file:/etc/resolv.conf Edit:nameserver + name server

2. Host name

View host name hostname

permanently Modify host name /etc/hostname

3. Static parsing file /etc/hosts

IP address host name

IP address FQDN(full name )

4. Setting Network Parameters

Ifconfig nic name IP address

Example:ifconfig eno33554960 192.168.10.3 automatically assign masks based on classification of IP addresses

Permanent effect Modify configuration file

/etc/sysconfig/network-scripts/ifcfg-eno16777736

Type = Ethernet (type is Ethernet)

Bootproto = None (Specifies how the network card obtains the IP address.) ) None static IP;DHCP Dynamic Acquisition

Name = eno16777736 (nic name)

UUID = device ID

Onboot = yes (whether to automatically connect the NIC)

IPADDR0 = IP address

PREFIX0 = + ( subnet mask: number of bits)

GATEWAY0 = Gateway

DNS1 = DNS


7.0 Previous version system services

1.setup into the graphical configuration menu

Service Network Restart Restart Network Service, configuration file takes effect

Add a new network card, drive auto-install, but the configuration file can not be automatically generated

2. Use INIT.D to record all system services

/etc/rc.d/init.d/

3. Example: Sshd.service

#service sshd Restart Restart Service

#service sshd start Start service

#service sshd Status Service state

#service sshd Stop Service

#chkconfig sshd off start automatically

#chkconfig sshd on disable service


Modify Host Name

/etc/sysconfig/network

Linux System Network Service management configuration

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.