CentOS 用コピペメモ

CentOS 用コピペメモ

社で使ってるからとりあえず把握するために vm で動かすだけ用の適当設定。

tmux

yum install wget gcc make ncurses ncurses-devel
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure
make
make install
echo /usr/local/lib > /etc/ld.so.conf.d/libevent.conf
ldconfig
cd ../
wget http://downloads.sourceforge.net/tmux/tmux-1.8.tar.gz
tar xvzf tmux-1.8.tar.gz
cd tmux-1.8
./configure
make
make install

samba

[global]
unix charset = UTF-8
dos charset = CP932

hosts allow = 127. 192.168.

security = share oplocks = no

[www] path = /var/www writable = yes guest ok = yes guest only = yes create mode = 0777 directory mode = 0777 share modes = yes oplocks = no

SELinuxsamba 用にアレする。

setsebool -P samba_enable_home_dirs true
setsebool -P samba_export_all_rw true

iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A INPUT -p tcp --dport 80 -j ACCEPT

あとはいつも通り適当に必要なものを。