Linux安装系统注意事项及系统初始化 – DBA

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/networkNETWORKING=yesHOSTNAME=larrywen.host.com[root@localhost Desktop]# hostnamelocalhost.localdomain[root@localhost Desktop]# hostname larrywen.host.com[root@localhost Desktop]# hostnamelarrywen.host.com#修改完后重启系统或者关闭终端,再次执行hostname修改就可以看到效果

2.配置网络

[root@larrywen ~]# vi /etc/sysconfig/network-scripts/#局域网,配置IPADDR和NETMASK即可

3.关闭安全相关的比如SELINUX防火墙

[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#将SELINUX有enabled改为permissive[root@localhost ~]# grep "^SELINUX=" /etc/sysconfig/selinux -n8:SELINUX=permissive

4.yum源的配置

[root@localhost ~]# mkdir /isomount /dev/cdrom /isocd /isoll[root@localhost iso]# cd /etc/yum.repos.d/[root@localhost yum.repos.d]# lsrhel-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 - Sourcebaseurl=file:///isoenabled=1gpgcheck=0gpgkey=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/localmount /dev/cdrom /iso

5.其他可以自行配置,比如启用中文输入法、修改终端字体和颜色等等

我的邮箱:wgbno27@163.com  新浪微博:@Wentasy27  微信公众平台:JustOracle(微信号:justoracle)  数据库技术交流群:336882565(加群时验证 From CSDN XXX)  Oracle交流讨论组:https://groups.google.com/d/forum/justoracle  By Larry Wen
@Wentasy

前有阻碍,奋力把它冲开,运用炙热的激情,

Linux安装系统注意事项及系统初始化 – DBA

相关文章:

你感兴趣的文章:

标签云: