linux-post-installation quasi-book work

Source: Internet
Author: User
Tags gpg

1. Turn off the firewall

To view the firewall status:

[Email protected]_study ~]# service iptables statusiptables: The firewall is not running. 

To turn off and turn on the firewall:

Requires a reboot to take effect, permanent:

Open: Chkconfig iptables on

OFF: Chkconfig iptables off

No reboot required, effective immediately, but failed after reboot:

Open: Service iptables start

Close: Service iptables stop

2, turn off SELinux

View SELinux Status

[Email protected]_study ~]#/usr/sbin/sestatus-vselinux Status:                 disabled

Some systems, the path may be/usr/bin/sestatus

Turn off SELinux and change to disabled. Reboot required to take effect

[[Email Protected]_study ~]#Cat/etc/selinux/Config # thisfileControls 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 these values:# targeted-targeted processes is protected,# MLS-Multi level Security protection. Selinuxtype=targeted

3, set host name and IP address

Just installed after the system, with a graphical automatic connection found not connected, using the service network restart error: Error getting ' state ' for/org/freedesktop/networkmanager/ activeconnection/0: () Method "Get" wit

Looked down as if Redhat himself developed the NetworkManager management tool and/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-ETHX configuration is not synchronized caused.

Workaround 1:

Graphical interface, manual configuration, System-preferences-network connection, manually configure IP address and other information

Workaround 2, locate Ifcfg-eth0, add information

[[Email Protected]_study ~]#Cat/etc/sysconfig/network-scripts/ifcfg-Eth0device=eth0hwaddr=xx: 0C: in:D C: -: theTYPE=Ethernetuuid=592393d3-001e-446a-bd6b-Ad0a822901d2onboot=yesnm_controlled=Yesbootproto=noneipaddr=192.168.1**,*** #自己设置的IPPREFIX= -GATEWAY=192.168.***,***#网关

Then the service network Restrat will be ready.

Set host Name:

Viewing the host name can be viewed using the hostname command, which takes the value from

cat /etc/sysconfig/networknetworking=yeshostname=python_study

Modify the hostname to make it permanent, that is, to modify the hostname= hostname of the file, which requires a reboot to take effect.

If the temporary modification can use the hostname hostname, after the restart the aging

At this point if you use Hostname-i to view the System IP Discovery command error, ping this machine name also error, because also set up/etc/hosts file

Open the/etc/hosts file, and add a row after theIP address hostname host name. Domain Name

At this point you can also directly ping the host name, in fact, Ping's native IP address

This file is IP, hostname, domain name resolution used, you can add other host information inside.

The above is done, you can take a snapshot, there is a problem, you can recover the initial state

4, set the Yum source

The Yum profile is/etc/yum.conf and the download source file is located in the/etc/yum.repos.d/directory with the. repo extension

My source file is named Server.repo

Server1 is the ID of the source file

Name defines the full name of the Yum source

BaseURL defines the URL address of a Yum source, which can be http,ftp,file multiple forms

Enabled to enable Yum source, 1 is enabled

Gpgcheck Check the software signature of RPM package before installing package, do not understand, so do not check

Gpgkey software package digitally signed key, enabled above to be used

My is a virtual machine, Mount CD, Mount/dev/cdrom/mnt, sometimes in baseurl need to write to the server this layer path, but I remember the original rhel5 as if only need to write to/mnt on the line

The contents of the Server.repo file are as follows:

[[Email Protected]_study ~]#Mount/dev/cdrom/mntMount: Block Device/dev/sr0 isWrite-protected, mounting read-Only[[email Protected]_study~]#ls/mntefi eula_fr eula_zh loadbalancer RELEASE-notes-bn-in.html release-notes-gu-in.html release-notes-ko-kr.html release-notes-pt-br.html Release-notes-zh-cn.html rpm-gpg-key-redhat-releaseeula eula_it GPL media.repo RELEASE-notes-de-de.html release-notes-hi-in.html release-notes-ml-in.html release-notes-ru-ru.html RELEASE-NOTES-zh-tw.html scalablefilesystemeula_de eula_ja highavailability Packages RELEASE-notes-en-us.html release-notes-it-it.html release-notes-mr-in.html release-notes-si-lk.html repodata servereula_en eula_ko images README RELEASE-notes-es-es.html release-notes-ja-jp.html release-notes-or-in.html release-notes-ta-in.html resilientstorage TRANS. Tbleula_es eula_pt isolinux RELEASE-notes-as-in.html release-notes-fr-fr.html release-notes-kn-in.html release-notes-pa-in.html Release-notes-te-in.html rpm-gpg-key-redhat-Beta[[email Protected]_study~]# cd/etc/Yum. repos.d/[[Email Protected]_studyYum. repos.d]#lsRhel-Source.repo[[email Protected]_studyYum. repos.d]#MVRhel-source.repo rhel-Source.repo.bak[[email Protected]_studyYum. repos.d]#VIServer.repo[[email Protected]_studyYum. repos.d]#CatServer.repo [Server1] name=rhel6.4BaseURL=file:///mnt/server/Enabled=1Gpgcheck=0

You can use the Yum install package later

I'm setting the local Yum source

Refer to the blog I wrote when I was just working: http://9258124.blog.51cto.com/9248124/1676194

linux-post-installation quasi-book work

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.