Linux从入门到放弃 CentOS 7 64 位 系统安装

1. 创建虚拟机

创建虚拟机
自定义
选择版本
稍后安装
选择系统
命名
选择配置
内存
网卡
默认就好
下一步
磁盘
大小
命名
硬件配置
选择系统安装包
开启
TAB

2. 配置网卡

在界面中按TAB输入

 net.ifnames=0 biosdevname=0

回车 开始安装
TAB配置网卡
语言
网卡配置
配置
开机启动
静态IP
静态IP设置
下一步
关闭
关闭
关闭
关闭
分区
选择标准分区
创建根目录
下一步
下一步

时区设置
亚洲上海
安装软件
最小化安装
开始安装
设置root密码
密码
重启
启动
修改虚拟机
修改网卡配置
修改
修改网关

优化配置yum源

sudo sed -e 's|^mirrorlist=|#mirrorlist=|g'          -e 's|^#baseurl=http://mirror.centos.org/centos|baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos|g'          -i.bak          /etc/yum.repos.d/CentOS-*.repo

sudo yum install epel-release -y

sudo sed -e 's!^metalink=!#metalink=!g'     -e 's!^#baseurl=!baseurl=!g'     -e 's!https\?://download\.fedoraproject\.org/pub/epel!https://mirrors.tuna.tsinghua.edu.cn/epel!g'     -e 's!https\?://download\.example/pub/epel!https://mirrors.tuna.tsinghua.edu.cn/epel!g'     -i /etc/yum.repos.d/epel*.repo

下载常用软件

yum install -y  vim  wget  tree  telnet  nc nmap net-tools  bash-completion #(补全参数软件)

系统安全优化

1.firewalld(防火墙)

systemctl stop firewalld.service	#关闭firewalld防火墙服务
systemctl status firewalld.service	#关闭开机启动firewalld防火墙服务

2.selinux (限制root用户行为)

vim /etc/selinux/config


# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing	#开启
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
# 重启后生效
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值