Basic Linux Operations

Source: Internet
Author: User
Tags symlink

View network management feature status → Enable this feature in REDHAT7 to edit the network configuration

[Email protected]/]# systemctl status NetworkManager

Networkmanager.service-network Manager

Loaded:loaded (/usr/lib/systemd/system/networkmanager.service; enabled; vendor preset:enabled)

Active:active (running) since two 2016-06-21 07:37:37 CST; 7h left

Main pid:1011 (NetworkManager)

CGroup:/system.slice/networkmanager.service

└─1011/usr/sbin/networkmanager--no-daemon

Running is turned on and can be turned on manually if not turned on.

[Email protected]/]# systemctl start NetworkManager

See if the firewall is off

[Email protected]/]# systemctl status Firewalld

firewalld.service-firewalld-dynamic Firewall daemon

Loaded:loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset:enabled)

Active:active (running) since two 2016-06-21 00:24:01 CST; 1min 56s ago

Main pid:1004 (FIREWALLD)

CGroup:/system.slice/firewalld.service

└─1004/usr/bin/python-es/usr/sbin/firewalld--nofork--nopid

Running is turned on, turn off the firewall and then under view

[[email protected]/]# systemctl stop firewalld manually turn off the firewall

[[email protected]/]# systemctl status firewalld view firewall status

firewalld.service-firewalld-dynamic Firewall daemon

Loaded:loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset:enabled)

Active:inactive (dead) since two 2016-06-21 00:26:12 CST; 1s ago

process:1004 execstart=/usr/sbin/firewalld--nofork--nopid $FIREWALLD _args (code=exited, status=0/success)

Main pid:1004 (code=exited, status=0/success)

Self-booting firewall

[email protected]/]# Systemctl enable FIREWALLD  

Manually turn on the firewall

[Email protected]/]# systemctl start FIREWALLD

Self-closing firewall

[Email protected]/]# systemctl disable FIREWALLD

Removed Symlink/etc/systemd/system/basic.target.wants/firewalld.service.

Removed Symlink/etc/systemd/system/dbus-org.fedoraproject.firewalld1.service.

To mount the disc, first use DF to view the next.

[[email protected]/]# DF

File system 1k-block already used% mount point available

/dev/mapper/rhel_dy-root 18348032 4104968 14243064 23%/

Devtmpfs 485132 0 485132 0%/dev

Tmpfs 500680 500592 1%/DEV/SHM

Tmpfs 500680 7196 493484 2%/run

Tmpfs 500680 0 500680 0%/sys/fs/cgroup

/dev/sr0 3947824 3947824 0 100%/mnt

/DEV/SDA1 508588 143108 365480 29%/boot

TMPFS 100136 8 100128 1%/run/user/0

The disc is mounted and the unmount disc is mounted

[[email protected]/]# umount/dev/sr0 unmount disc

[[email protected]/]# DF using DF to see that the disc has been uninstalled

File system 1k-block already used% mount point available

/dev/mapper/rhel_dy-root 18348032 4105020 14243012 23%/

Devtmpfs 485132 0 485132 0%/dev

Tmpfs 500680 500592 1%/DEV/SHM

Tmpfs 500680 7196 493484 2%/run

Tmpfs 500680 0 500680 0%/sys/fs/cgroup

/DEV/SDA1 508588 143108 365480 29%/boot

TMPFS 100136 8 100128 1%/run/user/0

Manually mount a disc

[[email protected]/]# mount/dev/sr0/mnt Mount CD to the MNT directory

Mount:/dev/sr0 write protection, will be mounted as read-only

Then use DF to see if it's mounted

[[email protected]/]# DF

File system 1k-block already used% mount point available

/dev/mapper/rhel_dy-root 18348032 4105000 14243032 23%/

Devtmpfs 485132 0 485132 0%/dev

Tmpfs 500680 500592 1%/DEV/SHM

Tmpfs 500680 7196 493484 2%/run

Tmpfs 500680 0 500680 0%/sys/fs/cgroup

/DEV/SDA1 508588 143108 365480 29%/boot

TMPFS 100136 8 100128 1%/run/user/0

/dev/sr0 3947824 3947824 0 100%/mnt disc already mounted

Auto-mount disc on boot

[[email protected]/]# echo "/dev/sr0/mnt iso9660 defaults 0 0" >>/etc/fstab

Configure local Yum Source

First delete the local Yum source

[Email protected]/]# rm-rf/etc/yum.repos.d/*

See if it has been deleted

[Email protected]/]# ls/etc/yum.repos.d/

[Email protected]/]#

Start configuring the local Yum source

[email protected] yum.repos.d]# cat > Redhat.repo << EOF

> [Redhat] Yum Source

> name=redhat Name

> Baseurl=file:///mnt mount to the MNT directory

> Enabled=1 Enabled

> gpgcheck=0 not detected

> EOF End

[[email protected] yum.repos.d]# cat Redhat.repo view Yum source

[Redhat]

Name=redhat

Baseurl=file:///mnt

Enabled=1

Gpgcheck=0

[[email protected]/]# Yum clean all clear Yum library

[[email protected]/]# Yum list view available installation packages

This article from "DY" blog, reproduced please contact the author!

Basic Linux Operations

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.