๐Ÿ› ๏ธ Devops

1) ๋ฌธ์ œ ์ƒํ™ฉOracle Linux 8 ์„ค์น˜ ํ›„, dnf install ๋ช…๋ น์–ด๋กœ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•˜๋ ค ํ–ˆ์œผ๋‚˜ ์•„๋ž˜์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋„ค์š”.์•„๋ฌด๋ž˜๋„ Locale ์„ค์ •์ด ์ž˜๋ชป๋˜์–ด ์žˆ๋Š” ๊ฒƒ ๊ฐ™์œผ๋‹ˆ ํ™•์ธํ•ด๋ด…์‹œ๋‹ค![root@SRV2 ~]# dnf install -y mongodbFailed to set locale, defaulting to C.UTF-8 2) ์›์ธ[root@SRV2 ~]# localectl status System Locale: LANG=en_US.UTF-8 VC Keymap: us X11 Layout: us [root@SRV2 ~]# localectl list-locales | grep -i utfC.utf8 ...en_US.utf8en_US.utf8@ampm ..
1) ๊ฐœ์š” CentOS 6 ์ดํ•˜ ๋ฒ„์ „์—์„œ๋Š” ๋„คํŠธ์›Œํฌ ๋””๋ฐ”์ด์Šค๋ช…์ด "eth0"์ฒ˜๋Ÿผ ํ‘œ๊ธฐ๋˜์—ˆ์œผ๋‚˜, CentOS 7 ๋ถ€ํ„ฐ๋Š” ๋ณด์•ˆ์ƒ์˜ ์ด์œ ๋กœ ens32, enp12 ๋“ฑ ๋””๋ฐ”์ด์Šค๋ช…์ด ์ผ๊ด„์ ์ด์ง€ ์•Š๋‹ค. ๋”ฐ๋ผ์„œ, ๊ธฐ์กด์˜ ๋””๋ฐ”์ด์Šค๋ช…์ธ eth0์ฒ˜๋Ÿผ ํ‘œ๊ธฐํ•˜๋ ค๋ฉด grub ํŒŒ์ผ์„ ์ˆ˜์ •ํ•ด์ฃผ์–ด์•ผ ํ•˜๋Š”๋ฐ ์•„๋ž˜์˜ ์ ˆ์ฐจ๋Œ€๋กœ ์ง„ํ–‰ํ•ด๋ณด์ž! ์ฐธ๊ณ ๋กœ, Redhat ๊ณ„์—ด๊ณผ Debian ๊ณ„์—ด์— ๋Œ€ํ•ด์„œ ๋‹ค๋ฃฌ๋‹ค! (1) ๊ธฐ์กด ๋„คํŠธ์›Œํฌ ๋””๋ฐ”์ด์Šค๋ช… ํ™•์ธ [root@localhost ~]# ifconfig ens32: flags=4163 mtu 1500 inet 172.20.0.101 netmask 255.255.255.0 broadcast 0.0.0.0 ether 00:0c:29:04:b5:1e txqueuelen 1000 (Ethernet) RX p..
1) ๊ฐœ์š” HTML5, CSS3 ์—ฐ์Šต์œผ๋กœ ์—ฌ๋Ÿฌ ์‚ฌ์ดํŠธ๋ฅผ ํด๋ก  ์ฝ”๋”ฉํ•˜์˜€๋Š”๋ฐ.... ์•„๋ฌด๋ž˜๋„ ํฌํŠธํด๋ฆฌ์˜ค์— ๊ทธ๋ฆผ๋งŒ ๋ณด์—ฌ์ฃผ๊ธฐ๋ณด๋‹ค๋Š” ์„œ๋ฒ„์— ์ง์ ‘ ๋ฐฐํฌํ•ด์ฃผ๋Š” ๊ฒŒ ๋” ์ข‹๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ๊ธฐ์— ์ด ๊ธ€์„ ์ ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค -ใ……-.. ์ผ๋‹จ ์˜ค๋ผํด ํด๋ผ์šฐ๋“œ์— ๋†€๊ณ  ์žˆ๋Š” VM์— Apache ์„œ๋ฒ„๋ฅผ ์„ค์น˜ํ•ด์ฃผ๊ณ  vHost ๊ธฐ๋Šฅ์œผ๋กœ ๋„๋ฉ”์ธ ๋ณ„๋กœ ๋‚˜๋ˆ  ๋†“๊ณ  ์™€์ผ๋“œ ์นด๋“œ ์ธ์ฆ์„œ๋ฅผ ๋ฐœ๊ธ‰ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค. DNS ์„œ๋ฒ„์— ๋„๋ฉ”์ธ์€ ์™€์ผ๋“œ์นด๋“œ๋กœ ์„ค์ •ํ•ด๋†“๊ณ  ์ ‘์† ํ•˜์˜€์œผ๋‚˜ vHost๋กœ ์„ค์ •ํ•œ ๋„๋ฉ”์ธ์€ ์ž˜ ๋™์ž‘ํ•˜์ง€๋งŒ vHost์— ๋“ฑ๋กํ•˜์ง€ ์•Š์€ ๋„๋ฉ”์ธ์œผ๋กœ ์ ‘์† ์‹œ, vHost๋กœ ๋“ฑ๋กํ•œ ์ฒซ ๋ฒˆ์งธ ์„œ๋ฒ„๋กœ ์—ฐ๊ฒฐ๋˜๋Š” ์ด์ƒํ•œ (?) ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค ใ…กใ……ใ…ก... ๊ทธ๋Ÿฌ๋‹ค HAProxy์˜ URL ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ ๊ธฐ๋Šฅ์ด ์ƒ๊ฐ๋‚˜์„œ ์ด ๊ธ€์„ ์ ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค (๊พธ๋ฒ…) (2) HAProx..
1) Ansible ๊ฐœ์š” (1) IaC (InfraStructure as a Code) “ํ”„๋กœ๊ทธ๋ž˜๋ฐํ˜• ์ธํ”„๋ผ”๋ผ๊ณ ๋„ ํ•˜๋Š” IaC๋Š” ์ธํ”„๋ผ ๊ตฌ์„ฑ์„ ๋งˆ์น˜ ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์ฒ˜๋Ÿผ ํ•˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ์‹์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค. IT ์ธํ”„๋ผ(์„œ๋ฒ„์™€ ๋„คํŠธ์›Œํฌ)๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๋ฏธ๋“ค์›จ์–ด๋ถ€ํ„ฐ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜, ์ถ”๊ฐ€์ ์œผ๋กœ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ž์ฒด์˜ ๋ฐฐํฌ ๋ฐ ์™ธ๋ถ€ ์„œ๋น„์Šค์™€ ๋ชจ๋‹ˆํ„ฐ๋ง๋“ฑ์˜ ์—ฐ๊ฒฐ๊นŒ์ง€๋ฅผ ํฌํ•จํ•˜์—ฌ ์‹œ์Šคํ…œ๊ณผ ์„œ๋น„์Šค๋ฅผ ์šด์˜ํ•˜๊ธฐ ์œ„ํ•œ ๋ชจ๋“  ํ™˜๊ฒฝ ์š”์†Œ๋“ฑ์„ “์ž๋™์œผ๋กœ” ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ฝ”๋“œ๋กœ ๊ธฐ์ˆ ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. (1-1) IaC์˜ ์žฅ์  ๊ฐ€์ƒ ์‹œ์Šคํ…œ์— ๋Œ€ํ•œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋ฐฉ์‹์˜ ๊ด€๋ฆฌ๋ฅผ ์ง€์›ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฐœ๋ณ„ ํ•˜๋“œ์›จ์–ด๋ฅผ ์ˆ˜๋™์œผ๋กœ ๊ตฌ์„ฑํ•˜๊ณ  ์—…๋ฐ์ดํŠธ ํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค. ์ด๋Š” ์ธํ”„๋ผ์— “์œ ์—ฐ์„ฑ”์œผ๋กœ ์ฆ‰, ๋ฐ˜๋ณต์„ฑ๊ณผ ํ™•์žฅ์„ฑ์„ ๋ถ€์—ฌํ•˜๊ฒŒ ๋œ๋‹ค → ex. ์šด์˜์ž 1๋ช…..
ํŒŒ์ผ์˜ ์‹คํ–‰๊ถŒํ•œ ๋ถ€์—ฌํ•˜๊ธฐchmod +x /etc/rc.d/rc.local ๋ฐ๋ชฌ ์ž๋™์‹œ์ž‘ ๋“ฑ๋กํ•˜๊ธฐcat > /usr/lib/systemd/system/rc-local.service[Install]WantedBy=multi-user.targetEOFsystemctl enable rc-local.servicesystemctl start rc-local.service rc.local ์„œ๋น„์Šค ์ƒํƒœ ํ™•์ธsystemctl status rc-local.service // ์ œ๋Œ€๋กœ Activated ๋˜๋Š”์ง€ ํ™•์ธsystemctl list-unit-files | grep rc.local // enabled ๋˜์—ˆ๋Š” ์ง€ ํ™•์ธ ํ…Œ์ŠคํŠธcat > /etc/rc.d/rc.localtou..
KVM/Qemu ํ™˜๊ฒฝ์—์„œ VM ์ด๋ฏธ์ง€๋ฅผ ๋ณดํ†ต virt-builder๋กœ ๋งŒ๋“ค๋‹ค๊ฐ€ Rocky OS์™€ ๊ฐ™์ด ์ง€์›์„ ํ•˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ, qemu-img ์ปค๋งจ๋“œ๋กœ qcow2 ์ด๋ฏธ์ง€ ์ƒ์„ฑ ํ›„ ์ง์ ‘ iso ํŒŒ์ผ๋กœ step by step์œผ๋กœ ์„ค์น˜ํ•˜๋Š” ์ผ์ด ์ข…์ข… ์žˆ์Šต๋‹ˆ๋‹ค. ํ‰์†Œ์—๋Š” ํ•ญ์‹œ CentOS 7, Ubuntu 20.04๋ฅผ ์‚ฌ์šฉํ•ด์„œ virt-builder์—์„œ๋„ ์ง€์›์„ ํ•ด์คฌ๋˜ ๋ถ€๋ถ„์ด๊ธฐ์— qemu-img + iso ํŒŒ์ผ๋กœ ์ง์ ‘ ์ด๋ฏธ์ง€๋ฅผ ๋งŒ๋“ค์ง€ ์•Š์•˜๋Š”๋ฐ Rocky 8์„ ์“ธ ์ผ์ด ์ƒ๊ฒจ ์–ด์ฉ” ์ˆ˜ ์—†์ด step by step์œผ๋กœ ์„ค์น˜ํ•˜๊ฒŒ ๋˜์—ˆ๋„ค์š”... ๊ทธ๋ฆฌ๊ณ  ๋งŒ๋“  ์ด๋ฏธ์ง€๋กœ virsh console์„ ์ด์šฉํ•˜์—ฌ ์ ‘์†ํ•˜์˜€์œผ๋‚˜ ์•„๋ฌด๋Ÿฐ ๋ฐ˜์‘์ด ์—†์–ด ๊ต‰์žฅํžˆ ๋งŽ์ด ํ—ค๋งธ๋„ค์š” ใ… ใ…  virt-builder๋กœ ๋งŒ๋“  ์ด๋ฏธ์ง€์™€ qemu-img + i..
1) Virtual Box ๊ฒฝ๋กœ ํ™•์ธC:\Program Files\Oracle\VirtualBox 2) Win + R ํ‚คcmd ์ž…๋ ฅ ํ›„ ์—”ํ„ฐ 3) Virtual Box ๊ฒฝ๋กœ ์ด๋™ ๋ฐ ์ปค๋งจ๋“œ ์‹คํ–‰cd C:\\Program Files\\Oracle\\VirtualBoxVBoxManage modifyvm "VM_Name" --nested-hw-virt on
1) ๊ธฐ๋ณธ ์„ค์ •systemctl stop firewalldsystemctl disable firewalldsystemctl stop NetworkManagersystemctl disable NetworkManagersetenforce 0sed -i ‘s/SELINUX=enforcing/ SELINUX=disabled/g’ /etc/selinux/configyum install -y epel-release && yum update -y 2) PXE ๊ด€๋ จ Package ์„ค์น˜ ๋ฐ ์„ค์ •yum install -y dhcp tftp tftp-server syslinux vsftpd xinetdcat > /etc/dhcp/dhcpd.conf  3) Rocky 8.6, RHEL 8.6 Mount ๋ฐ ํŒŒ์ผ ๋ณต์‚ฌmkdir..
Dev_sHu
'๐Ÿ› ๏ธ Devops' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก