SlideShare a Scribd company logo
CentOS 7 ධ㛛 
᪂䛧䛟⏕䜎䜜ኚ䜟䛳䛯CentOS
⮬ᕫ⤂௓ 
኱ཎ ៅ୍㑻䚷https://twitter.com/ohhara_shiojiri 
䠄᭷䠅䝖䝷䝇䝖䝛䝑䝖䝽䞊䜽䝇䚷ሷᑼ䜲䞁䜻䝳䝧䞊䝅䝵䞁䝥䝷䝄䠍䠌䠔ྕᐊ 
http://shiojiri-osslabo.com/ 
䞉㛗㔝┴ሷᑼᕷ䛻άືᣐⅬ䜢⨨䛟䚸ᕷෆ䝥䝻䜾䝷䝬䞊᭷ᚿ䛻䜘䜛ᅋయ 
䞉䛂䜸䞊䝥䞁䛺⎔ቃ䛷䜸䞊䝥䞁䛺άື䜢┠ᣦ䛩䛃䜢ྜゝⴥ䛻㞟䛖 
䞉CoderDojo Shiojiri 㛤ദ䚷䞉ᑠᏛ⏕㧗Ꮫᖺྥ䛡Rubyᩍᐊ㛤ദ 
䞉ITᢏ⾡᭩䜢䝸䝤䝷䜲䝈䛷㈚䛧ฟ䛧䚸䜎䛯ᕷ❧ᅗ᭩㤋䛸༠ຊ
䜰䝆䜵䞁䝎 
● CentOS䛻䛴䛔䛶 
● RHEL 7 䛻䛴䛔䛶 
● LAMP⎔ቃ䛻䛴䛔䛶 
● 䜲䞁䝇䝖䞊䝹䛻䛴䛔䛶 
● ᳨ド⎔ቃ 
● systemd 
● NetworkManager 
● iproute2
CentOS䛻䛴䛔䛶 
● Red Hat Enterprise Linux(RHEL)䜽䝻䞊䞁 
௚䛻Ꮫ⾡ྥ䛡䛻Scientific Linux 
● RHEL䛛䜙ၟᶆ䜔ၟ⏝䛾䝟䝑䜿䞊䝆䜢㝖እ 
● Community ENTerprise Operating System 
● Red Hat♫䛾᭷ൾ䝃䝫䞊䝖䜢ᚲせ䛸䛧䛺䛔⏝㏵ 
● 2014ᖺ1᭶Red Hat♫䛜ᨭ᥼⾲᫂ 
● RHEL䛸㧗䛔஫᥮ᛶ
RHEL 7 䛻䛴䛔䛶 
● 2014ᖺ6᭶10᪥䝸䝸䞊䝇 
● 10ᖺ㛫䝃䝫䞊䝖䚷2024ᖺ6᭶30᪥䜎䛷 
● Fedora19䜢䝧䞊䝇 
● 䜹䞊䝛䝹䝞䞊䝆䝵䞁 3.10 
● 64bit䛾䜏 x86_64/ppc64/s390s䝃䝫䞊䝖 
● ext4 → xfs䚷᭱኱500TB䝃䝫䞊䝖 
● GRUB Legacy → GRUB2䚷UEFI䝃䝫䞊䝖
LAMP⎔ቃ䛻䛴䛔䛶 
● LAMP⎔ቃ䛸䛧䛶䛾CentOS 
○ ᚑ᮶䝅䝇䝔䝮䛸䛾஫᥮ᛶ䛸Ᏻᐃᛶ䜢㔜ど䛧䛶䚸ᶆ‽䝟䝑 
䜿䞊䝆䛾䝞䞊䝆䝵䞁䛿ྂ䛔䜎䜎䛷䛧䛯䚹 
○ ྂ䛔䝞䞊䝆䝵䞁䛾䝃䝫䞊䝖䛜⥆䚻䛸⤊஢䛧䛶䛔䜛䚹 
○ ᛶ⬟ྥୖ䚸ᶵ⬟ྥୖ䚸䝉䜻䝳䝸䝔䜱ྥୖ䛜ồ䜑䜙䜜䜛䚹 
○ RHEL7(CentOS7)䛛䜙᪂䛧䛔䝞䞊䝆䝵䞁䜢᥇⏝䟿 
● CentOS6.5䛾LAMP⎔ቃ 
○ Apache䚷→䚷2.2.15䚷㛤Ⓨ⤊஢䚷᪂∧⛣⾜䜢᥎ዡ 
○ MySQL䚷→䚷5.1.73䚷㛤Ⓨ⤊஢䚷᪂∧⛣⾜䜢᥎ዡ 
○ PHP䚷→䚷5.3.3䚷㛤Ⓨ⤊஢䚷᪂∧⛣⾜䜢᥎ዡ 
○ Perl䚷→䚷5.10.1 
○ Python䚷→䚷2.6.6
LAMP⎔ቃ䛻䛴䛔䛶 
● CentOS7䛾LAMP⎔ቃ 
○ Apache䚷→䚷2.4.6䚷᭱᪂ᶵ⬟䛾Ᏻᐃ∧ 
○ MySQL䚷→䚷MySQL5.5஫᥮䛾MariaDB 5.5.37 
○ PHP䚷→䚷5.4.16䚷᭱᪂䛾PHP䛿5.6.0 
○ Perl䚷→䚷5.16.3䚷᭱᪂䛾Perl䛿5.20.0 
○ Python䚷→䚷2.7.5䚷᭱᪂䛾Python䛿3.4.1 
○ ྛ䝞䞊䝆䝵䞁䛿2014ᖺ9᭶10᪥᫬Ⅼ䛷䛩䚹 
● CentOS6.5䛷LAMP⎔ቃ䛾᪂䝞䞊䝆䝵䞁ᵓ⠏ 
䛿኱ኚ㠃ಽ䛺䛾䛷䚸CentOS7䜢฼⏝䛧䜎䛧䜗 
䛖䚹 
● CentOS6.5䛛䜙CentOS7䜈䛾⛣⾜䛜බᘧ䝃 
䝫䞊䝖䛥䜜䛶䛔䜎䛩䚹
䜲䞁䝇䝖䞊䝹䛻䛴䛔䛶 
● ᚑ᮶㏻䜚ISO䝣䜯䜲䝹䛜⏝ព䛥䜜䛶䛔䜎䛩䚹 
○ http://www.centos.org/download/ 
○ ᶆ‽䛷3.9GB䚷᭱኱䛾Everything䛷6.6GB䟿 
○ ᭱ᑠ䛾minimal䛷566MB 
○ 㧗㏿䝛䝑䝖⎔ቃ䛜䛒䜜䜀䚸Netinstall䛷362MB 
● 䜲䞁䝇䝖䞊䝷䞊䛾anaconda 
○ ᚑ᮶䛿䜲䞁䝇䝖䞊䝹䛾㡰䜢㏣䛳䛶䜸䝥䝅䝵䞁䜢タᐃ䛧䛶䛔 
䛯䛜䚸ண䜑䜸䝥䝅䝵䞁䜢㑅ᢥ䛧䛶䛛䜙䜲䞁䝇䝖䞊䝹ᐇ⾜䛜 
ฟ᮶䜛䜘䛖䛻䛺䛳䛯䚹
䜲䞁䝇䝖䞊䝹䛻䛴䛔䛶 
● 䜽䝷䜴䝗⎔ቃ⏝䛾䜲䝯䞊䝆䜢ணᐃ䛧䛶䛔䜎䛩䚹 
○ AWS➼䛾䝟䝤䝸䝑䜽䜽䝷䜴䝗 
○ OpenStack➼䛾䝥䝷䜲䝧䞊䝖䜽䝷䜴䝗 
○ Docker 
● 䜽䝷䜴䝗฼⏝⪅䜢᝿ᐃ䛧䛶䚸Vagrant䛾BOX䝣䜯 
䜲䝹䛻䛶௒ᅇ䛿Ꮫ⩦䛧䛶⾜䛝䜎䛩䚹
᳨ド⎔ቃ 
● VirtualBox 4.3.16(2014/09/11᫬Ⅼ) 
○ https://www.virtualbox.org/wiki/Downloads 
○ CPU䛾௬᝿䝬䝅䞁ᨭ᥼ᶵ⬟䛜ᚲせ(BIOSタᐃ) 
○ Windows䛾ሙྜ䚸䝅䝇䝔䝮䛾PATHタᐃ䛜ᚲせ 
■ 4.2⣔䚷C:Program FilesOracle VM VirtualBox 
■ 4.3⣔䚷C:Program FilesOracleVirtualBox
᳨ド⎔ቃ 
● Vagrant 1.6.5(2014/09/05᫬Ⅼ) 
○ http://www.vagrantup.com/downloads.html 
○ Windows䛾ሙྜ䚸䝅䝇䝔䝮䛾PATHタᐃ䛜ᚲせ 
■ C:HashiCorpVagrantbin 
■ C:HashiCorpVagrantembeddedmingwbin 
○ 䝁䝬䞁䝗䝥䝻䞁䝥䝖䛾௦䜟䜚䛻mingw32䛜౑⏝䛷䛝䜛䚹 
■ C:HashiCorpVagrantembeddedmingwmingw32env.cmd 
● BOX䝣䜯䜲䝹 CentOS 7 
○ https://dl.dropboxusercontent.com/s/w3lbekm7eunrskm/centos-7.0-x86_64.box 
○ CentOS7.0 x86_64 minimal + Puppet + VirtualBoxGuestAddtions 4.3.14
᳨ド⎔ቃ 
● Vagrantfile䜢⦅㞟䛧䛶IP䜰䝗䝺䝇䜢๭䜚ᙜ䛶䛯 
䝜䞊䝗䛷㉳ື䛥䛫䜎䛩䚹 
● Vagrantධ㛛䛾㈨ᩱ䜢ཧ↷䛧䛶ୗ䛥䛔䚹 
○ http://www.slideshare.net/ShinichiroOhhara/solavagrantver2
᳨ド⎔ቃ 
Virtual Box ⎔ቃ 
䜽䝷䜲䜰䞁䝖ഃ 
Ubuntu 14.04 
䝩䝇䝖PC 
䝹䞊䝍䞊 
192.168.33.1 
䝃䞊䝞䞊ഃ 
CentOS7 
192.168.33.70
systemd 
● 䝃䞊䝡䝇⟶⌮䛜systemd䜈ኚ᭦䛻䛺䜚䜎䛧䛯䚹 
○ 䝅䝇䝔䝮䛾㉳ື᫬䚸䝅䝱䝑䝖䝎䜴䞁᫬䛺䛹䚸䝃䞊䝡䝇䝥䝻 
䝉䝇䛾⟶⌮䝅䝇䝔䝮䛜᪂䛧䛟䛺䜚䜎䛧䛯䚹 
● ᚑ᮶䛿UNIX⏤᮶䛾init䛻䛶⟶⌮ 
○ UNIX䛾init䛻䛿䚸SystemV⣔䛸BSD⣔䛜䛒䜛 
○ RHEL5(CentOS5)䜎䛷䛿SysVinit 
○ /etc/inittab䛻タᐃ䛥䜜䛯䝷䞁䝺䝧䝹䛷⟶⌮ 
○ RHEL6(CentOS6)䛛䜙ubuntu䛸ྠ䛨Upstart 
○ /etc/init/௨ୗ䛾タᐃ䝣䜯䜲䝹䛷⟶⌮ 
○ Upstart䛿SysVinit஫᥮ 
○ ஫᥮ᛶ䛾䛒䜛䝅䜵䝹䝇䜽䝸䝥䝖䛷ືస䜢タᐃ
systemd 
● init䜘䜚ኚ䜟䛳䛯䛣䛸 
○ Upstart䜘䜚୪ิᗘ䛾㧗䛔㧗㏿䛺㉳ື䛸⤊஢ 
○ 䝅䜵䝹䝇䜽䝸䝥䝖䛷䛿䛺䛟タᐃ䝣䜯䜲䝹䛻䜘䜛⟶⌮ 
○ 䝃䞊䝡䝇䝥䝻䝉䝇㉳ື䛜ᵝ䚻䛺᪉ἲ䛷ᰂ㌾䛻ฟ᮶䜛 
○ cgroups䛻䜘䜛䝃䞊䝡䝇䝥䝻䝉䝇䛾䝸䝋䞊䝇⟶⌮ 
● Unit 
○ 䝃䞊䝡䝇䝥䝻䝉䝇䛾タᐃ䝣䜯䜲䝹 
○ systemd䛜Unit䛾タᐃ䛷ฎ⌮䛩䜛䚹 
○ ௚䛾Unit䛸㐃ᦠ䠄౫Ꮡ䛸㉳ື㡰䠅䛧䛶ฎ⌮䛜ฟ᮶䜛䚹 
○ ᣑᙇᏊ䛻䜘䛳䛶ᵝ䚻䛺Unit䛾✀㢮䛜䛒䜛䚹 
○ タ⨨ሙᡤ䛿䚸/etc/systemd/system 
○ 䜲䞁䝇䝖䞊䝹ึᮇタᐃ䛿䚸/usr/lib/systemd/system
systemd 
● 䝁䝬䞁䝗 
○ systemctl 䜸䝥䝅䝵䞁 Unitྡ 
○ ᚑ᮶䛸ྠ䛨service䜒౑⏝䛷䛝䜎䛩䚹 
● 䝃䞊䝡䝇䝥䝻䝉䝇䛾㉳ື䛸೵Ṇ 
○ Unit䛾ᣑᙇᏊ䛿䚸䛂.service䛃 
○ sytemctl [start/stop/restart] Unitྡ 
○ reload䜸䝥䝅䝵䞁䛿Unit䛻ᐃ⩏䛥䜜䛶䛔䜛ሙྜ䛾䜏 
● Unitタᐃ䛾ኚ᭦ 
○ Unitタᐃ䜢ኚ᭦䛧䛯᫬䛿䚸systemd䜈཯ᫎ䛥䛫䜎䛩䚹 
○ systemctl daemon-reload 
● 䝥䝻䝉䝇䛾≧ែ☜ㄆ 
○ systemctl status Unitྡ
systemd 
● ⮬ື㉳ື䛾タᐃ 
○ systemctl [enable/disable] Unitྡ 
○ Unit䛾㐃ᦠ䠄౫Ꮡ䠅タᐃ䛜ኚ᭦䛥䜜䜎䛩䚹 
○ Unitタᐃ䝣䜯䜲䝹䛷ᣦᐃ䛧䛯䛂WantedBy=䛃䝕䜱䝺䜽䝖䝸 
䜈䛾䝅䞁䝪䝸䝑䜽䝸䞁䜽 
● Wants 
○ 㐃ᦠ䠄౫Ꮡ䠅䛩䜛Unit䜢タᐃ䛧䜎䛩䚹 
○ Unitタᐃ䝣䜯䜲䝹䛾䛂Wants=䛃 
○ 䝕䜱䝺䜽䝖䝸䛂Unitྡ.wants䛃䜈䝅䞁䝪䝸䝑䜽䝸䞁䜽䜢సᡂ 
● Requires 
○ Wants䛿Unit㛫䛾ྠ᫬㉳ື䛜ኻᩋ䛧䛶䜒෌ᐇ⾜䛧䜎䛩䚹 
○ Requires䛿Unit㛫䛾ྠ᫬㉳ື䛜ኻᩋ䛧䛯䜙⤊஢䛧䜎 
䛩䚹
systemd 
● ⮬ື㉳ື䛾☜ㄆ 
○ systemctl list-unit-files --type=service 
○ enabled䚷→䚷䛂Wants=䛃グ㍕䛒䜚䚸᭷ຠ 
○ disabled䚷→䚷䛂Wants=䛃グ㍕䛒䜚䚸↓ຠ 
○ static䚷→䚷䛂Wants=䛃グ㍕↓䛧 
● ⌧ᅾ䛾Unit≧ែ䛾☜ㄆ 
○ systemctl list-units --type=service 
○ list-units䜸䝥䝅䝵䞁䜢┬␎ฟ᮶䜛䚹 
● Unit䛾㐃ᦠ㛵ಀ䛾☜ㄆ 
○ systemctl list-dependencies 
○ 䝒䝸䞊⾲♧䛷㐃ᦠ䠄౫Ꮡ䛸㉳ື㡰䠅㛵ಀ䜢⾲♧䛩䜛䚹
systemd 
● target 
○ 」ᩘ䛾Unit䜢䜎䛸䜑䛶䚸䜾䝹䞊䝥໬䛷䛝䜛䚹 
○ Unit䛾ᣑᙇᏊ䛿䚸䛂.target䛃 
○ 㛵ಀ䛩䜛」ᩘ䛾Unit䛾㐃ᦠ䠄౫Ꮡ䛸㉳ື㡰䠅䜢⟶⌮䚹 
○ target⮬య䛿ᐇ⾜䛧䛺䛔䚹 
○ ᚑ᮶䛾䝷䞁䝺䝧䝹䛜↓䛟䛺䜚䚸Unit䛾target䛻ኚ䜟䜚䜎䛧 
䛯䚹 
○ ᚑ᮶䛾䝷䞁䝺䝧䝹0䛛䜙6䛸㐪䛔䚸⮬⏤䛻タᐃฟ᮶䜛䚹 
● 䝅䝇䝔䝮䛾㉳ື≧ែ䛾ኚ᭦᪉ἲ 
○ /etc/systemd/system/default.target 
○ 䝅䞁䝪䝸䝑䜽䝸䞁䜽ඛ䜢ኚ᭦䛩䜛䛣䛸䛷䚸䝷䞁䝺䝧䝹┦ᙜ 
䜢ᐇ⌧䛧䛶䛔䜎䛩䚹
systemd 
● ᚑ᮶䛾䝷䞁䝺䝧䝹䛸䛾ᑐẚ 
○ runlevel0䛛䜙runlevel6䛾䝅䞁䝪䝸䝑䜽䝸䞁䜽䜒䛒䜛䚹 
ᚑ᮶䛾䝷䞁䝺䝧䝹 target䝣䜯䜲䝹ྡ ≧ែෆᐜ 
runlevel 䠌 poweroff.target ೵Ṇ 
runlevel 1 rescue.target 䝅䞁䜾䝹䝴䞊䝄䞊䝰䞊䝗 
runlevel 2 multi-user.target 䝬䝹䝏䝴䞊䝄䞊䝰䞊䝗 
runlevel 3 multi-user.target 䝬䝹䝏䝴䞊䝄䞊䝰䞊䝗 
runlevel 4 multi-user.target 䝬䝹䝏䝴䞊䝄䞊䝰䞊䝗 
runlevel 5 graphical.target GUI䝬䝹䝏䝴䞊䝄䞊䝰䞊䝗 
runlevel 6 reboot.target ෌㉳ື
systemd 
● 䛭䛾௚䛾Unit 
○ 䛂service䛃䛂target䛃䛾௚䛻䜒Unit䛾✀㢮䛜䛒䜚䜎䛩䚹 
● mount, swap 
○ /etc/fstab䛛䜙⮬ືసᡂ䛥䜜䜎䛩䚹 
● device 
○ 䝕䝞䜲䝇䛜ㄆ㆑䛩䜛䛸⮬ືసᡂ䛥䜜䜎䛩䚹 
● path 
○ 䝟䝇䜢┘ど䛧䛶䚸䝣䜯䜲䝹䛻ᛂ䛨䛶䝃䞊䝡䝇䜢㉳ື䚹 
● socket 
○ 䝋䜿䝑䝖䜢┘ど䛧䛶䚸᥋⥆䛻ᛂ䛨䛶䝃䞊䝡䝇䜢㉳ື䚹
NetworkManager 
● 䝛䝑䝖䝽䞊䜽䝕䝞䜲䝇タᐃ 
○ /etc/sysconfig/network-scipts/䛻䛒䜛タᐃ䝣䜯䜲䝹䜢┤ 
᥋⦅㞟䛩䜛䛾䛷䛿䛺䛟䚸NetworkManager䜢౑⏝䛩䜛䚹 
○ ᚑ᮶䛾タᐃ䝣䜯䜲䝹䜒฼⏝䛷䛝䜛䚹 
○ Ethernet䜲䞁䝍䞊䝣䜵䞊䝇䛿ᶆ‽䛷䛿↓ຠ䛻䛺䛳䛶䛔 
䜛䚹 
● NetworkManager䝣䝻䞁䝖䜶䞁䝗 
○ GUI䛾GNOME⎔ቃ䛷᧯స䛧䜎䛩䚹 
● nmtui 
○ 䝔䜻䝇䝖⏬㠃䛷ᑐヰⓗ䛻䝛䝑䝖䝽䞊䜽タᐃ䛧䜎䛩䚹
NetworkManager 
● nmcli 
○ 䝁䝬䞁䝗䝷䜲䞁䛷䝛䝑䝖䝽䞊䜽タᐃ䛧䜎䛩䚹 
○ 䝃䞊䝞䞊⟶⌮⪅ྥ䛡䛻䚸䛣䛣䛷䛿nmcli䜢Ꮫ⩦䛧䜎䛩䚹 
● 䝩䝇䝖ྡ䛾ኚ᭦ 
○ nmcli general hostname 䝩䝇䝖ྡ 
○ bmcli g ho 䝩䝇䝖ྡ 䛸┬␎䛷䛝䜛䚹 
○ /etc/hostname䝣䜯䜲䝹䛻タᐃ䛥䜜䜛䚹
NetworkManager 
● nmcli device 
○ ≀⌮䝕䝞䜲䝇䛾⟶⌮ 
● 䝕䝞䜲䝇䛾୍ぴ 
○ nmcli device 
○ nmcli d 䛸┬␎ฟ᮶䜛䚹 
● 䝕䝞䜲䝇䛾ヲ⣽ 
○ nmcli device show 䝕䝞䜲䝇ྡ 
○ nmcli d s 䛸┬␎ฟ᮶䜛䚹
NetworkManager 
● nmcli connection 
○ ᥋⥆タᐃ䛾⟶⌮ 
● ᥋⥆≧ἣ䛾୍ぴ 
○ nmcli connection 
○ nmcli c 䛸┬␎䛷䛝䜛䚹 
○ nmcli --fields 㡯┠ connection 䛷᳨⣴⾲♧䜒ฟ᮶䜛䚹 
● ᥋⥆䛾ヲ⣽ 
○ nmcli connection show ྡ๓䜒䛧䛟䛿UUID 
○ nmcli c s ྡ๓䜒䛧䛟䛿UUID䚷䛸┬␎䛷䛝䜛䚹 
○ ྡ๓䛻䝇䝨䞊䝇䛜䛒䜛䛸䛝䛿䚸䛂”䛃䝎䝤䝹䜽䜷䞊䝔䞊䝅䝵 
䞁䛷ᅖ䜣䛷ᣦᐃ䛩䜛䚹 
○ nmcli c s “Wired connection 1”
NetworkManager 
● ᥋⥆䛾᭷ຠ໬ 
○ nmcli connection up ྡ๓䜒䛧䛟䛿UUID 
● ᥋⥆䛾↓ຠ໬ 
○ nmcli connection down ྡ๓䜒䛧䛟䛿UUID 
● ᥋⥆䛾ືస☜ㄆ 
○ nmcli c s ྡ๓䜒䛧䛟䛿UUID 䛷IP䜰䝗䝺䝇䜢☜ㄆ 
○ ping 䛷␯㏻䜢☜ㄆ 
○ nmcli c d ྡ๓䜒䛧䛟䛿UUID 䛷↓ຠ໬ 
○ ping 䛷␯㏻ฟ᮶䛺䛔䛾䜢☜ㄆ 
○ nmcli c u ྡ๓䜒䛧䛟䛿UUID 䛷᭷ຠ໬ 
○ ping 䛷␯㏻䜢☜ㄆ
NetworkManager 
● タᐃ䛾ኚ᭦ 
○ nmcli connection modify ྡ๓ 㡯┠ タᐃ್ 
○ nmcli c m 䛸┬␎䛷䛝䜛䚹 
● IP䜰䝗䝺䝇䛸䝀䞊䝖䜴䜵䜲䛾ኚ᭦ 
○ DHCP䜢ᡭືタᐃ䜈ኚ᭦䛧䜎䛩䚹 
○ nmcli c m ྡ๓ ipv4.method manual 
○ nmcli c m ྡ๓ ipv4.addresses "IP䜰䝗䝺䝇/䝛䝑䝖䝬䝇 
䜽 䝀䞊䝖䜴䜵䜲" 
○ タᐃኚ᭦䛧䛯䛰䛡䛷䛿䚸タᐃ್䛿᭷ຠ䛻䛺䜙䛺䛔䚹 
○ ᥋⥆䜢down/up䛧䛯ᚋ䛷タᐃ್䛜᭷ຠ䛻䛺䜛䚹
NetworkManager 
● DNS䛾ኚ᭦ 
○ nmcli c m ྡ๓ ipv4.dns "DNS䝃䞊䝞䞊䛾IP䜰䝗䝺䝇" 
● タᐃ್䛾㏣ຍ䛸๐㝖 
○ ᪤Ꮡ䛾್䛻㏣ຍ䛩䜛ሙྜ䛿䚸㡯┠ྡ䛾๓䛻䛂䠇䛃䜢௜䛡 
䜛䚹 
○ ᪤Ꮡ䛾್䛛䜙๐㝖䛩䜛ሙྜ䛿䚸㡯┠ྡ䛾๓䛻䛂䞊䛃䜢௜ 
䛡䜛䚹 
○ nmcli c m ྡ๓ +㡯┠ྡ ್ 
○ nmcli c m ྡ๓ -㡯┠ྡ ್ 
● DHCP䛾タᐃ 
○ nmcli c m ྡ๓ ipv4.method auto
iproute2 
● 䝛䝑䝖䝽䞊䜽タᐃ䝁䝬䞁䝗䛾ኚ᭦ 
○ 䝕䝞䜲䝇ྡ䛜䛂eth␒ྕ䛃䛛䜙䛂enྡ⛠䛃䜈ኚ᭦䛻䛺䜚䜎䛧 
䛯䚹 
○ ᚑ᮶䛾ifconfig,route,arp,netstat䝁䝬䞁䝗䛿㠀᥎ዡ䚹 
○ ᶆ‽䛷䛿౑⏝䛷䛝䜎䛫䜣䚹 
○ ู㏵䚸net-tools䝟䝑䜿䞊䝆䜢䜲䞁䝇䝖䞊䝹䛩䜜䜀౑⏝ฟ 
᮶䜎䛩䚹 
○ yum install net-tools 
○ ᪂䛧䛔iproute2䝟䝑䜿䞊䝆䛾䝁䝬䞁䝗䜢᥎ዡ䛧䜎䛩䚹 
○ ྂ䛔䝁䝬䞁䝗䛿ᛀ䜜䛶᪂䛧䛔䝁䝬䞁䝗䜢Ꮫ⩦䛧䜎䛧䜗䛖䚹
iproute2 
● ip addr show 
○ ipconfig䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 
○ 䝕䝞䜲䝇䛾䜰䝗䝺䝇䜢⾲♧䛩䜛䚹 
○ ฎ⌮䝟䜿䝑䝖䛾⤫ィ䛿⾲♧䛥䜜䛺䛔䚹 
● ip -s link 
○ ipconfig䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 
○ ᥋⥆䛾ฎ⌮䝟䜿䝑䝖䛾⤫ィ䜢⾲♧䛩䜛䚹 
● ip route 
○ route䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 
○ 䝹䞊䝔䜱䞁䜾䝔䞊䝤䝹䜢⾲♧䛩䜛䚹
iproute2 
● ip neigh 
○ arp䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 
○ 䝕䝞䜲䝇䛾Mac䜰䝗䝺䝇䜢⾲♧䛩䜛䚹 
● ip䝁䝬䞁䝗 
○ ྛ䝛䝑䝖䝽䞊䜽タᐃ䜢ኚ᭦䛩䜛䛣䛸䛜ฟ᮶䜎䛩䚹 
○ 䝕䝞䜲䝇䜢down/up䛩䜛஦↓䛟䚸タᐃ䛿༶཯ᫎ䛧䜎䛩䚹 
○ タᐃ್䛿ಖᏑ䛥䜜䜎䛫䜣䚹 
● ss 
○ netstat䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 
○ 䝃䞊䝡䝇䛾౑⏝≧ἣ䜢⾲♧䛩䜛䚹

More Related Content

What's hot (20)

Starting python
Starting pythonStarting python
Starting python
Kentaro Kawano
 
Git inter-snapshot public
Git  inter-snapshot publicGit  inter-snapshot public
Git inter-snapshot public
SeongJae Park
 
Git cli
Git cliGit cli
Git cli
ohb0312
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X Server
Yasuhiro Asaka
 
Clean Manifests with Puppet::Tidy
Clean Manifests with Puppet::TidyClean Manifests with Puppet::Tidy
Clean Manifests with Puppet::Tidy
Puppet
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCS
SeongJae Park
 
GitGot: The Swiss Army Chainsaw of Git Repo Management
GitGot: The Swiss Army Chainsaw of Git Repo ManagementGitGot: The Swiss Army Chainsaw of Git Repo Management
GitGot: The Swiss Army Chainsaw of Git Repo Management
John Anderson
 
(120513) #fitalk an introduction to linux memory forensics
(120513) #fitalk   an introduction to linux memory forensics(120513) #fitalk   an introduction to linux memory forensics
(120513) #fitalk an introduction to linux memory forensics
INSIGHT FORENSIC
 
slides.pdf
slides.pdfslides.pdf
slides.pdf
vidsvagi
 
OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의
Juhong Jung
 
Update Lexia 3 DiagBox 7.61
Update Lexia 3 DiagBox 7.61 Update Lexia 3 DiagBox 7.61
Update Lexia 3 DiagBox 7.61
buyobdii
 
Plagger the duct tape of internet
Plagger the duct tape of internetPlagger the duct tape of internet
Plagger the duct tape of internet
Tatsuhiko Miyagawa
 
Container: is it safe enough to run you application?
Container: is it safe enough to run you application?Container: is it safe enough to run you application?
Container: is it safe enough to run you application?
Aleksey Zalesov
 
Filelist
FilelistFilelist
Filelist
olga_1964
 
[로켓 자바] Part 1 성능 튜닝 마인드 확립
[로켓 자바] Part 1 성능 튜닝 마인드 확립[로켓 자바] Part 1 성능 튜닝 마인드 확립
[로켓 자바] Part 1 성능 튜닝 마인드 확립
Covenant Ko
 
Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007
Robert Treat
 
Git basics
Git basicsGit basics
Git basics
Pavel Egorov
 
Linux & Open Source - Alternative Software
Linux & Open Source - Alternative SoftwareLinux & Open Source - Alternative Software
Linux & Open Source - Alternative Software
Sebastiano Merlino (eTr)
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
archwisp
 
Install odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debianInstall odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debian
Francisco Servera
 
Git inter-snapshot public
Git  inter-snapshot publicGit  inter-snapshot public
Git inter-snapshot public
SeongJae Park
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X Server
Yasuhiro Asaka
 
Clean Manifests with Puppet::Tidy
Clean Manifests with Puppet::TidyClean Manifests with Puppet::Tidy
Clean Manifests with Puppet::Tidy
Puppet
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCS
SeongJae Park
 
GitGot: The Swiss Army Chainsaw of Git Repo Management
GitGot: The Swiss Army Chainsaw of Git Repo ManagementGitGot: The Swiss Army Chainsaw of Git Repo Management
GitGot: The Swiss Army Chainsaw of Git Repo Management
John Anderson
 
(120513) #fitalk an introduction to linux memory forensics
(120513) #fitalk   an introduction to linux memory forensics(120513) #fitalk   an introduction to linux memory forensics
(120513) #fitalk an introduction to linux memory forensics
INSIGHT FORENSIC
 
slides.pdf
slides.pdfslides.pdf
slides.pdf
vidsvagi
 
OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의OSS AWS 핸즈온 강의
OSS AWS 핸즈온 강의
Juhong Jung
 
Update Lexia 3 DiagBox 7.61
Update Lexia 3 DiagBox 7.61 Update Lexia 3 DiagBox 7.61
Update Lexia 3 DiagBox 7.61
buyobdii
 
Plagger the duct tape of internet
Plagger the duct tape of internetPlagger the duct tape of internet
Plagger the duct tape of internet
Tatsuhiko Miyagawa
 
Container: is it safe enough to run you application?
Container: is it safe enough to run you application?Container: is it safe enough to run you application?
Container: is it safe enough to run you application?
Aleksey Zalesov
 
[로켓 자바] Part 1 성능 튜닝 마인드 확립
[로켓 자바] Part 1 성능 튜닝 마인드 확립[로켓 자바] Part 1 성능 튜닝 마인드 확립
[로켓 자바] Part 1 성능 튜닝 마인드 확립
Covenant Ko
 
Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007
Robert Treat
 
Linux & Open Source - Alternative Software
Linux & Open Source - Alternative SoftwareLinux & Open Source - Alternative Software
Linux & Open Source - Alternative Software
Sebastiano Merlino (eTr)
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
archwisp
 
Install odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debianInstall odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debian
Francisco Servera
 

Similar to CentOS 7 入門 (20)

Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
Gábor Nyers
 
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
VirtualTech Japan Inc.
 
OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月
OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月
OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月
VirtualTech Japan Inc.
 
RHCSA EX200 - Summary
RHCSA EX200 - SummaryRHCSA EX200 - Summary
RHCSA EX200 - Summary
Nugroho Gito
 
RedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative worksRedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative works
Md Shihab
 
Mac OSX Terminal 101
Mac OSX Terminal 101Mac OSX Terminal 101
Mac OSX Terminal 101
Murugun Murugun
 
Licão 06 process text streams with filters
Licão 06 process text streams with filtersLicão 06 process text streams with filters
Licão 06 process text streams with filters
Acácio Oliveira
 
Linux commands
Linux commandsLinux commands
Linux commands
shekhar70
 
松本Linux勉強会 SSH 暗号化と認証のプロトコル
松本Linux勉強会 SSH 暗号化と認証のプロトコル松本Linux勉強会 SSH 暗号化と認証のプロトコル
松本Linux勉強会 SSH 暗号化と認証のプロトコル
Shiojiri Ohhara
 
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopVagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
Lorin Hochstein
 
SHARE.ORG Orlando 2015
SHARE.ORG Orlando 2015SHARE.ORG Orlando 2015
SHARE.ORG Orlando 2015
Filipe Miranda
 
Red Hat Linux cheat sheet
Red Hat Linux cheat sheetRed Hat Linux cheat sheet
Red Hat Linux cheat sheet
Rafael Montesinos Muñoz
 
Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識
維泰 蔡
 
Hp ux-security-check
Hp ux-security-checkHp ux-security-check
Hp ux-security-check
Mohamed Kajamoideen
 
/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip red/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip red
AntonioAlejoAquino
 
Chef ossishigaki-140917230902-phpapp01
Chef ossishigaki-140917230902-phpapp01Chef ossishigaki-140917230902-phpapp01
Chef ossishigaki-140917230902-phpapp01
XxjerryleexX
 
Useful linux-commands
Useful linux-commandsUseful linux-commands
Useful linux-commands
Himani Singh
 
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptxRHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
AbdellahELMAMOUN
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 
Linux cheat-sheet
Linux cheat-sheetLinux cheat-sheet
Linux cheat-sheet
Craig Cannon
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
Gábor Nyers
 
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
MAASとJujuでつくるOpenStack環境構築入門 IceHouse対応版 - OpenStack最新情報セミナー 2014年10月
VirtualTech Japan Inc.
 
OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月
OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月
OpenStack運用管理最前線 - OpenStack最新情報セミナー 2014年12月
VirtualTech Japan Inc.
 
RHCSA EX200 - Summary
RHCSA EX200 - SummaryRHCSA EX200 - Summary
RHCSA EX200 - Summary
Nugroho Gito
 
RedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative worksRedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative works
Md Shihab
 
Licão 06 process text streams with filters
Licão 06 process text streams with filtersLicão 06 process text streams with filters
Licão 06 process text streams with filters
Acácio Oliveira
 
Linux commands
Linux commandsLinux commands
Linux commands
shekhar70
 
松本Linux勉強会 SSH 暗号化と認証のプロトコル
松本Linux勉強会 SSH 暗号化と認証のプロトコル松本Linux勉強会 SSH 暗号化と認証のプロトコル
松本Linux勉強会 SSH 暗号化と認証のプロトコル
Shiojiri Ohhara
 
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopVagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
Lorin Hochstein
 
SHARE.ORG Orlando 2015
SHARE.ORG Orlando 2015SHARE.ORG Orlando 2015
SHARE.ORG Orlando 2015
Filipe Miranda
 
Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識
維泰 蔡
 
/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip red/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip red
AntonioAlejoAquino
 
Chef ossishigaki-140917230902-phpapp01
Chef ossishigaki-140917230902-phpapp01Chef ossishigaki-140917230902-phpapp01
Chef ossishigaki-140917230902-phpapp01
XxjerryleexX
 
Useful linux-commands
Useful linux-commandsUseful linux-commands
Useful linux-commands
Himani Singh
 
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptxRHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
AbdellahELMAMOUN
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
Erica StJohn
 

More from Shiojiri Ohhara (20)

ランサムウェアのおはなし
ランサムウェアのおはなしランサムウェアのおはなし
ランサムウェアのおはなし
Shiojiri Ohhara
 
フィッシングとドメイン名・DNS
フィッシングとドメイン名・DNSフィッシングとドメイン名・DNS
フィッシングとドメイン名・DNS
Shiojiri Ohhara
 
フィッシングメール
フィッシングメールフィッシングメール
フィッシングメール
Shiojiri Ohhara
 
見えないから恐ろしい!標的型サイバー攻撃の脅威
見えないから恐ろしい!標的型サイバー攻撃の脅威見えないから恐ろしい!標的型サイバー攻撃の脅威
見えないから恐ろしい!標的型サイバー攻撃の脅威
Shiojiri Ohhara
 
転ばぬ先の杖 Windows Update
転ばぬ先の杖 Windows Update転ばぬ先の杖 Windows Update
転ばぬ先の杖 Windows Update
Shiojiri Ohhara
 
フィッシングメールの紹介と対策
フィッシングメールの紹介と対策フィッシングメールの紹介と対策
フィッシングメールの紹介と対策
Shiojiri Ohhara
 
パスワード再入門
パスワード再入門パスワード再入門
パスワード再入門
Shiojiri Ohhara
 
夏休みのサイバー自由研究 (1)DockerコンテナでVuls!
夏休みのサイバー自由研究 (1)DockerコンテナでVuls!夏休みのサイバー自由研究 (1)DockerコンテナでVuls!
夏休みのサイバー自由研究 (1)DockerコンテナでVuls!
Shiojiri Ohhara
 
オープンソースで始めるLinuxサーバー脆弱性診断入門
オープンソースで始めるLinuxサーバー脆弱性診断入門オープンソースで始めるLinuxサーバー脆弱性診断入門
オープンソースで始めるLinuxサーバー脆弱性診断入門
Shiojiri Ohhara
 
Docker勉強会2017 最新基礎・応用編
Docker勉強会2017 最新基礎・応用編Docker勉強会2017 最新基礎・応用編
Docker勉強会2017 最新基礎・応用編
Shiojiri Ohhara
 
サイバーセキュリティ勉強会2017 in 塩尻
サイバーセキュリティ勉強会2017 in 塩尻サイバーセキュリティ勉強会2017 in 塩尻
サイバーセキュリティ勉強会2017 in 塩尻
Shiojiri Ohhara
 
Docker勉強会2017 実践編 スライド
Docker勉強会2017 実践編 スライドDocker勉強会2017 実践編 スライド
Docker勉強会2017 実践編 スライド
Shiojiri Ohhara
 
Docker 再入門 2016 update
Docker 再入門 2016 updateDocker 再入門 2016 update
Docker 再入門 2016 update
Shiojiri Ohhara
 
DNSとサイバー攻撃
DNSとサイバー攻撃DNSとサイバー攻撃
DNSとサイバー攻撃
Shiojiri Ohhara
 
Open stack 勉強会 in 塩尻
Open stack 勉強会 in 塩尻Open stack 勉強会 in 塩尻
Open stack 勉強会 in 塩尻
Shiojiri Ohhara
 
サイバーセキュリティ勉強会
サイバーセキュリティ勉強会サイバーセキュリティ勉強会
サイバーセキュリティ勉強会
Shiojiri Ohhara
 
小型コンピューターで楽しく学ぼう!
小型コンピューターで楽しく学ぼう!小型コンピューターで楽しく学ぼう!
小型コンピューターで楽しく学ぼう!
Shiojiri Ohhara
 
Ubuntu LibreOffice Update
Ubuntu LibreOffice UpdateUbuntu LibreOffice Update
Ubuntu LibreOffice Update
Shiojiri Ohhara
 
Docker入門
Docker入門Docker入門
Docker入門
Shiojiri Ohhara
 
松本Linux勉強会 vagrant入門
松本Linux勉強会 vagrant入門松本Linux勉強会 vagrant入門
松本Linux勉強会 vagrant入門
Shiojiri Ohhara
 
ランサムウェアのおはなし
ランサムウェアのおはなしランサムウェアのおはなし
ランサムウェアのおはなし
Shiojiri Ohhara
 
フィッシングとドメイン名・DNS
フィッシングとドメイン名・DNSフィッシングとドメイン名・DNS
フィッシングとドメイン名・DNS
Shiojiri Ohhara
 
フィッシングメール
フィッシングメールフィッシングメール
フィッシングメール
Shiojiri Ohhara
 
見えないから恐ろしい!標的型サイバー攻撃の脅威
見えないから恐ろしい!標的型サイバー攻撃の脅威見えないから恐ろしい!標的型サイバー攻撃の脅威
見えないから恐ろしい!標的型サイバー攻撃の脅威
Shiojiri Ohhara
 
転ばぬ先の杖 Windows Update
転ばぬ先の杖 Windows Update転ばぬ先の杖 Windows Update
転ばぬ先の杖 Windows Update
Shiojiri Ohhara
 
フィッシングメールの紹介と対策
フィッシングメールの紹介と対策フィッシングメールの紹介と対策
フィッシングメールの紹介と対策
Shiojiri Ohhara
 
パスワード再入門
パスワード再入門パスワード再入門
パスワード再入門
Shiojiri Ohhara
 
夏休みのサイバー自由研究 (1)DockerコンテナでVuls!
夏休みのサイバー自由研究 (1)DockerコンテナでVuls!夏休みのサイバー自由研究 (1)DockerコンテナでVuls!
夏休みのサイバー自由研究 (1)DockerコンテナでVuls!
Shiojiri Ohhara
 
オープンソースで始めるLinuxサーバー脆弱性診断入門
オープンソースで始めるLinuxサーバー脆弱性診断入門オープンソースで始めるLinuxサーバー脆弱性診断入門
オープンソースで始めるLinuxサーバー脆弱性診断入門
Shiojiri Ohhara
 
Docker勉強会2017 最新基礎・応用編
Docker勉強会2017 最新基礎・応用編Docker勉強会2017 最新基礎・応用編
Docker勉強会2017 最新基礎・応用編
Shiojiri Ohhara
 
サイバーセキュリティ勉強会2017 in 塩尻
サイバーセキュリティ勉強会2017 in 塩尻サイバーセキュリティ勉強会2017 in 塩尻
サイバーセキュリティ勉強会2017 in 塩尻
Shiojiri Ohhara
 
Docker勉強会2017 実践編 スライド
Docker勉強会2017 実践編 スライドDocker勉強会2017 実践編 スライド
Docker勉強会2017 実践編 スライド
Shiojiri Ohhara
 
Docker 再入門 2016 update
Docker 再入門 2016 updateDocker 再入門 2016 update
Docker 再入門 2016 update
Shiojiri Ohhara
 
DNSとサイバー攻撃
DNSとサイバー攻撃DNSとサイバー攻撃
DNSとサイバー攻撃
Shiojiri Ohhara
 
Open stack 勉強会 in 塩尻
Open stack 勉強会 in 塩尻Open stack 勉強会 in 塩尻
Open stack 勉強会 in 塩尻
Shiojiri Ohhara
 
サイバーセキュリティ勉強会
サイバーセキュリティ勉強会サイバーセキュリティ勉強会
サイバーセキュリティ勉強会
Shiojiri Ohhara
 
小型コンピューターで楽しく学ぼう!
小型コンピューターで楽しく学ぼう!小型コンピューターで楽しく学ぼう!
小型コンピューターで楽しく学ぼう!
Shiojiri Ohhara
 
Ubuntu LibreOffice Update
Ubuntu LibreOffice UpdateUbuntu LibreOffice Update
Ubuntu LibreOffice Update
Shiojiri Ohhara
 
松本Linux勉強会 vagrant入門
松本Linux勉強会 vagrant入門松本Linux勉強会 vagrant入門
松本Linux勉強会 vagrant入門
Shiojiri Ohhara
 

Recently uploaded (20)

Linux Improvements in Memory Corruption Based Protections
Linux Improvements in Memory Corruption Based ProtectionsLinux Improvements in Memory Corruption Based Protections
Linux Improvements in Memory Corruption Based Protections
Vlatko Kosturjak
 
Introduction to Programming presentation.pptx
Introduction to Programming presentation.pptxIntroduction to Programming presentation.pptx
Introduction to Programming presentation.pptx
HorusCarlosVilln
 
Salesforce CRM and software as service model.pdf
Salesforce CRM and software as service model.pdfSalesforce CRM and software as service model.pdf
Salesforce CRM and software as service model.pdf
rinakali1
 
Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025
Iobit Uninstaller Pro Crack
 
Why Exceptions are just sophisticated GoTos ... and How to Move Beyond
Why Exceptions are just sophisticated GoTos ... and How to Move BeyondWhy Exceptions are just sophisticated GoTos ... and How to Move Beyond
Why Exceptions are just sophisticated GoTos ... and How to Move Beyond
Florian Wilhelm
 
IObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download FreeIObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download Free
Iobit Uninstaller Pro Crack
 
Choose Your Own Adventure to Get Started with Grafana Loki
Choose Your Own Adventure to Get Started with Grafana LokiChoose Your Own Adventure to Get Started with Grafana Loki
Choose Your Own Adventure to Get Started with Grafana Loki
Imma Valls Bernaus
 
CYB 305 Forensics and Digital Computer Security.pptx
CYB 305  Forensics and Digital Computer Security.pptxCYB 305  Forensics and Digital Computer Security.pptx
CYB 305 Forensics and Digital Computer Security.pptx
Muhammad54342
 
TUG Brazil - VizQL Data Service - Nik Dutra.pdf
TUG Brazil - VizQL Data Service - Nik Dutra.pdfTUG Brazil - VizQL Data Service - Nik Dutra.pdf
TUG Brazil - VizQL Data Service - Nik Dutra.pdf
Ligia Galvão
 
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdfCFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
Ortus Solutions, Corp
 
POS Testing Strategies and Best Practices
POS Testing Strategies and Best PracticesPOS Testing Strategies and Best Practices
POS Testing Strategies and Best Practices
jamescantor38
 
Admin, Product & Beyond with FilamentPHP.pptx
Admin, Product & Beyond with FilamentPHP.pptxAdmin, Product & Beyond with FilamentPHP.pptx
Admin, Product & Beyond with FilamentPHP.pptx
eastonmeth
 
Professional Consulting Resume of AL Davis
Professional Consulting Resume of AL DavisProfessional Consulting Resume of AL Davis
Professional Consulting Resume of AL Davis
ald303873
 
Custom Rummy Game Development
Custom     Rummy     Game    DevelopmentCustom     Rummy     Game    Development
Custom Rummy Game Development
Nova Carter
 
Scaling up your Snapshot tests, without the friction
Scaling up your Snapshot tests, without the frictionScaling up your Snapshot tests, without the friction
Scaling up your Snapshot tests, without the friction
arnold844201
 
Top Reasons to Hire Dedicated Odoo Developers for Your ERP Project
Top Reasons to Hire Dedicated Odoo Developers for Your ERP ProjectTop Reasons to Hire Dedicated Odoo Developers for Your ERP Project
Top Reasons to Hire Dedicated Odoo Developers for Your ERP Project
Kanak Infosystems LLP.
 
Nasdanika Overview - Mission, Vision, Differentiators & Capabilities
Nasdanika Overview - Mission, Vision, Differentiators & CapabilitiesNasdanika Overview - Mission, Vision, Differentiators & Capabilities
Nasdanika Overview - Mission, Vision, Differentiators & Capabilities
Pavel Vlasov
 
Web Application Development A Comprehensive Guide for 2025.pdf
Web Application Development A Comprehensive Guide for 2025.pdfWeb Application Development A Comprehensive Guide for 2025.pdf
Web Application Development A Comprehensive Guide for 2025.pdf
Secuodsoft
 
LightBurn 1.7.0.6 + Crack Download🔓
LightBurn  1.7.0.6  +  Crack  Download🔓LightBurn  1.7.0.6  +  Crack  Download🔓
LightBurn 1.7.0.6 + Crack Download🔓
Berkeley
 
Cron Jobs Gone Wrong: The Top Mistakes That Keep Your Tasks from Ticking
Cron Jobs Gone Wrong: The Top Mistakes That Keep Your Tasks from TickingCron Jobs Gone Wrong: The Top Mistakes That Keep Your Tasks from Ticking
Cron Jobs Gone Wrong: The Top Mistakes That Keep Your Tasks from Ticking
pmeth1
 
Linux Improvements in Memory Corruption Based Protections
Linux Improvements in Memory Corruption Based ProtectionsLinux Improvements in Memory Corruption Based Protections
Linux Improvements in Memory Corruption Based Protections
Vlatko Kosturjak
 
Introduction to Programming presentation.pptx
Introduction to Programming presentation.pptxIntroduction to Programming presentation.pptx
Introduction to Programming presentation.pptx
HorusCarlosVilln
 
Salesforce CRM and software as service model.pdf
Salesforce CRM and software as service model.pdfSalesforce CRM and software as service model.pdf
Salesforce CRM and software as service model.pdf
rinakali1
 
Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025
Iobit Uninstaller Pro Crack
 
Why Exceptions are just sophisticated GoTos ... and How to Move Beyond
Why Exceptions are just sophisticated GoTos ... and How to Move BeyondWhy Exceptions are just sophisticated GoTos ... and How to Move Beyond
Why Exceptions are just sophisticated GoTos ... and How to Move Beyond
Florian Wilhelm
 
IObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download FreeIObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download Free
Iobit Uninstaller Pro Crack
 
Choose Your Own Adventure to Get Started with Grafana Loki
Choose Your Own Adventure to Get Started with Grafana LokiChoose Your Own Adventure to Get Started with Grafana Loki
Choose Your Own Adventure to Get Started with Grafana Loki
Imma Valls Bernaus
 
CYB 305 Forensics and Digital Computer Security.pptx
CYB 305  Forensics and Digital Computer Security.pptxCYB 305  Forensics and Digital Computer Security.pptx
CYB 305 Forensics and Digital Computer Security.pptx
Muhammad54342
 
TUG Brazil - VizQL Data Service - Nik Dutra.pdf
TUG Brazil - VizQL Data Service - Nik Dutra.pdfTUG Brazil - VizQL Data Service - Nik Dutra.pdf
TUG Brazil - VizQL Data Service - Nik Dutra.pdf
Ligia Galvão
 
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdfCFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
Ortus Solutions, Corp
 
POS Testing Strategies and Best Practices
POS Testing Strategies and Best PracticesPOS Testing Strategies and Best Practices
POS Testing Strategies and Best Practices
jamescantor38
 
Admin, Product & Beyond with FilamentPHP.pptx
Admin, Product & Beyond with FilamentPHP.pptxAdmin, Product & Beyond with FilamentPHP.pptx
Admin, Product & Beyond with FilamentPHP.pptx
eastonmeth
 
Professional Consulting Resume of AL Davis
Professional Consulting Resume of AL DavisProfessional Consulting Resume of AL Davis
Professional Consulting Resume of AL Davis
ald303873
 
Custom Rummy Game Development
Custom     Rummy     Game    DevelopmentCustom     Rummy     Game    Development
Custom Rummy Game Development
Nova Carter
 
Scaling up your Snapshot tests, without the friction
Scaling up your Snapshot tests, without the frictionScaling up your Snapshot tests, without the friction
Scaling up your Snapshot tests, without the friction
arnold844201
 
Top Reasons to Hire Dedicated Odoo Developers for Your ERP Project
Top Reasons to Hire Dedicated Odoo Developers for Your ERP ProjectTop Reasons to Hire Dedicated Odoo Developers for Your ERP Project
Top Reasons to Hire Dedicated Odoo Developers for Your ERP Project
Kanak Infosystems LLP.
 
Nasdanika Overview - Mission, Vision, Differentiators & Capabilities
Nasdanika Overview - Mission, Vision, Differentiators & CapabilitiesNasdanika Overview - Mission, Vision, Differentiators & Capabilities
Nasdanika Overview - Mission, Vision, Differentiators & Capabilities
Pavel Vlasov
 
Web Application Development A Comprehensive Guide for 2025.pdf
Web Application Development A Comprehensive Guide for 2025.pdfWeb Application Development A Comprehensive Guide for 2025.pdf
Web Application Development A Comprehensive Guide for 2025.pdf
Secuodsoft
 
LightBurn 1.7.0.6 + Crack Download🔓
LightBurn  1.7.0.6  +  Crack  Download🔓LightBurn  1.7.0.6  +  Crack  Download🔓
LightBurn 1.7.0.6 + Crack Download🔓
Berkeley
 
Cron Jobs Gone Wrong: The Top Mistakes That Keep Your Tasks from Ticking
Cron Jobs Gone Wrong: The Top Mistakes That Keep Your Tasks from TickingCron Jobs Gone Wrong: The Top Mistakes That Keep Your Tasks from Ticking
Cron Jobs Gone Wrong: The Top Mistakes That Keep Your Tasks from Ticking
pmeth1
 

CentOS 7 入門

  • 1. CentOS 7 ධ㛛 ᪂䛧䛟⏕䜎䜜ኚ䜟䛳䛯CentOS
  • 2. ⮬ᕫ⤂௓ ኱ཎ ៅ୍㑻䚷https://twitter.com/ohhara_shiojiri 䠄᭷䠅䝖䝷䝇䝖䝛䝑䝖䝽䞊䜽䝇䚷ሷᑼ䜲䞁䜻䝳䝧䞊䝅䝵䞁䝥䝷䝄䠍䠌䠔ྕᐊ http://shiojiri-osslabo.com/ 䞉㛗㔝┴ሷᑼᕷ䛻άືᣐⅬ䜢⨨䛟䚸ᕷෆ䝥䝻䜾䝷䝬䞊᭷ᚿ䛻䜘䜛ᅋయ 䞉䛂䜸䞊䝥䞁䛺⎔ቃ䛷䜸䞊䝥䞁䛺άື䜢┠ᣦ䛩䛃䜢ྜゝⴥ䛻㞟䛖 䞉CoderDojo Shiojiri 㛤ദ䚷䞉ᑠᏛ⏕㧗Ꮫᖺྥ䛡Rubyᩍᐊ㛤ദ 䞉ITᢏ⾡᭩䜢䝸䝤䝷䜲䝈䛷㈚䛧ฟ䛧䚸䜎䛯ᕷ❧ᅗ᭩㤋䛸༠ຊ
  • 3. 䜰䝆䜵䞁䝎 ● CentOS䛻䛴䛔䛶 ● RHEL 7 䛻䛴䛔䛶 ● LAMP⎔ቃ䛻䛴䛔䛶 ● 䜲䞁䝇䝖䞊䝹䛻䛴䛔䛶 ● ᳨ド⎔ቃ ● systemd ● NetworkManager ● iproute2
  • 4. CentOS䛻䛴䛔䛶 ● Red Hat Enterprise Linux(RHEL)䜽䝻䞊䞁 ௚䛻Ꮫ⾡ྥ䛡䛻Scientific Linux ● RHEL䛛䜙ၟᶆ䜔ၟ⏝䛾䝟䝑䜿䞊䝆䜢㝖እ ● Community ENTerprise Operating System ● Red Hat♫䛾᭷ൾ䝃䝫䞊䝖䜢ᚲせ䛸䛧䛺䛔⏝㏵ ● 2014ᖺ1᭶Red Hat♫䛜ᨭ᥼⾲᫂ ● RHEL䛸㧗䛔஫᥮ᛶ
  • 5. RHEL 7 䛻䛴䛔䛶 ● 2014ᖺ6᭶10᪥䝸䝸䞊䝇 ● 10ᖺ㛫䝃䝫䞊䝖䚷2024ᖺ6᭶30᪥䜎䛷 ● Fedora19䜢䝧䞊䝇 ● 䜹䞊䝛䝹䝞䞊䝆䝵䞁 3.10 ● 64bit䛾䜏 x86_64/ppc64/s390s䝃䝫䞊䝖 ● ext4 → xfs䚷᭱኱500TB䝃䝫䞊䝖 ● GRUB Legacy → GRUB2䚷UEFI䝃䝫䞊䝖
  • 6. LAMP⎔ቃ䛻䛴䛔䛶 ● LAMP⎔ቃ䛸䛧䛶䛾CentOS ○ ᚑ᮶䝅䝇䝔䝮䛸䛾஫᥮ᛶ䛸Ᏻᐃᛶ䜢㔜ど䛧䛶䚸ᶆ‽䝟䝑 䜿䞊䝆䛾䝞䞊䝆䝵䞁䛿ྂ䛔䜎䜎䛷䛧䛯䚹 ○ ྂ䛔䝞䞊䝆䝵䞁䛾䝃䝫䞊䝖䛜⥆䚻䛸⤊஢䛧䛶䛔䜛䚹 ○ ᛶ⬟ྥୖ䚸ᶵ⬟ྥୖ䚸䝉䜻䝳䝸䝔䜱ྥୖ䛜ồ䜑䜙䜜䜛䚹 ○ RHEL7(CentOS7)䛛䜙᪂䛧䛔䝞䞊䝆䝵䞁䜢᥇⏝䟿 ● CentOS6.5䛾LAMP⎔ቃ ○ Apache䚷→䚷2.2.15䚷㛤Ⓨ⤊஢䚷᪂∧⛣⾜䜢᥎ዡ ○ MySQL䚷→䚷5.1.73䚷㛤Ⓨ⤊஢䚷᪂∧⛣⾜䜢᥎ዡ ○ PHP䚷→䚷5.3.3䚷㛤Ⓨ⤊஢䚷᪂∧⛣⾜䜢᥎ዡ ○ Perl䚷→䚷5.10.1 ○ Python䚷→䚷2.6.6
  • 7. LAMP⎔ቃ䛻䛴䛔䛶 ● CentOS7䛾LAMP⎔ቃ ○ Apache䚷→䚷2.4.6䚷᭱᪂ᶵ⬟䛾Ᏻᐃ∧ ○ MySQL䚷→䚷MySQL5.5஫᥮䛾MariaDB 5.5.37 ○ PHP䚷→䚷5.4.16䚷᭱᪂䛾PHP䛿5.6.0 ○ Perl䚷→䚷5.16.3䚷᭱᪂䛾Perl䛿5.20.0 ○ Python䚷→䚷2.7.5䚷᭱᪂䛾Python䛿3.4.1 ○ ྛ䝞䞊䝆䝵䞁䛿2014ᖺ9᭶10᪥᫬Ⅼ䛷䛩䚹 ● CentOS6.5䛷LAMP⎔ቃ䛾᪂䝞䞊䝆䝵䞁ᵓ⠏ 䛿኱ኚ㠃ಽ䛺䛾䛷䚸CentOS7䜢฼⏝䛧䜎䛧䜗 䛖䚹 ● CentOS6.5䛛䜙CentOS7䜈䛾⛣⾜䛜බᘧ䝃 䝫䞊䝖䛥䜜䛶䛔䜎䛩䚹
  • 8. 䜲䞁䝇䝖䞊䝹䛻䛴䛔䛶 ● ᚑ᮶㏻䜚ISO䝣䜯䜲䝹䛜⏝ព䛥䜜䛶䛔䜎䛩䚹 ○ http://www.centos.org/download/ ○ ᶆ‽䛷3.9GB䚷᭱኱䛾Everything䛷6.6GB䟿 ○ ᭱ᑠ䛾minimal䛷566MB ○ 㧗㏿䝛䝑䝖⎔ቃ䛜䛒䜜䜀䚸Netinstall䛷362MB ● 䜲䞁䝇䝖䞊䝷䞊䛾anaconda ○ ᚑ᮶䛿䜲䞁䝇䝖䞊䝹䛾㡰䜢㏣䛳䛶䜸䝥䝅䝵䞁䜢タᐃ䛧䛶䛔 䛯䛜䚸ண䜑䜸䝥䝅䝵䞁䜢㑅ᢥ䛧䛶䛛䜙䜲䞁䝇䝖䞊䝹ᐇ⾜䛜 ฟ᮶䜛䜘䛖䛻䛺䛳䛯䚹
  • 9. 䜲䞁䝇䝖䞊䝹䛻䛴䛔䛶 ● 䜽䝷䜴䝗⎔ቃ⏝䛾䜲䝯䞊䝆䜢ணᐃ䛧䛶䛔䜎䛩䚹 ○ AWS➼䛾䝟䝤䝸䝑䜽䜽䝷䜴䝗 ○ OpenStack➼䛾䝥䝷䜲䝧䞊䝖䜽䝷䜴䝗 ○ Docker ● 䜽䝷䜴䝗฼⏝⪅䜢᝿ᐃ䛧䛶䚸Vagrant䛾BOX䝣䜯 䜲䝹䛻䛶௒ᅇ䛿Ꮫ⩦䛧䛶⾜䛝䜎䛩䚹
  • 10. ᳨ド⎔ቃ ● VirtualBox 4.3.16(2014/09/11᫬Ⅼ) ○ https://www.virtualbox.org/wiki/Downloads ○ CPU䛾௬᝿䝬䝅䞁ᨭ᥼ᶵ⬟䛜ᚲせ(BIOSタᐃ) ○ Windows䛾ሙྜ䚸䝅䝇䝔䝮䛾PATHタᐃ䛜ᚲせ ■ 4.2⣔䚷C:Program FilesOracle VM VirtualBox ■ 4.3⣔䚷C:Program FilesOracleVirtualBox
  • 11. ᳨ド⎔ቃ ● Vagrant 1.6.5(2014/09/05᫬Ⅼ) ○ http://www.vagrantup.com/downloads.html ○ Windows䛾ሙྜ䚸䝅䝇䝔䝮䛾PATHタᐃ䛜ᚲせ ■ C:HashiCorpVagrantbin ■ C:HashiCorpVagrantembeddedmingwbin ○ 䝁䝬䞁䝗䝥䝻䞁䝥䝖䛾௦䜟䜚䛻mingw32䛜౑⏝䛷䛝䜛䚹 ■ C:HashiCorpVagrantembeddedmingwmingw32env.cmd ● BOX䝣䜯䜲䝹 CentOS 7 ○ https://dl.dropboxusercontent.com/s/w3lbekm7eunrskm/centos-7.0-x86_64.box ○ CentOS7.0 x86_64 minimal + Puppet + VirtualBoxGuestAddtions 4.3.14
  • 12. ᳨ド⎔ቃ ● Vagrantfile䜢⦅㞟䛧䛶IP䜰䝗䝺䝇䜢๭䜚ᙜ䛶䛯 䝜䞊䝗䛷㉳ື䛥䛫䜎䛩䚹 ● Vagrantධ㛛䛾㈨ᩱ䜢ཧ↷䛧䛶ୗ䛥䛔䚹 ○ http://www.slideshare.net/ShinichiroOhhara/solavagrantver2
  • 13. ᳨ド⎔ቃ Virtual Box ⎔ቃ 䜽䝷䜲䜰䞁䝖ഃ Ubuntu 14.04 䝩䝇䝖PC 䝹䞊䝍䞊 192.168.33.1 䝃䞊䝞䞊ഃ CentOS7 192.168.33.70
  • 14. systemd ● 䝃䞊䝡䝇⟶⌮䛜systemd䜈ኚ᭦䛻䛺䜚䜎䛧䛯䚹 ○ 䝅䝇䝔䝮䛾㉳ື᫬䚸䝅䝱䝑䝖䝎䜴䞁᫬䛺䛹䚸䝃䞊䝡䝇䝥䝻 䝉䝇䛾⟶⌮䝅䝇䝔䝮䛜᪂䛧䛟䛺䜚䜎䛧䛯䚹 ● ᚑ᮶䛿UNIX⏤᮶䛾init䛻䛶⟶⌮ ○ UNIX䛾init䛻䛿䚸SystemV⣔䛸BSD⣔䛜䛒䜛 ○ RHEL5(CentOS5)䜎䛷䛿SysVinit ○ /etc/inittab䛻タᐃ䛥䜜䛯䝷䞁䝺䝧䝹䛷⟶⌮ ○ RHEL6(CentOS6)䛛䜙ubuntu䛸ྠ䛨Upstart ○ /etc/init/௨ୗ䛾タᐃ䝣䜯䜲䝹䛷⟶⌮ ○ Upstart䛿SysVinit஫᥮ ○ ஫᥮ᛶ䛾䛒䜛䝅䜵䝹䝇䜽䝸䝥䝖䛷ືస䜢タᐃ
  • 15. systemd ● init䜘䜚ኚ䜟䛳䛯䛣䛸 ○ Upstart䜘䜚୪ิᗘ䛾㧗䛔㧗㏿䛺㉳ື䛸⤊஢ ○ 䝅䜵䝹䝇䜽䝸䝥䝖䛷䛿䛺䛟タᐃ䝣䜯䜲䝹䛻䜘䜛⟶⌮ ○ 䝃䞊䝡䝇䝥䝻䝉䝇㉳ື䛜ᵝ䚻䛺᪉ἲ䛷ᰂ㌾䛻ฟ᮶䜛 ○ cgroups䛻䜘䜛䝃䞊䝡䝇䝥䝻䝉䝇䛾䝸䝋䞊䝇⟶⌮ ● Unit ○ 䝃䞊䝡䝇䝥䝻䝉䝇䛾タᐃ䝣䜯䜲䝹 ○ systemd䛜Unit䛾タᐃ䛷ฎ⌮䛩䜛䚹 ○ ௚䛾Unit䛸㐃ᦠ䠄౫Ꮡ䛸㉳ື㡰䠅䛧䛶ฎ⌮䛜ฟ᮶䜛䚹 ○ ᣑᙇᏊ䛻䜘䛳䛶ᵝ䚻䛺Unit䛾✀㢮䛜䛒䜛䚹 ○ タ⨨ሙᡤ䛿䚸/etc/systemd/system ○ 䜲䞁䝇䝖䞊䝹ึᮇタᐃ䛿䚸/usr/lib/systemd/system
  • 16. systemd ● 䝁䝬䞁䝗 ○ systemctl 䜸䝥䝅䝵䞁 Unitྡ ○ ᚑ᮶䛸ྠ䛨service䜒౑⏝䛷䛝䜎䛩䚹 ● 䝃䞊䝡䝇䝥䝻䝉䝇䛾㉳ື䛸೵Ṇ ○ Unit䛾ᣑᙇᏊ䛿䚸䛂.service䛃 ○ sytemctl [start/stop/restart] Unitྡ ○ reload䜸䝥䝅䝵䞁䛿Unit䛻ᐃ⩏䛥䜜䛶䛔䜛ሙྜ䛾䜏 ● Unitタᐃ䛾ኚ᭦ ○ Unitタᐃ䜢ኚ᭦䛧䛯᫬䛿䚸systemd䜈཯ᫎ䛥䛫䜎䛩䚹 ○ systemctl daemon-reload ● 䝥䝻䝉䝇䛾≧ែ☜ㄆ ○ systemctl status Unitྡ
  • 17. systemd ● ⮬ື㉳ື䛾タᐃ ○ systemctl [enable/disable] Unitྡ ○ Unit䛾㐃ᦠ䠄౫Ꮡ䠅タᐃ䛜ኚ᭦䛥䜜䜎䛩䚹 ○ Unitタᐃ䝣䜯䜲䝹䛷ᣦᐃ䛧䛯䛂WantedBy=䛃䝕䜱䝺䜽䝖䝸 䜈䛾䝅䞁䝪䝸䝑䜽䝸䞁䜽 ● Wants ○ 㐃ᦠ䠄౫Ꮡ䠅䛩䜛Unit䜢タᐃ䛧䜎䛩䚹 ○ Unitタᐃ䝣䜯䜲䝹䛾䛂Wants=䛃 ○ 䝕䜱䝺䜽䝖䝸䛂Unitྡ.wants䛃䜈䝅䞁䝪䝸䝑䜽䝸䞁䜽䜢సᡂ ● Requires ○ Wants䛿Unit㛫䛾ྠ᫬㉳ື䛜ኻᩋ䛧䛶䜒෌ᐇ⾜䛧䜎䛩䚹 ○ Requires䛿Unit㛫䛾ྠ᫬㉳ື䛜ኻᩋ䛧䛯䜙⤊஢䛧䜎 䛩䚹
  • 18. systemd ● ⮬ື㉳ື䛾☜ㄆ ○ systemctl list-unit-files --type=service ○ enabled䚷→䚷䛂Wants=䛃グ㍕䛒䜚䚸᭷ຠ ○ disabled䚷→䚷䛂Wants=䛃グ㍕䛒䜚䚸↓ຠ ○ static䚷→䚷䛂Wants=䛃グ㍕↓䛧 ● ⌧ᅾ䛾Unit≧ែ䛾☜ㄆ ○ systemctl list-units --type=service ○ list-units䜸䝥䝅䝵䞁䜢┬␎ฟ᮶䜛䚹 ● Unit䛾㐃ᦠ㛵ಀ䛾☜ㄆ ○ systemctl list-dependencies ○ 䝒䝸䞊⾲♧䛷㐃ᦠ䠄౫Ꮡ䛸㉳ື㡰䠅㛵ಀ䜢⾲♧䛩䜛䚹
  • 19. systemd ● target ○ 」ᩘ䛾Unit䜢䜎䛸䜑䛶䚸䜾䝹䞊䝥໬䛷䛝䜛䚹 ○ Unit䛾ᣑᙇᏊ䛿䚸䛂.target䛃 ○ 㛵ಀ䛩䜛」ᩘ䛾Unit䛾㐃ᦠ䠄౫Ꮡ䛸㉳ື㡰䠅䜢⟶⌮䚹 ○ target⮬య䛿ᐇ⾜䛧䛺䛔䚹 ○ ᚑ᮶䛾䝷䞁䝺䝧䝹䛜↓䛟䛺䜚䚸Unit䛾target䛻ኚ䜟䜚䜎䛧 䛯䚹 ○ ᚑ᮶䛾䝷䞁䝺䝧䝹0䛛䜙6䛸㐪䛔䚸⮬⏤䛻タᐃฟ᮶䜛䚹 ● 䝅䝇䝔䝮䛾㉳ື≧ែ䛾ኚ᭦᪉ἲ ○ /etc/systemd/system/default.target ○ 䝅䞁䝪䝸䝑䜽䝸䞁䜽ඛ䜢ኚ᭦䛩䜛䛣䛸䛷䚸䝷䞁䝺䝧䝹┦ᙜ 䜢ᐇ⌧䛧䛶䛔䜎䛩䚹
  • 20. systemd ● ᚑ᮶䛾䝷䞁䝺䝧䝹䛸䛾ᑐẚ ○ runlevel0䛛䜙runlevel6䛾䝅䞁䝪䝸䝑䜽䝸䞁䜽䜒䛒䜛䚹 ᚑ᮶䛾䝷䞁䝺䝧䝹 target䝣䜯䜲䝹ྡ ≧ែෆᐜ runlevel 䠌 poweroff.target ೵Ṇ runlevel 1 rescue.target 䝅䞁䜾䝹䝴䞊䝄䞊䝰䞊䝗 runlevel 2 multi-user.target 䝬䝹䝏䝴䞊䝄䞊䝰䞊䝗 runlevel 3 multi-user.target 䝬䝹䝏䝴䞊䝄䞊䝰䞊䝗 runlevel 4 multi-user.target 䝬䝹䝏䝴䞊䝄䞊䝰䞊䝗 runlevel 5 graphical.target GUI䝬䝹䝏䝴䞊䝄䞊䝰䞊䝗 runlevel 6 reboot.target ෌㉳ື
  • 21. systemd ● 䛭䛾௚䛾Unit ○ 䛂service䛃䛂target䛃䛾௚䛻䜒Unit䛾✀㢮䛜䛒䜚䜎䛩䚹 ● mount, swap ○ /etc/fstab䛛䜙⮬ືసᡂ䛥䜜䜎䛩䚹 ● device ○ 䝕䝞䜲䝇䛜ㄆ㆑䛩䜛䛸⮬ືసᡂ䛥䜜䜎䛩䚹 ● path ○ 䝟䝇䜢┘ど䛧䛶䚸䝣䜯䜲䝹䛻ᛂ䛨䛶䝃䞊䝡䝇䜢㉳ື䚹 ● socket ○ 䝋䜿䝑䝖䜢┘ど䛧䛶䚸᥋⥆䛻ᛂ䛨䛶䝃䞊䝡䝇䜢㉳ື䚹
  • 22. NetworkManager ● 䝛䝑䝖䝽䞊䜽䝕䝞䜲䝇タᐃ ○ /etc/sysconfig/network-scipts/䛻䛒䜛タᐃ䝣䜯䜲䝹䜢┤ ᥋⦅㞟䛩䜛䛾䛷䛿䛺䛟䚸NetworkManager䜢౑⏝䛩䜛䚹 ○ ᚑ᮶䛾タᐃ䝣䜯䜲䝹䜒฼⏝䛷䛝䜛䚹 ○ Ethernet䜲䞁䝍䞊䝣䜵䞊䝇䛿ᶆ‽䛷䛿↓ຠ䛻䛺䛳䛶䛔 䜛䚹 ● NetworkManager䝣䝻䞁䝖䜶䞁䝗 ○ GUI䛾GNOME⎔ቃ䛷᧯స䛧䜎䛩䚹 ● nmtui ○ 䝔䜻䝇䝖⏬㠃䛷ᑐヰⓗ䛻䝛䝑䝖䝽䞊䜽タᐃ䛧䜎䛩䚹
  • 23. NetworkManager ● nmcli ○ 䝁䝬䞁䝗䝷䜲䞁䛷䝛䝑䝖䝽䞊䜽タᐃ䛧䜎䛩䚹 ○ 䝃䞊䝞䞊⟶⌮⪅ྥ䛡䛻䚸䛣䛣䛷䛿nmcli䜢Ꮫ⩦䛧䜎䛩䚹 ● 䝩䝇䝖ྡ䛾ኚ᭦ ○ nmcli general hostname 䝩䝇䝖ྡ ○ bmcli g ho 䝩䝇䝖ྡ 䛸┬␎䛷䛝䜛䚹 ○ /etc/hostname䝣䜯䜲䝹䛻タᐃ䛥䜜䜛䚹
  • 24. NetworkManager ● nmcli device ○ ≀⌮䝕䝞䜲䝇䛾⟶⌮ ● 䝕䝞䜲䝇䛾୍ぴ ○ nmcli device ○ nmcli d 䛸┬␎ฟ᮶䜛䚹 ● 䝕䝞䜲䝇䛾ヲ⣽ ○ nmcli device show 䝕䝞䜲䝇ྡ ○ nmcli d s 䛸┬␎ฟ᮶䜛䚹
  • 25. NetworkManager ● nmcli connection ○ ᥋⥆タᐃ䛾⟶⌮ ● ᥋⥆≧ἣ䛾୍ぴ ○ nmcli connection ○ nmcli c 䛸┬␎䛷䛝䜛䚹 ○ nmcli --fields 㡯┠ connection 䛷᳨⣴⾲♧䜒ฟ᮶䜛䚹 ● ᥋⥆䛾ヲ⣽ ○ nmcli connection show ྡ๓䜒䛧䛟䛿UUID ○ nmcli c s ྡ๓䜒䛧䛟䛿UUID䚷䛸┬␎䛷䛝䜛䚹 ○ ྡ๓䛻䝇䝨䞊䝇䛜䛒䜛䛸䛝䛿䚸䛂”䛃䝎䝤䝹䜽䜷䞊䝔䞊䝅䝵 䞁䛷ᅖ䜣䛷ᣦᐃ䛩䜛䚹 ○ nmcli c s “Wired connection 1”
  • 26. NetworkManager ● ᥋⥆䛾᭷ຠ໬ ○ nmcli connection up ྡ๓䜒䛧䛟䛿UUID ● ᥋⥆䛾↓ຠ໬ ○ nmcli connection down ྡ๓䜒䛧䛟䛿UUID ● ᥋⥆䛾ືస☜ㄆ ○ nmcli c s ྡ๓䜒䛧䛟䛿UUID 䛷IP䜰䝗䝺䝇䜢☜ㄆ ○ ping 䛷␯㏻䜢☜ㄆ ○ nmcli c d ྡ๓䜒䛧䛟䛿UUID 䛷↓ຠ໬ ○ ping 䛷␯㏻ฟ᮶䛺䛔䛾䜢☜ㄆ ○ nmcli c u ྡ๓䜒䛧䛟䛿UUID 䛷᭷ຠ໬ ○ ping 䛷␯㏻䜢☜ㄆ
  • 27. NetworkManager ● タᐃ䛾ኚ᭦ ○ nmcli connection modify ྡ๓ 㡯┠ タᐃ್ ○ nmcli c m 䛸┬␎䛷䛝䜛䚹 ● IP䜰䝗䝺䝇䛸䝀䞊䝖䜴䜵䜲䛾ኚ᭦ ○ DHCP䜢ᡭືタᐃ䜈ኚ᭦䛧䜎䛩䚹 ○ nmcli c m ྡ๓ ipv4.method manual ○ nmcli c m ྡ๓ ipv4.addresses "IP䜰䝗䝺䝇/䝛䝑䝖䝬䝇 䜽 䝀䞊䝖䜴䜵䜲" ○ タᐃኚ᭦䛧䛯䛰䛡䛷䛿䚸タᐃ್䛿᭷ຠ䛻䛺䜙䛺䛔䚹 ○ ᥋⥆䜢down/up䛧䛯ᚋ䛷タᐃ್䛜᭷ຠ䛻䛺䜛䚹
  • 28. NetworkManager ● DNS䛾ኚ᭦ ○ nmcli c m ྡ๓ ipv4.dns "DNS䝃䞊䝞䞊䛾IP䜰䝗䝺䝇" ● タᐃ್䛾㏣ຍ䛸๐㝖 ○ ᪤Ꮡ䛾್䛻㏣ຍ䛩䜛ሙྜ䛿䚸㡯┠ྡ䛾๓䛻䛂䠇䛃䜢௜䛡 䜛䚹 ○ ᪤Ꮡ䛾್䛛䜙๐㝖䛩䜛ሙྜ䛿䚸㡯┠ྡ䛾๓䛻䛂䞊䛃䜢௜ 䛡䜛䚹 ○ nmcli c m ྡ๓ +㡯┠ྡ ್ ○ nmcli c m ྡ๓ -㡯┠ྡ ್ ● DHCP䛾タᐃ ○ nmcli c m ྡ๓ ipv4.method auto
  • 29. iproute2 ● 䝛䝑䝖䝽䞊䜽タᐃ䝁䝬䞁䝗䛾ኚ᭦ ○ 䝕䝞䜲䝇ྡ䛜䛂eth␒ྕ䛃䛛䜙䛂enྡ⛠䛃䜈ኚ᭦䛻䛺䜚䜎䛧 䛯䚹 ○ ᚑ᮶䛾ifconfig,route,arp,netstat䝁䝬䞁䝗䛿㠀᥎ዡ䚹 ○ ᶆ‽䛷䛿౑⏝䛷䛝䜎䛫䜣䚹 ○ ู㏵䚸net-tools䝟䝑䜿䞊䝆䜢䜲䞁䝇䝖䞊䝹䛩䜜䜀౑⏝ฟ ᮶䜎䛩䚹 ○ yum install net-tools ○ ᪂䛧䛔iproute2䝟䝑䜿䞊䝆䛾䝁䝬䞁䝗䜢᥎ዡ䛧䜎䛩䚹 ○ ྂ䛔䝁䝬䞁䝗䛿ᛀ䜜䛶᪂䛧䛔䝁䝬䞁䝗䜢Ꮫ⩦䛧䜎䛧䜗䛖䚹
  • 30. iproute2 ● ip addr show ○ ipconfig䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 ○ 䝕䝞䜲䝇䛾䜰䝗䝺䝇䜢⾲♧䛩䜛䚹 ○ ฎ⌮䝟䜿䝑䝖䛾⤫ィ䛿⾲♧䛥䜜䛺䛔䚹 ● ip -s link ○ ipconfig䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 ○ ᥋⥆䛾ฎ⌮䝟䜿䝑䝖䛾⤫ィ䜢⾲♧䛩䜛䚹 ● ip route ○ route䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 ○ 䝹䞊䝔䜱䞁䜾䝔䞊䝤䝹䜢⾲♧䛩䜛䚹
  • 31. iproute2 ● ip neigh ○ arp䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 ○ 䝕䝞䜲䝇䛾Mac䜰䝗䝺䝇䜢⾲♧䛩䜛䚹 ● ip䝁䝬䞁䝗 ○ ྛ䝛䝑䝖䝽䞊䜽タᐃ䜢ኚ᭦䛩䜛䛣䛸䛜ฟ᮶䜎䛩䚹 ○ 䝕䝞䜲䝇䜢down/up䛩䜛஦↓䛟䚸タᐃ䛿༶཯ᫎ䛧䜎䛩䚹 ○ タᐃ್䛿ಖᏑ䛥䜜䜎䛫䜣䚹 ● ss ○ netstat䛻┦ᙜ䛩䜛䝁䝬䞁䝗䚹 ○ 䝃䞊䝡䝇䛾౑⏝≧ἣ䜢⾲♧䛩䜛䚹