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

本是古典 何须时尚 2021-12-07 14:04 386阅读 0赞
  1. ** Linux安装系统注意事项**
  2. 1.分区
  3. 学习用途:
  4. /boot200M
  5. /swap :内存的12
  6. /:根据需要分配大小,比如虚拟机下总空间是15G,那么可以分配8——10G跟/分区,如果是生产环境,60——100G都很正常
  7. /opt:最好有个单独的分区,用以存储数据、资料,下次使用系统此分区保持不变,就不会丢失数据。
  8. 2.根据需要安装工具包。
  9. 3. 学习使用的话尽可能最小化安装,只需要在最小化的基础上安装中文支持包即可。
  10. **系统初始化**
  11. 1.修改主机名字
  12. [root@localhost Desktop]# vim /etc/sysconfig/network
  13. [root@localhost Desktop]# cat /etc/sysconfig/network
  14. NETWORKING=yes
  15. HOSTNAME=larrywen.host.com
  16. [root@localhost Desktop]# hostname
  17. localhost.localdomain
  18. [root@localhost Desktop]# hostname larrywen.host.com
  19. [root@localhost Desktop]# hostname
  20. larrywen.host.com
  21. #修改完后重启系统或者关闭终端,再次执行hostname修改就可以看到效果
  22. 2.配置网络
  23. [root@larrywen ~]# vi /etc/sysconfig/network-scripts/
  24. #局域网,配置IPADDR和NETMASK即可
  25. 3.关闭安全相关的比如SELINUX防火墙
  26. [root@larrywen ~]# chkconfig NetworkManager off
  27. [root@larrywen ~]# chkconfig iptables off
  28. [root@larrywen ~]# chkconfig ip6tables off
  29. [root@larrywen ~]# /etc/init.d/iptables stop
  30. [root@larrywen ~]# /etc/init.d/ip6tables stop
  31. [root@larrywen ~]# setenforce 0
  32. #将SELINUX有enabled改为permissive
  33. [root@localhost ~]# grep "^SELINUX=" /etc/sysconfig/selinux -n
  34. 8:SELINUX=permissive
  35. 4.yum源的配置
  36. [root@localhost ~]# mkdir /iso
  37. mount /dev/cdrom /iso
  38. cd /iso
  39. ll
  40. [root@localhost iso]# cd /etc/yum.repos.d/
  41. [root@localhost yum.repos.d]# ls
  42. rhel-source.repo
  43. [root@localhost yum.repos.d]# cp rhel-source.repo iso.repo
  44. [root@localhost yum.repos.d]# cat iso.repo
  45. [rhel-iso]
  46. name=Red Hat Enterprise Linux $releasever - $basearch - Source
  47. baseurl=file:///iso
  48. enabled=1
  49. gpgcheck=0
  50. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  51. [root@localhost yum.repos.d]# yum install vim man -y
  52. #mount后重启失效,要想永久生效,添加此句话
  53. [root@localhost yum.repos.d]# echo "mount /dev/cdrom /iso" >> /etc/rc.local
  54. [root@localhost yum.repos.d]# cat /etc/rc.local
  55. #!/bin/sh
  56. #
  57. # This script will be executed *after* all the other init scripts.
  58. # You can put your own initialization stuff in here if you don't
  59. # want to do the full Sys V style init stuff.
  60. touch /var/lock/subsys/local
  61. mount /dev/cdrom /iso
  62. 5.其他可以自行配置,比如启用中文输入法、修改终端字体和颜色等等
  1. 我的邮箱:wgbno27@163.com 新浪微博:@Wentasy27
  2. 微信公众平台:JustOracle(微信号:justoracle
  3. 数据库技术交流群:336882565(加群时验证 From CSDN XXX
  4. Oracle交流讨论组:https://groups.google.com/d/forum/justoracle
  5. By Larry Wen










katoon Sina CSDN
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客]

发表评论

表情:
评论列表 (有 0 条评论,386人围观)

还没有评论,来说两句吧...

相关阅读

    相关 系统迁移的注意事项

             在实际的工作中,我们可能经常会遇到系统需要从一台服务器迁移到另外一台服务器的情况。          那么在迁移的过程中,我们要注意那些问题呢?通过最近一次