RED hat or Old Linux

Source: Internet
Author: User
Tags clear screen gpg symlink uuid

1. Fixed network ip address
2. Turn off the firewall
3. Turn off selinux
4. CD auto mount
5. Configure the local yum source

RHEL6 configuration method:
1.ifconfig 2. configuration file (permanent) 3.setup/nmtui

1. ifconfig view IP address crtl+l clear screen
    RHEL weakens the setup function. For network management, the network service

    The function is weakened, and the network is mainly managed through NetworkManager.
    
RHEL7 modifies the network configuration through nmtui (RHEL7 is installed by default, provided that it is required

      To use NetworkManager.service, you can use it)
First, make sure the NetworkManager service is up and running.

Systemctl status NetworkManager checks whether the network service is running normally.
Systemctl start NetworkManager starts the networkmanager service

   The second vim /etc/sysconfig/network-scripts/ifcfg-

Eno16777736
TYPE="Ethernet"
BOOTPROTO="none" ip address type: none static dhcp
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="eno16777736"
UUID="0ac62b8e-60b6-47ad-8967-c70369eeeaab"
DEVICE="eno16777736"
ONBOOT="yes" whether to start
DNS1="8.8.8.8" DNS
IPADDR="192.168.1.63" IP address
PREFIX= "24" mask length
GATEWAY=192.168.1.1 Default Gateway
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no

Turn off the firewall and turn it off automatically
Rehl7 firewalld
View commands and status systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded

(/usr/lib/systemd/system/firewalld.service; enabled; vendor

Preset: enabled)
   Active: active (running) since six 2017-05-06 23:31:20

CST; 21 minutes ago
 Main PID: 863 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─863 /usr/bin/python -Es /usr/sbin/firewalld --

Nofork --nopid

May 07 07:24:08 zq systemd[1]: Starting firewalld - dynamic

Firewall daemon...
May 06 23:31:20 zq systemd[1]: Started firewalld - dynamic

Firewall daemon.
Hint: Some lines were ellipsized, use -l to show in full.

Firewall shutdown and boot automatically shut down
             Systemctl stop firewalld shutdown command
[root@zq ~]# systemctl disable firewalld disable command
Removed symlink /etc/systemd/system/dbus-

org.fedoraproject.FirewallD1.service.
Removed symlink

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


Turn off selinux and set boot automatically to turn off
[root@zq ~]# setenforce 0 Temporarily closed
Usage: setenforce [ Enforcing | Permissive | 1 | 0 ]
[root@zq ~]# vim /etc/sysconfig/selinux Permanently closed
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of

Enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only

Selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Restart takes effect reboot

Set the CD to boot automatically
 Everything is a file
[root@zq ~]# mount -a Verify
[root@zq ~]# ls /mnt
Addons GPL LiveOS release-notes RPM-

GPG-KEY-redhat-release
EFI images media.repo repodata

TRANS.TBL
EULA isolinux Packages RPM-GPG-KEY-redhat-beta
[root@zq ~]# df View
File System 1K-Block Available Available Used % Mount Point
/dev/sda3 20961280 3249680 17711600 16% /
Devtmpfs 486124 0 486124 0% /dev
Tmpfs 500664 156 500508 1% /dev/shm
Tmpfs 500664 7204 493460 2% /run
Tmpfs 500664 0 500664 0%

/sys/fs/cgroup
/dev/sda1 508588 141104 367484 28% /boot
Tmpfs 100136 16 100120 1%

/run/user/1000
Configuring the mount file
Vim /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sun May 7 05:20:03 2017
#
# Accessible filesystems, by reference, are maintained under

‘/dev/disk‘
# See man pages fstab(5), findfs(8), mount(8) and/or blkid

(8) for more info
#
UUID=7b8743cb-c53a-4848-83b7-d8c90a5413a0 /

     Xfs defaults 0 0
UUID=a0ac773e-aa81-49cb-887c-e0752f0d2456 /boot

     Xfs defaults 0 0
UUID=4685bbff-8ccc-4937-9d33-5c34f9608a9f swap

     Swap defaults 0 0
/dev/cdrom /mnt iso9660 defaults

0 0
This line is the configuration content
Tmpfs 100136 0 100136 0% /run/user/0
/dev/sr0 3947824 3947824 0 100% /mnt

Configure the yum source
II. yum configuration file
All configuration information of yum is stored in a configuration file called yum.repos.d, usually

Located in the /etc directory, this is the top priority of the entire yum system.

Vim /etc/yum.repos.d/rehl7.repoCreate a new configuration file

[Server]
Name=Red Hat Enterprise Linux Server
Baseurl=file:///mnt access path
Enable=1 Can it be allowed? Can be enabled
Gpgcheck=0 Need to check? No need to cancel verification

Delete the original file without configuration
Rm -fr /etc/yum.repos.d/*
Create a file The form of the file must be .repo

[root@zq ~]# yum clean all
Loaded plugins: langpacks, product-id, search-disabled-repos,

Subscription-manager
This system is not registered to Red Hat Subscription

Management. You can use subscription-manager to register.
Cleaning up software source: Server
Cleaning up everything
[root@zq ~]# yum list
Loaded plugins: langpacks, product-id, search-disabled-repos,

Subscription-manager
This system is not registered to Red Hat Subscription

Management. You can use subscription-manager to register.
Server

 | 4.1 kB 00:00:00
(1/2): Server/group_gz

 | 136 kB 00:00:00
(2/2): Server/primary_db
| 3.6 MB 00:00:00
Installed package

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.