Precautions for Linux installation and system initialization precautions for Linux installation 1. partition learning purpose:/boot: 200 M/swap: 1 to 2 times of memory/: allocate size as needed. For example, the total space in a virtual machine is 15 GB, we can allocate 8-10g heel/partition. If it is a production environment, 60--100G is normal/opt: it is best to have a separate partition to store data and data, the next time you use the system, this partition remains unchanged and data will not be lost. 2. Install the Toolkit as needed. 3. If you want to learn how to use it, install the Chinese support package as much as possible. System initialization 1. modify host name [plain] [root @ localhost Desktop] # vim/etc/sysconfig/network [root @ localhost Desktop] # cat/etc/sysconfig/network NETWORKING = yes HOSTNAME = larrywen.host.com [root @ localhost Desktop] # hostname localhost. localdomain [root @ localhost Desktop] # hostname larrywen.host.com [root @ localhost Desktop] # hostname larrywen.host.com # after modification, restart the system or close the terminal. If you modify the hostname again, you can see effect 2. configure the network [plain] [root @ larrywen ~] # Vi/etc/sysconfig/network-scripts/# LAN, configure IPADDR and NETMASK. 3. disable security-related services such as SELINUX firewall [plain] [root @ larrywen ~] # Chkconfig NetworkManager off [root @ larrywen ~] # Chkconfig iptables off [root @ larrywen ~] # Chkconfig ip6tables off [root @ larrywen ~] #/Etc/init. d/iptables stop [root @ larrywen ~] #/Etc/init. d/ip6tables stop [root @ larrywen ~] # Setenforce 0 # Change SELINUX's enabled to permissive [root @ localhost ~] # Grep "^ SELINUX ="/etc/sysconfig/selinux-n 8: SELINUX = permissive 4. yum source configuration [plain] [root @ localhost ~] # Mkdir/iso mount/dev/cdrom/iso cd/iso ll [root @ localhost iso] # cd/etc/yum. repos. d/[root @ localhost yum. repos. d] # ls rhel-source.repo [root @ localhost yum. repos. d] # cp rhel-source.repo iso. repo [root @ localhost yum. repos. d] # cat iso. repo [rhel-iso] name = Red Hat Enterprise Linux $ releasever-$ basearch-Source baseurl = file: // iso enabled = 1 gpgcheck = 0 gpgkey = file: /// etc/pki/rpm-gpg/RPM-GPG-KEY-re Dhat-release [root @ localhost yum. repos. d] # yum install vim man-y # restart failed after mount. To make it permanently effective, add this statement [root @ localhost yum. repos. d] # echo "mount/dev/cdrom/iso">/etc/rc. local [root @ localhost yum. repos. d] # cat/etc/rc. local #! /Bin/sh # This script will be executed * after * all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch/var/lock/subsys/local mount/dev/cdrom/iso 5. others can be configured by yourself, such as enabling the Chinese Input Method, modifying the terminal font and color, etc.