Linux安装系统注意事项1.分区学习用途:/boot:200M/swap :内存的1到2倍/:根据需要分配大小,比如虚拟机下总空间是15G,那么可以分配8——10G跟/分区,如果是生产环境,60——100G都很正常/opt:最好有个单独的分区,用以存储数据、资料,下次使用系统此分区保持不变,就不会丢失数据。2.根据需要安装工具包。3. 学习使用的话尽可能最小化安装,只需要在最小化的基础上安装中文支持包即可。
系统初始化1.修改主机名字[root@localhost Desktop]# vim /etc/sysconfig/network[root@localhost Desktop]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME= linuxidc.host.com[root@localhost Desktop]# hostname
localhost.localdomain[root@localhost Desktop]# hostname linuxidc.host.com
[root@localhost Desktop]# hostname
linuxidc.host.com
#修改完后重启系统或者关闭终端,再次执行hostname修改就可以看到效果2.配置网络[root@ linuxidc ~]# vi /etc/sysconfig/network-scripts/
#局域网,配置IPADDR和NETMASK即可3.关闭安全相关的比如SELINUX防火墙[root@ linuxidc ~]# chkconfig NetworkManager off
[root@ linuxidc ~]# chkconfig iptables off
[root@ linuxidc ~]# chkconfig ip6tables off[root@ linuxidc ~]# /etc/init.d/iptables stop
[root@ linuxidc ~]# /etc/init.d/ip6tables stop
[root@ linuxidc ~]# setenforce 0
#将SELINUX有enabled改为permissive
[root@localhost ~]# grep "^SELINUX=" /etc/sysconfig/selinux -n
8:SELINUX=permissive4.yum源的配置[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-RedHat-release[root@localhost yum.repos.d]# yum install vim man -y#mount后重启失效,要想永久生效,添加此句话
[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 /iso5.其他可以自行配置,比如启用中文输入法、修改终端字体和颜色等等
相关阅读:Linux系统安装初始化成功 http://www.linuxidc.com/Linux/2007-05/4503.htmLinux虚拟文件系统(内核初始化<一>) http://www.linuxidc.com/Linux/2012-02/53770.htmLinux虚拟文件系统(内核初始化<二>) http://www.linuxidc.com/Linux/2012-02/53771.htm浅谈Linux系统的启动流程64位操作系统下使用YUM下只安装纯净64位软件包的设定相关资讯 Linux安装系统 Linux系统初始化 本文评论 查看全部评论 (0)