Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

Commit 992b25f

Browse files
committed
vagrant and linux server exercise file
1 parent 704a376 commit 992b25f

19 files changed

Lines changed: 927 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Vagrant.configure("2") do |config|
2+
config.vm.box = "jacobw/fedora35-arm64"
3+
config.vm.network "private_network", ip: "192.168.56.88"
4+
config.vm.provider "vmware_desktop" do |v|
5+
v.gui = true
6+
v.memory = "1024"
7+
end
8+
end
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
5+
# configures the configuration version (we support older styles for
6+
# backwards compatibility). Please don't change it unless you know what
7+
# you're doing.
8+
Vagrant.configure("2") do |config|
9+
# The most common configuration options are documented and commented below.
10+
# For a complete reference, please see the online documentation at
11+
# https://docs.vagrantup.com.
12+
13+
# Every Vagrant development environment requires a box. You can search for
14+
# boxes at https://vagrantcloud.com/search.
15+
config.vm.box = "jacobw/fedora35-arm64"
16+
17+
# Disable automatic box update checking. If you disable this, then
18+
# boxes will only be checked for updates when the user runs
19+
# `vagrant box outdated`. This is not recommended.
20+
# config.vm.box_check_update = false
21+
22+
# Create a forwarded port mapping which allows access to a specific port
23+
# within the machine from a port on the host machine. In the example below,
24+
# accessing "localhost:8080" will access port 80 on the guest machine.
25+
# NOTE: This will enable public access to the opened port
26+
# config.vm.network "forwarded_port", guest: 80, host: 8080
27+
28+
# Create a forwarded port mapping which allows access to a specific port
29+
# within the machine from a port on the host machine and only allow access
30+
# via 127.0.0.1 to disable public access
31+
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
32+
33+
# Create a private network, which allows host-only access to the machine
34+
# using a specific IP.
35+
config.vm.network "private_network", ip: "192.168.56.22"
36+
37+
# Create a public network, which generally matched to bridged network.
38+
# Bridged networks make the machine appear as another physical device on
39+
# your network.
40+
# config.vm.network "public_network"
41+
42+
# Share an additional folder to the guest VM. The first argument is
43+
# the path on the host to the actual folder. The second argument is
44+
# the path on the guest to mount the folder. And the optional third
45+
# argument is a set of non-required options.
46+
# config.vm.synced_folder "../data", "/vagrant_data"
47+
48+
# Provider-specific configuration so you can fine-tune various
49+
# backing providers for Vagrant. These expose provider-specific options.
50+
# Example for VirtualBox:
51+
#
52+
config.vm.provider "vmware_desktop" do |vb|
53+
vb.gui = true
54+
vb.memory = "1024"
55+
end
56+
57+
#
58+
# View the documentation for the provider you are using for more
59+
# information on available options.
60+
61+
# Enable provisioning with a shell script. Additional provisioners such as
62+
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
63+
# documentation for more information about their specific syntax and use.
64+
# config.vm.provision "shell", inline: <<-SHELL
65+
# apt-get update
66+
# apt-get install -y apache2
67+
# SHELL
68+
end
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
5+
# configures the configuration version (we support older styles for
6+
# backwards compatibility). Please don't change it unless you know what
7+
# you're doing.
8+
Vagrant.configure("2") do |config|
9+
# The most common configuration options are documented and commented below.
10+
# For a complete reference, please see the online documentation at
11+
# https://docs.vagrantup.com.
12+
13+
# Every Vagrant development environment requires a box. You can search for
14+
# boxes at https://vagrantcloud.com/search.
15+
config.vm.box = "jacobw/fedora35-arm64"
16+
17+
# Disable automatic box update checking. If you disable this, then
18+
# boxes will only be checked for updates when the user runs
19+
# `vagrant box outdated`. This is not recommended.
20+
# config.vm.box_check_update = false
21+
22+
# Create a forwarded port mapping which allows access to a specific port
23+
# within the machine from a port on the host machine. In the example below,
24+
# accessing "localhost:8080" will access port 80 on the guest machine.
25+
# NOTE: This will enable public access to the opened port
26+
# config.vm.network "forwarded_port", guest: 80, host: 8080
27+
28+
# Create a forwarded port mapping which allows access to a specific port
29+
# within the machine from a port on the host machine and only allow access
30+
# via 127.0.0.1 to disable public access
31+
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
32+
33+
# Create a private network, which allows host-only access to the machine
34+
# using a specific IP.
35+
config.vm.network "private_network", ip: "192.168.56.28"
36+
37+
# Create a public network, which generally matched to bridged network.
38+
# Bridged networks make the machine appear as another physical device on
39+
# your network.
40+
# config.vm.network "public_network"
41+
42+
# Share an additional folder to the guest VM. The first argument is
43+
# the path on the host to the actual folder. The second argument is
44+
# the path on the guest to mount the folder. And the optional third
45+
# argument is a set of non-required options.
46+
# config.vm.synced_folder "../data", "/vagrant_data"
47+
48+
# Provider-specific configuration so you can fine-tune various
49+
# backing providers for Vagrant. These expose provider-specific options.
50+
# Example for VirtualBox:
51+
#
52+
config.vm.provider "vmware_desktop" do |vb|
53+
# # Display the VirtualBox GUI when booting the machine
54+
vb.gui = true
55+
#
56+
# # Customize the amount of memory on the VM:
57+
vb.memory = "1024"
58+
end
59+
#
60+
# View the documentation for the provider you are using for more
61+
# information on available options.
62+
63+
# Enable provisioning with a shell script. Additional provisioners such as
64+
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
65+
# documentation for more information about their specific syntax and use.
66+
config.vm.provision "shell", inline: <<-SHELL
67+
yum install httpd wget unzip vim -y
68+
systemctl start httpd
69+
systemctl enabled httpd
70+
mkdir -p /tmp/finance
71+
cd /tmp/finance
72+
wget https://www.tooplate.com/zip-templates/2135_mini_finance.zip
73+
unzip -o 2135_mini_finance.zip
74+
cp -r 2135_mini_finance/* /var/www/html/
75+
systemctl restart httpd
76+
cd /tmp/
77+
rm -rf /tmp/finance
78+
SHELL
79+
end
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Vagrant.configure("2") do |config|
2+
config.vm.define "web01" do |web01|
3+
web01.vm.box = "spox/ubuntu-arm"
4+
web01.vm.box_version = "1.0.0"
5+
web01.vm.hostname = "web01"
6+
web01.vm.network "private_network", ip: "192.168.56.41"
7+
web01.vm.provider "vmware_desktop" do |vmware|
8+
vmware.ssh_info_public = true
9+
vmware.gui = true
10+
end
11+
end
12+
13+
config.vm.define "web02" do |web02|
14+
web02.vm.box = "spox/ubuntu-arm"
15+
web02.vm.box_version = "1.0.0"
16+
web02.vm.hostname = "web02"
17+
web02.vm.network "private_network", ip: "192.168.56.41"
18+
web02.vm.provider "vmware_desktop" do |vmware|
19+
vmware.ssh_info_public = true
20+
vmware.gui = true
21+
end
22+
end
23+
24+
25+
config.vm.define "db01" do |db01|
26+
db01.vm.box = "jacobw/fedora35-arm64"
27+
db01.vm.hostname = "db01"
28+
db01.vm.network "private_network", ip: "192.168.56.42"
29+
db01.vm.provider "vmware_desktop" do |vmware|
30+
vmware.ssh_info_public = true
31+
vmware.gui = true
32+
end
33+
db01.vm.provision "shell", inline: <<-SHELL
34+
yum install -y wget unzip mariadb-server -y
35+
systemctl start mariadb
36+
systemctl enable mariadb
37+
# Additional provisioning steps for db01
38+
SHELL
39+
end
40+
end
41+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Vagrant.configure("2") do |config|
2+
config.vm.box = "spox/ubuntu-arm"
3+
config.vm.box_version = "1.0.0"
4+
config.vm.network "private_network", ip: "192.168.56.19"
5+
config.vm.provider "vmware_desktop" do |vmware|
6+
vmware.ssh_info_public = true
7+
vmware.gui = true
8+
end
9+
end

‎05.VagrantAndLinuxServers/vagrant-vms/MacM1M2/ubuntu/test1.txt‎

Whitespace-only changes.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
5+
# configures the configuration version (we support older styles for
6+
# backwards compatibility). Please don't change it unless you know what
7+
# you're doing.
8+
Vagrant.configure("2") do |config|
9+
# The most common configuration options are documented and commented below.
10+
# For a complete reference, please see the online documentation at
11+
# https://docs.vagrantup.com.
12+
13+
# Every Vagrant development environment requires a box. You can search for
14+
# boxes at https://vagrantcloud.com/search.
15+
config.vm.box = "spox/ubuntu-arm"
16+
config.vm.box_version = "1.0.0"
17+
18+
# Disable automatic box update checking. If you disable this, then
19+
# boxes will only be checked for updates when the user runs
20+
# `vagrant box outdated`. This is not recommended.
21+
# config.vm.box_check_update = false
22+
23+
# Create a forwarded port mapping which allows access to a specific port
24+
# within the machine from a port on the host machine. In the example below,
25+
# accessing "localhost:8080" will access port 80 on the guest machine.
26+
# NOTE: This will enable public access to the opened port
27+
# config.vm.network "forwarded_port", guest: 80, host: 8080
28+
29+
# Create a forwarded port mapping which allows access to a specific port
30+
# within the machine from a port on the host machine and only allow access
31+
# via 127.0.0.1 to disable public access
32+
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
33+
34+
# Create a private network, which allows host-only access to the machine
35+
# using a specific IP.
36+
config.vm.network "private_network", ip: "192.168.56.26"
37+
38+
# Create a public network, which generally matched to bridged network.
39+
# Bridged networks make the machine appear as another physical device on
40+
# your network.
41+
# config.vm.network "public_network"
42+
43+
# Share an additional folder to the guest VM. The first argument is
44+
# the path on the host to the actual folder. The second argument is
45+
# the path on the guest to mount the folder. And the optional third
46+
# argument is a set of non-required options.
47+
# config.vm.synced_folder "../data", "/vagrant_data"
48+
49+
# Provider-specific configuration so you can fine-tune various
50+
# backing providers for Vagrant. These expose provider-specific options.
51+
# Example for VirtualBox:
52+
#
53+
config.vm.provider "vmware_desktop" do |vmware|
54+
vmware.ssh_info_public = true
55+
vmware.gui = true
56+
end
57+
#
58+
# View the documentation for the provider you are using for more
59+
# information on available options.
60+
61+
# Enable provisioning with a shell script. Additional provisioners such as
62+
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
63+
# documentation for more information about their specific syntax and use.
64+
# config.vm.provision "shell", inline: <<-SHELL
65+
# apt-get update
66+
# apt-get install -y apache2
67+
# SHELL
68+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"dependencies":[["vagrant-auto_network",["= 1.0.3"]],["vagrant-hostmanager",["= 1.8.9"]],["vagrant-qemu",["= 0.3.4"]],["log4r",[">= 0"]],["concurrent-ruby",["~> 1.0"]],["i18n",[">= 0"]],["micromachine",[">= 2","< 4"]],["vagrant-vbguest",["= 0.31.0"]],["vagrant-vmware-desktop",["= 3.0.3"]]],"checksum":"466e94ca839e089d1dce1bab3548d3e3acf51767e11790fb014624884c9c8ee8","vagrant_version":"2.3.6"}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file loads the proper rgloader/loader.rb file that comes packaged
2+
# with Vagrant so that encoded files can properly run with Vagrant.
3+
4+
if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]
5+
require File.expand_path(
6+
"rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"])
7+
else
8+
raise "Encoded files can't be read outside of the Vagrant installer."
9+
end

0 commit comments

Comments
 (0)