设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 1123|回复: 2
收起左侧

实体机安装Centos8搭建考试模拟环境(RHCSA7)

[复制链接]
发表于 2019-10-15 21:16:51 | 显示全部楼层 |阅读模式
本帖最后由 爱上纳木错 于 2019-10-15 21:18 编辑

本文转自https://github.com/rdbreak/rhcsa7env亲测使用Centos8安装通过

RHCSA 7 Automated Practice DeploymentPowered by Ansible and Vagrant
Installation options below:macOS Gatekeeper will block virtualbox from installing. All you have to do is go to Security & Privacy of System Preferences and click Allow under the General tab and rerun installation.
Install all at once with the command below:brew install ansible ; brew install python ; brew cask install vagrant ; brew cask install VirtualBox ; brew cask install virtualbox-extension-pack ; vagrant plugin install vagrant-guest_ansible
Alternatively, you can install everything individually below.Once the above software is installed. Do the following if you're running the environment on Mac:
  • Create a separate ~/bin directory and cd to it.  (The directory doesn't have to be ~/bin, it can be anything you want.)
  • Clone the environment repo to it with git clone https://github.com/rdbreak/rhcsa7env.git
  • Change to the rhcsa7env directory that is now in your ~/bin directory.
  • Run vagrant up to deploy the environment (If the environment has a designated repo VM it will take the longest to deploy the first time only, this is because the repo system has all the packages available to the base release but will be quicker on subsequent deployments.)
CentOS/RHEL 7 - Install all at once by Copy/Pasting the below command into your terminal as root.NOTE - If it's been awhile since you've run yum update, do that first. Reboot if the kernel was updated.

systemctl stop packagekit; yum install -y epel-release && yum install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; mkdir ~/Vagrant ; cd ~/Vagrant ; curl -o  vagrant_2.2.5_x86_64.rpm https://releases.hashicorp.com/v ... nt_2.2.5_x86_64.rpm && yum install -y vagrant_2.2.5_x86_64.rpm && vagrant plugin install vagrant-guest_ansible ; vagrant plugin install vagrant-libvirt ; vagrant plugin install vagrant-guest-ansible ; wget -O /etc/yum.repos.d/virtualbox.repo wget http://download.virtualbox.org/v ... hel/virtualbox.repo ; yum install -y VirtualBox-6.0 && systemctl start packagekit

Also, install the Virtualbox extension pack below
DebianNOTE - If it's been awhile since you've run apt update, do that first. Reboot if the kernel was updated.
Install all at once by Copy/Pasting the below command into your terminal as root.sudo snap install ruby ; sudo apt install ruby-bundler git -y; wget -c https://releases.hashicorp.com/v ... nt_2.2.5_x86_64.deb ; sudo dpkg -i vagrant_2.2.5_x86_64.deb ; wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - ; wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - ; sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian bionic contrib"; sudo apt update; sudo apt install -y virtualbox-6.0 ; vagrant plugin install vagrant-guest_ansibleAlso, install the Virtualbox extension pack belowOnce the above software is installed. Do the following if you're running the environment on Linux:
  • Create a separate ~/bin directory and cd to it.  (The directory doesn't have to be ~/bin, it can be anything you want.)
  • Clone the environment repo to it with git clone https://github.com/rdbreak/rhcsa7env.git
  • Change to the rhcsa7env directory that is now in your ~/bin directory.
  • Run vagrant up to deploy the environment (If the environment has a designated repo VM it will take the longest to deploy the first time only, this is because the repo system has all the packages available to the base release but will be quicker on subsequent deployments.)
WindowsOnce the above software is installed. Do the following if you're running the environment on Windows:
  • Create a separate ~/bin directory and cd to it using the same PowerShell as Administrator.  (The directory doesn't have to be ~/bin, it can be anything you want.)
  • Use your browser of choice and navigate to https://github.com/rdbreak/rhcsa7env, press the green “Clone or download” button then the “Download ZIP” button. Or use Github Desktop (See below).
  • Once downloaded, unzip the file and move it to the directory you created earlier, ~/bin in the above example.
  • Use PowerShell as Administrator again and cd to the ~/bin/rhcsa7env directory then run vagrant up to deploy the environment. (If the environment has a designated repo VM it will take the longest to deploy the first time only, this is because the repo system has all the packages available to the base release but will be quicker on subsequent deployments.)
Also, don't be spooked by any scary red font during the setup process. There are known issues that won't have a negative affect on the environment.
Now the deployment should be up and running!
(Recommended) Install Github Desktop to make pulling down changes easierNOTE this requires a free Github account
  • Navigate to https://desktop.github.com/ and download Github Desktop.
  • Create or sign in to your account.
  • Click "Clone a repository from the Internet" and enter "rdbreak/rhcsa7env" and choose a location then "Clone".
  • You are also able to easily pull changes when they're made available.
Other Useful Information:You can also use the VirtualBox console to interact with the VMs or through a terminal. If you need to reset the root password, you would need to use the console. I'm constantly making upgrades to the environments, so every once and awhile run git pull in the repo directory to pull down changes. If you're using Windows, it's recommended to use Github Desktop so you can easily pull changes that are made to the environment. The first time you run the vagrant up command, it will download the OS images for later use. In other words, it will take longest the first time around but will be faster when it is deployed again. You can run vagrant destroy -f to destroy your environment at anytime. This will erase everything. This environment is meant to be reuseable, If you run the vagrant up command after destroying the environment, the OS image will already be downloaded and environment will deploy faster. Once the setup is complete, the ipa server and client for realm EXAMPLE.COM will already be setup and paired. Deployment should take around 15 minutes depending on your computer. You shouldn't need to access the IPA or REPO server during your practice exams. Everything should be provided that you would normally need during an actual exam. Hope this helps in your studies!
Included systems:
  • ipa.example.com
  • repo.example.com
  • system1.example.com
System Details:
repo
  • IP - 192.168.55.4
  • Gateway - 192.168.55.1
  • DNS - 192.168.55.5
ipa
  • 192.168.55.5
  • Gateway - 192.168.55.1
  • DNS - 192.168.55.5
system1
  • 192.168.55.6
  • Gateway - 192.168.55.1
  • DNS - 192.168.55.5
There is a repo available to use from http://repo.example.com/rpms
Accessing the systemsRemember to add the IP addresses to your local host file if you want to connect to the guest systems with the hostname.Username - vagrantPassword - vagrant
LDAP users
  • Username = dave, lisa
  • Password = password
HelpIf you're having problems with the environment, please submit an issue by going to the ISSUES tab at the top. If you have more questions, looking for practice exams to use against this environment, or just looking for a fantastic Red Hat community to join, please navigate to #practiceexam in the Red Hat Certs Slack Workspace.
Known Issues:Running the 'vagrant up' environment build will fail If HyperV is installed on the Windows VirtualBox host.Error is usually "VT-x is not available. (VERR_VMX_NO_VMX)" or similar, when the script attempts to boot the first VM.
Resolution seems to be either remove HyperV, or preventing its hypervisor from starting with the command:bcdedit /set hypervisorlaunchtype off, followed by a reboot.

发表于 2019-10-19 15:04:06 | 显示全部楼层
nice share ,thnaks a lot.
沙发 2019-10-19 15:04:06 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2024-3-28 21:10 , Processed in 0.058283 second(s), 7 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

快速回复 返回顶部 返回列表