石小疯 发表于 2024-9-2 10:20:16

Centos 7.9 安装 图解版 小白必看 最新

 兄弟们,非小白就散了吧
安装VMware和CentOS7体系
CentOS7.9.io镜像下载
发起 阿里云下载cents镜像ios 链接如下 
https://mirrors.aliyun.com/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-DVD-2207-02.iso
VMware安装
win7用 12
win10 用 15
win11用 16.2.4
别问为什么,问就是win和VMware不兼容导致虚拟机各种奇葩异常,重装集群了 
这已经是我当年实验了20多次得出的结果,最佳兼容性搭配。
开始安装准备 如下
CentOS7.9.io镜像下载
https://mirrors.aliyun.com/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-DVD-2207-02.iso
已经安装的VMware 和  
已经下载的  CentOS-7-x86_64-DVD-2009.iso 放一个位置:我放在 I  盘了
https://i-blog.csdnimg.cn/direct/8f6ca09417ef4e1ea9556ff829cfabc8.png


https://i-blog.csdnimg.cn/direct/d7380493fc9c4e6380af2d871d82d16c.png

https://i-blog.csdnimg.cn/direct/5a8f78a8f75e49ec8183262161b8ab6b.png
https://i-blog.csdnimg.cn/direct/293f92ac8d2c4ca1a439fe2d16242bea.pnghttps://i-blog.csdnimg.cn/direct/5c3f586d06c849768a1acd19b9e914c1.png
https://i-blog.csdnimg.cn/direct/57fd8333b029482cbcade1560ab3c039.pnghttps://i-blog.csdnimg.cn/direct/8fc5b200c5d84027bf20cf397e42f2f6.pnghttps://i-blog.csdnimg.cn/direct/dca4e664c8404fa68e975d6aa08f29e7.pnghttps://i-blog.csdnimg.cn/direct/6620c8fc34e645a4922195d52ba58cdc.pnghttps://i-blog.csdnimg.cn/direct/d72f030980274bb2a1f4d02885c56fb0.pnghttps://i-blog.csdnimg.cn/direct/c8bbfd6314914705bed7ceef208a500a.png
https://i-blog.csdnimg.cn/direct/0d1bfecbcbfd495bb091ba18ad7c9a4c.pnghttps://i-blog.csdnimg.cn/direct/d0a88922fb48427787fd661be42f9f61.pnghttps://i-blog.csdnimg.cn/direct/a88928430c2c4575a77b9f1674101c17.pnghttps://i-blog.csdnimg.cn/direct/6aafa1fbbbdf4f4782c29c8d862109b3.pnghttps://i-blog.csdnimg.cn/direct/9fad2caf9ef24c4ab08f675925283e7a.png

https://i-blog.csdnimg.cn/direct/3032864967d543309fa885414e14dc11.pnghttps://i-blog.csdnimg.cn/direct/5461b4e9c5e44f289e8545657bed051e.png
鼠标在虚拟机里时,牢记:先用上键 带向上箭头的那个键把原本在中心的白色移到最上部分如上图

https://i-blog.csdnimg.cn/direct/22128c901cd348c88756a28a1e2e7bd8.png等待几分钟,
https://i-blog.csdnimg.cn/direct/eb86a20c3b854d3894c71f0bfcf6ac2f.pnghttps://i-blog.csdnimg.cn/direct/e321e07ee33e42e7bec36c38ab53f57b.pnghttps://i-blog.csdnimg.cn/direct/8290b169c3144f9c9b4d0ad2e327c7b1.pnghttps://i-blog.csdnimg.cn/direct/a2c23179509f4ae9b9edc31b4da61f20.pnghttps://i-blog.csdnimg.cn/direct/4f0b77a285a442da83f9bd8df0a755f0.png
点完成后直接进行安装
https://i-blog.csdnimg.cn/direct/f9bf1a94259143bba1aa10c45bc71c2a.png
https://i-blog.csdnimg.cn/direct/de0ba9e1dd8c4c0f9d2c3fa8161915cf.png
下图创建平凡用户111  暗码:Pas12344321.
https://i-blog.csdnimg.cn/direct/5c39cfd4d71a4848842ad615a82e5d3a.png
https://i-blog.csdnimg.cn/direct/44442724d66b41f5b25dc6c132d6b103.png等待安装
https://i-blog.csdnimg.cn/direct/b3bcedb09d3d4e9584e3b0fd952c6442.png
https://i-blog.csdnimg.cn/direct/bd807cd9d17d4415aa3c78f547facdea.pnghttps://i-blog.csdnimg.cn/direct/7d18c44ef0ae4a0dbdd6e1cb681c6b2e.pnghttps://i-blog.csdnimg.cn/direct/b90d20e7baf74e8bb20e3404931c9e38.png等待一会儿 

https://i-blog.csdnimg.cn/direct/546d91873a704bb8bc46bf41ddba0555.pnghttps://i-blog.csdnimg.cn/direct/45bf8c944bd946bb9a837d38664c670f.png
root 输入刚刚创建用户时创建的暗码 root
https://i-blog.csdnimg.cn/direct/c3620376ba0c43bca32c21a564c1f216.pnghttps://i-blog.csdnimg.cn/direct/3b604f8b9ada44209b089a3cb9f6253e.pnghttps://i-blog.csdnimg.cn/direct/a4386e0473cc41dbb45421ff342e9404.pnghttps://i-blog.csdnimg.cn/direct/777dd07a7ffa469eafad250d8279efc4.pnghttps://i-blog.csdnimg.cn/direct/bd8ba9c1047c42da8e4e73c3a11c29ac.pnghttps://i-blog.csdnimg.cn/direct/5852d27dcf14448692614dee7d96e8c7.png
https://i-blog.csdnimg.cn/direct/3c79cc2131094a3685bde41990d05872.png

 centos7 设置yum源




linux体系初始环境设置

   为什么换阿里云的源,因为Centos停止维护,用他的源来连接不上,而国内老用户很多企业还在用旧版本,我们为了适配企业且阿里云的源网速较快以是说设置阿里源
1)设置服务器的IP地点
    检察机器的网卡名称。
         ip address show。
(2)设置服务器的主机名称
    设置主机名称
        hostnamectl set-hostname master (主机名):修改以后永久见效
        hostname master11  :暂时修改主机名为master111
    检察当前服务器的名称。
        hostname
(3)绑定主机名与IP地点
                检察ip  
       ip addr
    192.168.20.134
         进入编辑模式  i
    修改hosts文件
        vi /etc/hosts
    在其中增长相应内容(下面的内容表现主机名master对应的IP地点为192.168.1.1):
    192.168.20.134 master 
 
进入命令行模式shift q 
    (4)防火墙
         防火墙的开启、关闭、禁用命令
    设置开机启用防火墙:systemctl enable firewalld
    设置开机禁用/永久关闭防火墙:
    systemctl disable firewalld 或 systemctl disable firewalld.service

    启动防火墙:systemctl start firewalld
    关闭防火墙:systemctl stop firewalld 或 systemctl stop firewalld.service
    检查防火墙状态 systemctl status firewalld
    我们此时永久关闭防火墙供后续使用,暂时关闭后续轻易无法连接外网
# systemctl  disable  firewalld.service 
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
    
        检察防火墙的状态
        systemctl status firewalld  
    
    设置 selinux
# getenforce 
Enforcing
# setenforce 0
   
2.备份原来的yum源
# mkdir /etc/yum.repos.d/repobak
# mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repobak/
   
3.设置网络yum源  

centos镜像_centos下载地点_centos安装教程-阿里巴巴开源镜像站阿里巴巴开源镜像站为您提供免费的centos下载地点及centos安装教程,centos镜像简介:CentOS,是基于Red Hat Linux提供的可自由使用源代码的企业级Linux发行版本,是RHEL(Red Hat Enterprise Linux)源代码再编译的产物,是一个免费的企业级计算平台;CentOS 定期发行及更新版本,以便支持新的硬件,从而建立一个安全、低维护、稳定、高预测性、高重复性的Linux环境。阿里巴巴开源镜像站,连续同步CentOS、CentOC-altarch等最新版镜像文件,为用户提供极致的下载体验。阿里巴巴开源镜像站https://csdnimg.cn/release/blog_editor_html/release2.3.6/ckeditor/plugins/CsdnLink/icons/icon-default.png?t=N7T8https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11UzjBznepel镜像_epel下载地点_epel安装教程-阿里巴巴开源镜像站阿里巴巴开源镜像站为您提供免费的epel下载地点及epel安装教程,epel镜像简介:EPEL( Extra Packages for Enterprise Linux) ,是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。EPEL 项目与 Fedora 根本一致,包罗完整的构建体系、升级管理器、镜像管理器等等。阿里巴巴开源镜像站,提供最新版EPEL镜像安装源,供开辟者免费下载,更快速、更稳定。阿里巴巴开源镜像站https://csdnimg.cn/release/blog_editor_html/release2.3.6/ckeditor/plugins/CsdnLink/icons/icon-default.png?t=N7T8https://developer.aliyun.com/mirror/epel?spm=a2c6h.13651102.0.0.3e221b11UzjBzn
    (1)-----这里直接使用 阿里 的 镜像
    新建文件  aliyun.repo
    vim /etc/yum.repos.d/aliyun.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo

    生成缓存列表:
    yum makecache
检查是否设置成功命令 
$ yum repolist 
    列出软件包的依赖关系
$ yum deplist  
清理软件源
$ yum clean all
重新生成缓存列表:
$ yum makecache
检查是否设置成功命令
$ yum repolist 

设置ssh   ssh 远程 报错 办理方案 centos 无法远程 别的附带-免密登录 免暗码跳转堡垒机教程-CSDN博客文章欣赏阅读993次,点赞13次,收藏13次。ssh 远程 报错 办理方案 centos 无法远程 别的附带-免密登录 免暗码跳转堡垒机教程https://g.csdnimg.cn/static/logo/favicon32.icohttps://blog.csdn.net/qq_61414097/article/details/141114432

完成,接下来就是设置网卡了

为centos设置静态网卡-CSDN博客文章欣赏阅读1k次,点赞38次,收藏9次。centos7设置静态网卡--------------CSDN中该方面最详细教程包罗部分端口转发 i企业常用的ptables 命令以centos7为例子,这份文档总结了几十种,五花八门的错误,只有你想不到,没有我没碰到的。相信这份文档足够你办理关于centos7设置静态网卡的全部问题,已经是csdn最全的了https://g.csdnimg.cn/static/logo/favicon32.icohttps://blog.csdn.net/qq_61414097/article/details/140958219

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: Centos 7.9 安装 图解版 小白必看 最新