CentOS7样板机详细安装细节

编程入门 行业动态 更新时间:2024-10-05 19:20:12

CentOS7<a href=https://www.elefans.com/category/jswz/34/1617165.html style=样板机详细安装细节"/>

CentOS7样板机详细安装细节

先挂载光盘

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens32   # 网卡路径[root@localhost ~]# ip a   # 查看ip地址[root@localhost ~]# mkdir -p /media/cdrom   # 递归创建目录[root@localhost ~]# mount /dev/sr0 /media/cdrom   # 挂载光盘到cdrom这个目录[root@localhost ~]# sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-Media.repo # 修改参数把0改成1 enabled=1[root@localhost ~]#  yum -y clean all  # 清除yum缓存[root@localhost ~]#  yum makecache    # 重载yum缓存[root@localhost ~]# yum -y install net-tools vim gcc gcc-c++ make automake autoconf readline  lrzsz      # 安装常用的和编译语言[root@localhost ~]# systemctl stop firewalld   # 关闭防火墙Failed to stop fiewalld.service: Unit fiewalld.service not loaded.[root@localhost ~]# systemctl disable firewalld   # 关闭防火墙的开机自启Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.  [root@localhost ~]# systemctl stop NetworkManager   # 关掉selinux[root@localhost ~]# systemctl disable NetworkManager  # 关掉开机自启动[root@localhost ~]# chmod +x /etc/rc.d/rc.local  # 给开机自启动脚本加执行权限[root@localhost ~]# setenforce 0     # 临时关闭selinux[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config   # 进去修把SELINUX=enforcing改成disabled[root@localhost ~]# vim /etc/ssh/sshd_config # 进去修改两行文件 set nu 查看行79 GSSAPIAuthentication no115 UseDNS no[root@localhost ~]# systemctl restart sshd    # 重启服务
[root@localhost ~]# init 0 # 不用清理缓存直接关机  

systemctl   万能的

stop   暂停

start   开启

restart 重启

status 查看状态

disable   关闭开机自启

enable    开启开机自启

status    状态

更多推荐

CentOS7样板机详细安装细节

本文发布于:2024-02-28 14:33:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1769720.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:样板   细节   详细

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!