LinodeでCentOS初期設定
初期設定
vimの設定
# alias vi="vim" 必要ならば下記を実行. via : vim の文字コード自動認識用設定 http://www.kawaz.jp/pukiwiki/index.php?vim#cb691f26
# yum -y install yum-fastestmirror # yum -y install sudo => sudoくらい入れておいても.. # visudo -# %wheel ALL=(ALL) NOPASSWD: ALL +%wheel ALL=(ALL) NOPASSWD: ALL => パスワードを入れたければ NOPASSWD では無い方をコメントアウト. # yum -y install wget => wgetくらい入れてくれてても.. # yum -y install rpm-build => これが無いとrpmインストールできないパッケージ有 # yum -y install yum-priorities # vim /etc/yum.repos.d/CentOS-Base.repo [base], [updates], [addons], [extras] +priority=1 [centosplus] +priority=5 # cd /usr/local/src # wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm # wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm => だめならこっち # rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt # rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm # rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm # vim /etc/yum.repos.d/rpmforge.repo [rpmforge] enabled = 0 使う時は下記の要領. "--enablerepo=rpmforge" を付ける. yum --enablerepo=rpmforge -y install perl-Module-Build
iptablesの設定
まずはiptablesということで下記を参照。したところエラーとなった。
http://centossrv.com/iptables.shtml
# ./iptables.sh Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: raw nat mangle filter [ OK ] Unloading iptables modules: [ OK ] Saving firewall rules to /etc/sysconfig/iptables: [ OK ] Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: raw nat mangle filter [ OK ] Unloading iptables modules: [ OK ] Applying iptables firewall rules: [ OK ] Loading additional iptables modules: ip_conntrack_netbios_ns [FAILED] モジュールが無い模様. iptables に netbios なんて名前の付くモジュールがあることを初めて知る. 必要なさそうなので使用先を確認. # fgrep -i 'ip_conntrack_netbios_ns' /etc/sysconfig/iptables* /etc/sysconfig/iptables-config:IPTABLES_MODULES="ip_conntrack_netbios_ns" ビンゴ. とりあえず外しておく. #IPTABLES_MODULES="ip_conntrack_netbios_ns" IPTABLES_MODULES="" 再実行したところok. # ./iptables.sh Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: raw nat mangle filter [ OK ] Unloading iptables modules: [ OK ] Saving firewall rules to /etc/sysconfig/iptables: [ OK ] Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: raw nat mangle filter [ OK ] Unloading iptables modules: [ OK ] Applying iptables firewall rules: [ OK ]