Centos7 Bridge Open
๋คํธ์ํฌ ์ด๋ํฐ > ๋ธ๋ฆฟ์ง๋ก ๋ณ๊ฒฝ # ๊ธฐ์กด์ ์๋ ๋คํธ์ํฌ ์ด๋ํฐ ์ญ์
# ๋คํธ์ํฌ ํ์ธ
vim /etc/sysconfig/network-scripts/ifcfg-ens33
IPADDR=192.168.0.41
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS1=8.8.8.8
yum -y install httpd
systemctl restart httpd
systemctl enable httpd
cd /var/www/html/
vim index.html
> <h1>chaen Third </h1>
systemctl stop firewalld
setenforce 0
systemctl restart network
Ubuntu Bridge Open
๋คํธ์ํฌ ์ด๋ํฐ > ๋ธ๋ฆฟ์ง ์์ฑ
apt-get update
apt-get install apache2 # apache2 ์ค์น
# apache2 ์ค์น ๊ณผ์ ์ค ๊ณ์ ์ค์นํ๊ฒ ๋๊ณ ๋ฉ์์ง๊ฐ ๋จ๋ฉด Y๋ฅผ ๋๋ฅด๊ณ ๊ณ์ ์งํ
servicce apache2 start # apache2 ์๋ฒ ์์
vim /etc/netplan/01-network-manager-all.yaml # ๋คํธ์ํฌ ํ์ผ ์์
> #Let NetworkManager manage all devices on this system
network:
version: 2
# renderer: NetworkManager
renderer: networkd
ethernets:
ens33:
dhcp4: false
bridges:
br0:
addresses: [192.168.0.41/24]
gateway4: 192.168.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
dhcp4: true
interfaces: [ens33]
netplan apply # ๋คํธ์ํฌ ์ค์ ์ ์ฉ
ifconfig # ๋ธ๋ฆฟ์ง ipํ์ธ, ip๊ฐ 192.168.0.41๋ก ๋ณ๊ฒฝ๋๊ฒ ํ์ธํ๊ธฐ
cd /var/www/html
ls # htmlํ์ผ ์์ index.htmlํ์ผ ์๋ ํ์ธ
rm index.html # ๊ธฐ์กด index.html ํ์ผ ์ญ์
vim index.html # ์๋ก์ด index.html ํ์ผ ์์ฑ
> <h1> Chaen Ubuntu </h1>
netplan apply
<http://192.168.0.41/>