-
Notifications
You must be signed in to change notification settings - Fork 48
revise readme for multiple host os #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
9266817
8058808
373c8c7
de1aca6
16167a6
4f9a414
c6bcfb3
86b8481
13d9d94
abf33f2
fe9e7bf
e54e9bc
d4eb9fb
31c846a
66244b3
5f86b8b
d55de27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| ### Install Vagrant using VirtualBox on Fedora 25 | ||
|
|
||
| Tested for Fedora 25 | ||
|
|
||
| Run the following commands on fresh installed Fedora first: | ||
| ```shell | ||
| # Upgrade fedora | ||
| sudo dnf -y update # upgrade to the latest kernel etc. | ||
|
|
||
| # Install vim editor | ||
| sudo dnf -y install vim | ||
|
|
||
| # Reboot machine | ||
| sudo reboot | ||
| ``` | ||
|
|
||
| Have you run `dnf update` lately, then start here: | ||
| ```shell | ||
| # Generate SSH key to use when accessing machines | ||
| ssh-keygen -t rsa -b 4096 -N "" -C "root@example.com" -f ~/.ssh/rhce # empty password | ||
|
|
||
| # Make loading SSH key to ssh agent automatic | ||
| eval $(ssh-agent); echo $'eval $(ssh-agent)' >> ~/.bash_profile | ||
| ssh-add ~/.ssh/rhce; echo $'ssh-add ~/.ssh/rhce' >> ~/.bash_profile | ||
|
|
||
| # Download VritualBox repository | ||
| sudo wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo -O /etc/yum.repos.d/virtualbox.repo | ||
|
|
||
| # Clean repository cache & import GPG Key | ||
| sudo dnf clean dbcache | ||
| sudo dnf -y repolist # Import the GPG keys | ||
|
|
||
| # Install lastest virtualbox; will error when multiple versions of virtualbox are offered. | ||
| sudo dnf -y install git gcc make kernel-devel VirtualBox* | ||
|
|
||
| # Install VirtualBox kernel modules | ||
| sudo /sbin/vboxconfig # load the vboxdrv kernel module, will fail without dnf update | ||
|
|
||
| # Check if vboxdrv service is started without errors | ||
| systemctl status vboxdrv # active? | ||
|
|
||
| # Check VirtualBox version | ||
| VBoxManage --version # should return no errors | ||
|
|
||
| # Restart machine | ||
| sudo reboot | ||
| ``` | ||
|
|
||
| ```shell | ||
| # Get latest vagrant version | ||
| # which of the following 3 is easiest to maintain and has most chance to fail gracefully when content or url change? | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | sed -nr '/.*href="\/vagrant\/([^/]*).*/{s//\1/p;q}' ` # from top of page | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | awk 'match($0, /href="\/vagrant\/([^/]*)/, a) {print a[1]; exit}'` # pick top version listed on page | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | awk 'match($0, /href="\/vagrant\/([^/]*)/, a) {if (RSTART) { ++i; v[i]=a[1]}} END {n = asort (v); print v[n]}'` | ||
|
|
||
| # Install vagrant | ||
| sudo dnf -y install https://releases.hashicorp.com/vagrant/"$vagrant_version"/vagrant_"$vagrant_version"_x86_64.rpm | ||
|
|
||
| # Check vagrant version | ||
| vagrant --version | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ### Install Vagrant using KVM on RHEL/CentOS 64-bit | ||
|
|
||
| Tested on CentOS 7.3 1610-01. Vagrantfile *not* tested with KVM. | ||
|
|
||
| ```shell | ||
| # Generate SSH key to use when accessing machines | ||
| ssh-keygen -t rsa -b 4096 -N "" -C "root@example.com" -f ~/.ssh/rhce # empty password | ||
|
|
||
| # Make loading SSH key to ssh agent automatic | ||
| eval $(ssh-agent); echo $'eval $(ssh-agent)' >> ~/.bash_profile | ||
| ssh-add ~/.ssh/rhce; echo $'ssh-add ~/.ssh/rhce' >> ~/.bash_profile | ||
|
|
||
| # Get latest vagrant version | ||
| # which of the following 3 is easiest to maintain and has most chance to fail gracefully when content or url change? | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | sed -nr '/.*href="\/vagrant\/([^/]*).*/{s//\1/p;q}' ` # from top of page | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | awk 'match($0, /href="\/vagrant\/([^/]*)/, a) {print a[1]; exit}'` # pick top version listed on page | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | awk 'match($0, /href="\/vagrant\/([^/]*)/, a) {if (RSTART) { ++i; v[i]=a[1]}} END {n = asort (v); print v[n]}'` | ||
| # Install packages | ||
| sudo yum -y install https://releases.hashicorp.com/vagrant/"$vagrant_version"/vagrant_"$vagrant_version"_x86_64.rpm git qemu libvirt libvirt-devel ruby-devel gcc qemu-kvm | ||
|
|
||
| # Install vagrant libvirt plugin | ||
| vagrant plugin install vagrant-libvirt ; echo $'vagrant plugin install vagrant-libvirt'>> ~/.bash_profile | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| ### Install Vagrant using VirtualBox on RHEL/CentOS 64-bit | ||
|
|
||
| Tested on CentOS 7.3 1610-01 | ||
|
|
||
| ```shell | ||
| # Download VirtualBox repository | ||
| sudo wget http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo -O /etc/yum.repos.d/virtualbox.repo | ||
|
|
||
| # Clean repository cache & import GPG Key | ||
| sudo yum clean dbcache; sudo yum -y repolist # Import the GPG keys | ||
|
|
||
| # Ensure latest version of Extra Packages for Enterprise Linux is installed | ||
| sudo yum -y install epel-release # should be 7.8 | ||
|
|
||
| # Get latest VirtualBox version | ||
| # which of the following 2 is easiest to maintain, has most chance to fail gracefully when yum implementation changes or Vbox gets new numbering scheme | ||
| export virtualbox_version=`yum -y search VirtualBox | awk 'match($0, /(VirtualBox-[0-9]\.[0-9])/, a) {b=a[1]} END {print b}'` # depends on yum sorting | ||
| export virtualbox_version=`yum -y search VirtualBox | awk 'match($0, /(VirtualBox-[0-9]\.[0-9])/, a) {if (RSTART) { ++i; v[i]=a[1]}} END {n = asort (v); print v[n]}'` | ||
|
|
||
| # Install packages | ||
| sudo yum -y install git gcc make kernel-devel $virtualbox_version | ||
|
|
||
| # Install VirtualBox kernel modules | ||
| sudo /sbin/vboxconfig # load the vboxdrv kernel module | ||
|
|
||
| # Check if vboxdrv service is started without errors | ||
| systemctl status vboxdrv # enabled? | ||
|
|
||
| # Check VirtualBox version | ||
| VBoxManage --version # should return no errors | ||
|
|
||
| # Restart machine | ||
| sudo reboot | ||
| ``` | ||
|
|
||
| ```shell | ||
| # Get latest vagrant version | ||
| # which of the following 3 is easiest to maintain and has most chance to fail gracefully when content or url change? | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | sed -nr '/.*href="\/vagrant\/([^/]*).*/{s//\1/p;q}' ` # from top of page | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | awk 'match($0, /href="\/vagrant\/([^/]*)/, a) {print a[1]; exit}'` # pick top version listed on page | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | awk 'match($0, /href="\/vagrant\/([^/]*)/, a) {if (RSTART) { ++i; v[i]=a[1]}} END {n = asort (v); print v[n]}'` | ||
|
|
||
| # Install vagrant | ||
| sudo yum -y install https://releases.hashicorp.com/vagrant/"$vagrant_version"/vagrant_"$vagrant_version"_x86_64.rpm | ||
|
|
||
| # Check vagrant version | ||
| vagrant --version | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| ### Instructions for installing VirtualBox & Vagrant on Ubuntu | ||
|
|
||
| Tested on Ubuntu 16.04 | ||
|
|
||
| ```shell | ||
| # Update packages list | ||
| sudo apt update | ||
|
|
||
| # Upgrade Ubuntu & cleanup | ||
| sudo apt -y upgrade; sudo apt -y autoremove | ||
|
|
||
| # Reboot machine | ||
| sudo reboot | ||
| ``` | ||
|
|
||
| ```shell | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @smartbit I think we can organize it better # Generate SSH key to use when accessing machies
ssh-keygen -t rsa -b 4096 -N "" -C "root@example.com" -f ~/.ssh/rhce # empty password
# Make adding SSH key load to ssh agent automatic
eval $(ssh-agent); echo $'eval $(ssh-agent)' >> ~/.profile
ssh-add ~/.ssh/rhce; echo $'ssh-add ~/.ssh/rhce' >> ~/.profile
# Add Virtualbox GPG Key & repository
wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian `lsb_release -sc` non-free contrib" > /etc/apt/sources.list.d/virtualbox.org.list'
# TODO remove linestarve.com and use alternative method to get latest version of vagrant
# Add a repository to download vagrant
sudo bash -c 'echo deb http://vagrant-deb.linestarve.com/ any main > /etc/apt/sources.list.d/wolfgang42-vagrant.list'
sudo apt-key adv --keyserver pgp.mit.edu --recv-key AD319E0F7CFFA38B4D9F6E55CE3F3DE92099F7A4
# Update packages list
sudo apt update
# TODO remove virtualbox version-number and automatically install latest version; dkms needed when upgrading kernel
# Install packages
sudo apt -y --force-yes install virtualbox-5.1 git vagrant # virtualbox-ext-pack dkms
# Download (clone) lab environment from GitHub
cd ~
git clone https://github.com/AnwarYagoub/RHCSA-RHCE-Lab-Environment.git
cd ~/RHCSA-RHCE-Lab-Environment
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. more comment is (almost) always better. Please push to the branch
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok I will pull the latest changes and add comments. |
||
| # Generate SSH key to use when accessing machines | ||
| ssh-keygen -t rsa -b 4096 -N "" -C "root@example.com" -f ~/.ssh/rhce # empty password | ||
|
|
||
| # Make loading SSH key to ssh agent automatic | ||
| eval $(ssh-agent); echo $'eval $(ssh-agent)' >> ~/.profile | ||
| ssh-add ~/.ssh/rhce; echo $'ssh-add ~/.ssh/rhce' >> ~/.profile | ||
|
|
||
| # Add Virtualbox GPG Key & repository | ||
| wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add - | ||
| sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian `lsb_release -sc` non-free contrib" > /etc/apt/sources.list.d/virtualbox.org.list' | ||
| export ubuntu_codename=`lsb_release -sc` | ||
| # which of the following 2 is easiest to maintain, has most chance to fail gracefully when yum implementation changes or Vbox gets new numbering scheme | ||
| export virtualbox_version=`wget --quiet -O - http://download.virtualbox.org/virtualbox/debian/dists/$ubuntu_codename/contrib/binary-amd64/Packages | awk 'match($0, /(virtualbox-[0-9]\.[0-9])/, a) {b=a[1]} END {print b}'` # depends on sorting in Packages file | ||
| export virtualbox_version=`wget --quiet -O - http://download.virtualbox.org/virtualbox/debian/dists/$ubuntu_codename/contrib/binary-amd64/Packages | awk 'match($0, /(virtualbox-[0-9]\.[0-9])/, a) {if (RSTART) { ++i; v[i]=a[1]}} END {n = asort (v); print v[n]}'` | ||
|
|
||
| # Get latest vagrant version | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | sed -nr '/.*href="\/vagrant\/([^/]*).*/{s//\1/p;q}' ` # from top of page | ||
| export vagrant_version=`wget --quiet -O - https://releases.hashicorp.com/vagrant/ | awk 'match($0, /href="\/vagrant\/([^/]*)/, a) {if (RSTART) { ++i; v[i]=a[1]}} END {n = asort (v); print v[n]}'` | ||
| wget https://releases.hashicorp.com/vagrant/"$vagrant_version"/vagrant_"$vagrant_version"_x86_64.deb -O vagrant_"$vagrant_version"_x86_64.deb | ||
|
|
||
| # Update packages list | ||
| sudo apt update | ||
|
|
||
| # Install packages | ||
| sudo apt -y install $virtualbox_version git ./vagrant_"$vagrant_version"_x86_64.deb; rm ./vagrant_"$vagrant_version"_x86_64.deb | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
|
|
||
| Tested on Windows 8.1 & Windows 10 | ||
|
|
||
| # Prerequisites: | ||
| 1. [VirtualBox][virtualBox] Visualization Software. | ||
| 2. [Vagrant][vagrant] Software for building and maintaining portable virtual development environments. | ||
| 3. Optional [PuTTY][PuTTY] SSH client since Windows does't natively have one. | ||
|
|
||
|
|
||
| There are two Installation methods available for MS.Windows: | ||
|
|
||
| - [Regular "Download and Install".](#regular-download-and-install) | ||
| - [Using a package manager for Windows like Chocolatey.](#windows-package-manager) | ||
|
|
||
|
|
||
| ## Regular "download and install": | ||
| This method is well-known to Windows users, all you need to do is download | ||
| [VirtualBox][virtualBox-download], [Vagrant][vagrant-download] and optionally | ||
| [PuTTY][PuTTY-download]. | ||
|
|
||
| Next, Install in the same **order**, VirtualBox then Vagrant. | ||
| ***Note1: You need to have Visualization/Hyper-V Supported and Enabled*** | ||
|
|
||
|
|
||
| ***Note2: In Case you need to update both Vagrant and VirtualBox You need | ||
| to _REMOVE_ both then re-installing them in same order above to prevent | ||
| errors and failures my occur during update*** | ||
|
|
||
|
|
||
| ## Windows Package Manager: | ||
| This method may be new to some Windows users but its much more easier to install | ||
| and maintain since it blows away the D&I old method and make ease updating | ||
| packages for Windows. One good Windows package manager is [Chocolaty][Chocolaty]. | ||
|
|
||
| You can find installation Guide in [Chocolaty official website][Chocolaty-install]. | ||
| After Installing Chocolaty Install VirtualBox, Vagrant and optionally PuTTY | ||
| using the following commands with __administrator Privileges__: | ||
|
|
||
| ```powershell | ||
| choco install virtualbox | ||
|
|
||
| choco install vagrant | ||
|
|
||
| choco install putty | ||
| ``` | ||
|
|
||
|
|
||
| [virtualBox]: https://www.virtualbox.org/ | ||
| [virtualBox-download]: https://www.virtualbox.org/wiki/Downloads | ||
| [vagrant]: https://www.vagrantup.com/ | ||
| [vagrant-download]: https://www.vagrantup.com/downloads.html | ||
| [PuTTY]: http://www.chiark.greenend.org.uk/~sgtatham/putty/ | ||
| [PuTTY-download]: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html | ||
| [Chocolaty]: http://chocolatey.org/ | ||
| [Chocolaty-install]: https://chocolatey.org/install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is nice that you added a snapshot part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, in case of errors you can give it a clean start. Should also work on platforms other than Virtualbox.
Sander sometimes assumes changes made in previous chapters, sometimes he doesn't. IMHO a candidate RHCSA should be able to make a small script or flip back a few pages, to get on the same page were Sander assumes you are.