#author("2019-06-25T22:46:03+00:00","","")
#author("2022-04-24T15:41:44+09:00","default:user","user")
[[Computer/Linux]]

*CentOS [#c61961ec]

**インストール用USBメモリの作成(macOS) [#k5f85a45]
-[[./9Stream]]
-[[./8Stream]]
-[[./8]]
-[[./7]]

 $ hdiutil convert -format UDRW -o CentOS.img CentOS.iso
 $ diskutil list
 $ diskutil unmountDisk /dev/diskX
 $ sudo dd if=CentOS.img.dmg of=/dev/diskX bs=1m

**CUIインストーラの起動 [#i59ec87a]

 > vmlinuz initrd=initrd.img ... inst.text

**ユーザの追加 [#hd42e5b1]

wheel (gid=10)に所属させる場合.

 # useradd -m -g 10 accountname

**Minimalにパッケージを追加 [#c18c02d1]

+wget
+perl
+ffmpeg(リポジトリを追加する必要あり)
+rkhunter
+clamav clamav-update clamav-server-systemd

**リポジトリの追加 [#n9062b37]

 $ sudo yum -y install epel-release
 $ sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
 $ sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm

**ソフトウェアのアップデート [#v2e41408]

 $ sudo yum update

**サービス [#bf8ccecf]

+chronyd
+crond
+freshclam
+(httpd)
+named
+samba

**rkhunter [#p4ad264c]

アップデートする.

 $ sudo rkhunter --update
 $ sudo rkhunter --propupd

非対話式で実行し,警告があるものだけを表示させる.

 $ sudo rkhunter --check --skip-keypress --report-warnings-only

**firewalld [#q7aacf82]

 $ sudo firewall-cmd --set-default-zone=home
 $ firewall-cmd --get-default-zone
 $ firewall-cmd --get-services
 $ sudo firewall-cmd --zone=home --add-service=dhcp --permanent
 $ sudo firewall-cmd --zone=home --add-service=dns --permanent
 $ sudo firewall-cmd --zone=home --add-service=http --permanent
 $ sudo firewall-cmd --zone=home --add-service=https --permanent
 $ sudo firewall-cmd --zone=home --add-service=ntp --permanent
 $ sudo firewall-cmd --zone=home --add-service=samba --permanent
 $ sudo firewall-cmd --reload
 $ sudo firewall-cmd --list-services --zone=home

**chrony [#obf2ae24]

ntpdの後継.

+/etc/chrony.confを設定.
+サービスを再起動.
 $ sudo systemctl restart chronyd
+確認.
 $ chronyc sources
+サーバとして稼働させるには/etc/chrony.confでallowの項目を設定する.
+自動起動の設定(必要に応じて).
 $ sudo systemctl enable chronyd

**named [#s74c42cf]

chrootで運用する.

 $ sudo yum -y install bind bind-chroot bind-utils
 $ sudo systemctl disable named.service
 $ sudo systemctl enable named-chroot
 $ sudo systemctl start named-chroot

chrootで運用する場合,設定ファイルは/var/named/chroot/etc/の方にあるので注意する.


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS