Fedra18入れた

メディアからFedra18(いや今なら19入れろよ、と言うのはおいておいて)を入れたので、メモ

まず注意。Scientific Linux6.4でいうserviceやchkconfigの代わりにsystemctlというコマンドを使う。主なコマンドの比較は以下のとおり。

# Scientific Linux6 Fedora18 意味
1 service hoge start systemctl start hoge.service サービスhogeの起動
2 service hoge stop systemctl stop hoge.service サービスhogeの停止
3 service hoge status systemctl status hoge.service サービスhogeの起動状態の確認
4 service hoge restart systemctl restart hoge.service サービスhogeの再起動
5 service hoge reload systemctl reload hoge.service サービスhogeの設定再読み込み
6 service hoge condrestart systemctl condrestart hoge.service サービスhogeが起動中の場合再起動
7 chkconfig --list systemctl list-unit-files サービス自動起動設定の表示
8 chkconfig hoge on systemctl enable hoge.service サービスhoge自動起動設定
9 chkconfig hoge off systemctl disable hoge.service サービスhoge自動起動設定の削除
10 chkconfig --add hoge systemctl daemon-reload サービスhoge自動起動設定リストへの追加

※ 実際にはchkconfigも併用しているみたいだ。後日調べて追記する。

システムアップデート

# yum -y upgrade

sshdの起動

# systemctl start sshd.service

これで他の端末からログインできる。

selinuxの無効化

# vi /etc/selinux/config

SELINUX=enforcing

SELINUX=disabled

に変更する。

Firewallの停止

# systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
          Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
          Active: active (running) since Mon, 2013-09-23 22:39:22 JST; 54min ago
        Main PID: 588 (firewalld)
          CGroup: name=systemd:/system/firewalld.service
                  m 588 /usr/bin/python -Es /usr/sbin/firewalld --nofork

Sep 23 22:39:22 localhost.localdomain systemd[1]: Started firewalld - dynamic...
# systemctl stop firewalld.service
# systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
          Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
          Active: inactive (dead) since Mon, 2013-09-23 23:33:31 JST; 881ms ago
        Main PID: 588 (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/firewalld.service

Sep 23 22:39:22 localhost.localdomain systemd[1]: Started firewalld - dynamic...
Sep 23 23:33:30 localhost.localdomain systemd[1]: Stopping firewalld - dynami...
Sep 23 23:33:31 localhost.localdomain systemd[1]: Stopped firewalld - dynamic...
# systemctl disable firewalld.service
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'

固定IPの設定と、IPV6非使用の設定

デフォルトではNetworkManagerが有効になっているので、コイツを止める

# vi /etc/sysconfig/network-scripts/ifcfg-em1

TYPE=Ethernet
BOOTPROTO=static
IPADDR=xx.xx.xx.xx
PREFIX=24
GATEWAY=xx.xx.xx.xy
DNS1=1xx.xx.xx.yy
DEVICE=em1
ONBOOT=yes

# systemctl disable NetworkManager.servcice
rm '/etc/systemd/system/network.target.wants/NetworkManager-wait-online.service'
rm '/etc/systemd/system/multi-user.target.wants/NetworkManager.service'
rm '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service'

で、代わりにnetworkを利用する

# systemctl enable network.service
network.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig network on

え? 逆にchkconfig使えってか。

# chkconfig network on
# init 6

アンチウイルスソフトの導入とかVNCの設定とかはまた別の機会に。