RHEL and CentOS study notes

Source: Internet
Author: User
RHEL and CentOS Study Notes 1. disable firewall (1) serviceiptablesstop this is directly disabled (2)/etc/init. d/iptablestop: The effect is the same as that of the First Command (3) chkconfigiptablesoff, which is permanently disabled...
RHEL and CentOS Study Notes 1. disable firewall (1) service iptables stop (2)/etc/init. d/iptable stop: the effect is the same as that of the First Command (3) chkconfig iptables off, which is permanently disabled. 2. exception: Another app is currently holding the yum lock; waiting for it to exit... when using yum to upgrade some files, the following situations may occur: another app is currently holding the yum lock; waiting for it to exit ...; you can forcibly turn off the yum process: # rm-f/var/run/yum. pid and then you can use yum. Www.2cto.com 3. Red Hat Enterprise 6 modify the host name (1) run the command to temporarily modify the host name hostname # view the host name of the current host hostname MASTER # temporarily modify the current host name-the host name becomes invalid after restart. (2) run the command to modify the host name hostname # view the host name of the current host and modify the network file # vi/etc/sysconfig/network NETWORKING = yes HOSTNAME = MASTER (: wq save and quit)
(3) modify the hosts file vi/etc/hosts 127.0.0.1 localhost. localdomain localhost www.2cto.com # vi/etc/hosts 127.0.0.1 localhost. localdomain localhost4 localhost4.localdomain4 // This row is strongly recommended to retain: 1 localhost. localdomain localhost6 localhost6.localdomain6 // This row is strongly recommended to retain #192.168.0.1 rhel.lpwr.net rhel // there must be three fields: IP, FQDN, HOSTNAME 127.0.0.1 MASTER. localhost MASTER 192.168.80.10 MASTER. localhost MASTER (4) restart # shutdown-r now # reboot 4. NTP configuration (1) check if the NTP service is installed: rpm-qa | grep ntp (2) in the file ntp. add the following in the conf file: restrict 192.168.80.0 mask 255.255.0 nomodify notrap # Open to 192.168.80 CIDR block and cannot be modified. add multiple entries as needed (3) run ntp service ntpd start (4) check whether ntp is working ntpq-p (5). set ntp service to start chkconfig ntpd on www.2cto.com 5. configure the local ISO file as the YUM source (1) create a folder and create a folder/rhrliso under/mnt/. Copy the left and right files in the ISO file to the rheliso folder. (2) create a local file. repo in/etc/yum. repos. d. repo, file content: [local-Server] name = RHEL 6.3 ISO REpo baseurl = file:///mnt/rheliso/ Enabled = 1 gpgcheck = 0 (3) run the YUM command yum clean all yum list
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.