VirtualBox 安装 centos7

摘要:
补充:1)、Mac的VirtulBox6.X版本的host-only配置没有了,怎么配置?现在需要这么来设置:

1、准备条件

VirtualBox(6.1.4)、centos7 镜像(此文使用的是CentOS-7-x86_64-Minimal-1908.iso)

本文是 Mac环境下的安装.(之所以选择 6.1.4版本的VirtualBox,是因为低版本不兼容.这个会有一个问题,会在最后补充中说明)

1.1 VirtualBox 下载地址

https://www.virtualbox.org/wiki/Downloads

1.2 Centos 7 镜像下载地址()

http://isoredirect.centos.org/centos/7/isos/x86_64/

2、安装

2.1 配置基本信息

VirtualBox 安装 centos7第1张

VirtualBox 安装 centos7第2张

VirtualBox 安装 centos7第3张

VirtualBox 安装 centos7第4张

2.2 开始安装

VirtualBox 安装 centos7第5张

VirtualBox 安装 centos7第6张

VirtualBox 安装 centos7第7张

VirtualBox 安装 centos7第8张

VirtualBox 安装 centos7第9张

这里可以设置 root 密码,也可以创建用户,根据自己需求.

VirtualBox 安装 centos7第10张

等待安装完成重启。

2.3 修改配置

##更新 如下两个文件的配置
/etc/sysconfig/network-scripts/ifcfg-enp0s3
/etc/sysconfig/network-scripts/ifcfg-enp0s3
onboot=yes
##然后重启网络
servcie network restart

3、更改 yum 的配置

3.1 下载阿里云的repo

[root@k8s-master ~]# yum install -y wget

[root@centos7 /]#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
[root@centos7 /]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3.2 清除缓存并生成新的缓存

[root@centos7 /]# yum clean all
[root@centos7 /]# yum makecache

VirtualBox 安装 centos7第11张

3.3 验证

安装net-tools工具,运行ifconfig命令

yum install -y net-tools

VirtualBox 安装 centos7第12张

3.4. 关闭防火墙

[root@k8s-master ~]# firewall-cmd --state
running
[root@k8s-master ~]# systemctl stop firewalld.service
[root@k8s-master ~]# 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.

firewall-cmd --state #查看防火墙状态

systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动


3.5. 关闭selinux

[root@k8s-master ~]# getenforce
Enforcing
[root@k8s-master ~]# setenforce 0
[root@k8s-master ~]# sed -i 's/^ *SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

#查看selinux状态

getenforce

#临时关闭selinux
setenforce 0

#永久关闭(需重启系统)
sed -i 's/^ *SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

至此完成Centos7.6操作系统安装和优化。

补充:

1)、Mac 的 VirtulBox6.X 版本的 host-only 配置没有了,怎么配置?

VirtualBox 安装 centos7第13张

现在需要这么来设置:

VirtualBox 安装 centos7第14张

VirtualBox 安装 centos7第15张

免责声明:文章转载自《VirtualBox 安装 centos7》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇异步任务分发模块Celeryphp使用curl方法请求java接口下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

ambari安装hdp时,新建的ambari-hdp-1.repo中baseurl无值

参考链接: https://community.cloudera.com/t5/Support-Questions/HDP-3-0-with-local-repository-failing-to-deploy/td-p/240954 https://community.cloudera.com/t5/Community-Articles/ambari-2...

centos7使用yum方式安装node_exporter

官网下载地址:https://prometheus.io/download/ 选择对应的系统版本 官网提供的是压缩包,点击旁边的github地址 github页面显示的有yum安装和docker安装,这里选择“RHEL/CentOS/Fedora” 进入到yum方式安装页面 根据系统版本下载repo文件,我这里是centos7 # curl -Lo /et...

RHEL 8配置yum源

一、RHEL8/CentOS8配置本地yum源 1. 挂载光盘镜像配置本地yum源 先移走系统默认的repo文件 cd /etc/yum.repos.d/ mkdir repobak mv *.repo repobak/ 2. 挂载本地光盘镜像 mkdir /mnt/cdrom mount -t iso9660 /soft/rhel-8.2-x86...

Virtualbox设置共享文件夹的方法

以虚拟Ubuntu系统为例: 1. 安装增强功能包(VBoxGuestAdditions) 打开虚拟机,设置ubuntu 9。04,找到光驱选项加载VBoxGuestAdditions.iso.(该镜像就在虚拟机的安装目录下面),确定 运行ubuntu,在光驱下就会有VBoxGuestAdditions镜像,打开镜像,运行autorun.sh,系统就会自动...

centos7下使用yum安装mysql

CentOS7的yum源中默认好像是没有mysql的。为了解决这个问题,我们要先下载mysql的repo源。 1. 下载mysql的repo源 $ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2. 安装mysql-community-release-el7-5.no...

怎样为virtualbox添加新的分辨率

virtualbox是个相当NB的开源跨平台虚拟机软件,只是新创建的虚拟机仅仅支持几种分辨率。比如。安装win8.1,仅仅有例如以下图的几种分辨率。 只是我的显示器是5K哦,这么点分辨率,简直是搞笑。可惜,virtualbox的GUI并没有提供加入分辨率的功能,只是却提供了命令行工具来加入不论什么大小的分辨率。比如,要加入一个2560*1440的分辨率...