Linux-quasi-work after installation, linux-work after installation

Source: Internet
Author: User

Linux-quasi-work after installation, linux-work after installation
1. Disable the firewall.

View the Firewall Status:

[Root @ python_study ~] # Service iptables statusiptables: no firewall is running.

Disable and enable the Firewall:

It takes effect only after being restarted. It takes effect permanently:

Enable: chkconfig iptables on

Close: chkconfig iptables off

No need to restart. It takes effect immediately, but it becomes invalid after restart:

Enable: service iptables start

Disable: service iptables stop

2. Disable selinux.

View selinux status

[root@python_study ~]# /usr/sbin/sestatus -vSELinux status:                 disabled

 

In some systems, the path may be/usr/bin/sestatus.

Disable selinux and change it to disabled. It takes effect only after a restart.

[root@python_study ~]# cat /etc/selinux/config # 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 these two values:#     targeted - Targeted processes are protected,#     mls - Multi Level Security protection.SELINUXTYPE=targeted 

 

3. Set host name and IP address

After the installation, the system cannot be connected through graphical automatic connection. The Error "Error getting 'state' for/org/freedesktop/NetworkManager/ActiveConnection/0" is returned when the service network restart is used: (19) Method "Get" wit

Check whether the NetworkManager management tool developed by RedHat is not synchronized with the/etc/sysconfig/network-scripts/ifcfg-ethx configuration.

Solution 1:

Graphical interface, manual configuration, system -- preferences -- network connection, manual configuration of IP addresses, and other information

Solution 2, locate the ifcfg-eth0, add information

[Root @ python_study ~] # Cat/etc/sysconfig/network-scripts/ifcfg-eth0DEVICE = eth0HWADDR = 00: 0C: 29: DC: 64: 66 TYPE = EthernetUUID = bytes = yesNM_CONTROLLED = yesBOOTPROTO = noneIPADDR = 192.168.1 **, *** # Set IPPREFIX = 24 GATEWAY = 192. 168. * **, *** # Gateway

 

Then the service network restrat is ready.

 

Set the Host Name:

Run the hostname command to view the host name. The value is from

[root@python_study ~]# cat /etc/sysconfig/networkNETWORKING=yesHOSTNAME=python_study

 

Modify the host name to make it take effect permanently, that is, modify the HOSTNAME = Host Name of the file, and restart the file to make it take effect.

If you temporarily modify the host name, you can use the hostname. The host name is valid after restart.

In this case, if you use the hostname-I command to view the system IP address, an error is returned when you ping the host name because the/etc/hosts file is also set.

Open the/etc/hosts file and add a line after it. The IP address host name is the host name. domain name.

In this case, you can directly ping the host name, which is actually the IP address of the local machine.

This file is used for IP address, host name, and domain name resolution. You can add other host information to it.

 

After completing the above operations, you can create a snapshot to restore the initial state.

4. Set the yum Source

The yum configuration file is/etc/yum. conf. The downloaded source file is located in the/etc/yum. repos. d/directory, and. repo is the extension.

My source file is server. repo.

Server1 is the source file id.

Name defines the full name of the yum Source

Baseurl defines the URL address of the yum source, which can be http, ftp, or file

Enabled: whether to enable yum source; 1 is enable

Do you want to check the software signature of the rpm package before the gpgcheck installation package?

The digital signature key of the gpgkey package.

I am a virtual machine, mount a CD, mount/dev/cdrom/mnt, and sometimes need to write the path to the Server layer in baseurl. But I remember that when rhel5 was used, I only needed to write it to/mnt.

The content of the server. repo file is as follows:

[root@python_study ~]# mount /dev/cdrom /mntmount: block device /dev/sr0 is write-protected, mounting read-only[root@python_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[root@python_study ~]# cd /etc/yum.repos.d/[root@python_study yum.repos.d]# lsrhel-source.repo[root@python_study yum.repos.d]# mv rhel-source.repo rhel-source.repo.bak[root@python_study yum.repos.d]# vi server.repo[root@python_study yum.repos.d]# cat server.repo [server1]  name=rhel 6.4     baseurl=file:///mnt/Server/     enabled=1     gpgcheck=0

 

You can use the yum install installation package later.

This is the set local yum Source

Reference self when I was just writing at work blog: http://9258124.blog.51cto.com/9248124/1676194

Additional: ftp:

The basic installation does not contain ftp. After yum install vsftpd is installed, the service vsftpd start

If you need to use the ftp tool to connect to the linux system as the root user, there are two files with the user under/etc/vsftpd/. Edit the files and comment out the root user, restart the vsftpd service.

 

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.