Qiita試しに備忘録
■ユーザー設定
adduser hoge
passwd hoge
pass_fuga
■sudo設定
visudo
//末尾挿入
hoge ALL=(ALL) ALL
■SSH
vi /etc/ssh/sshd_config
Port 12222
PermitRootLogin no
/etc/init.d/sshd restart
■yumアップ
sudo yum update
■火壁
vim /etc/sysconfig/iptables
//////
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:SERVICES - [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/s --limit-burst 4 -j ACCEPT
-A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp -m state --state NEW -j SERVICES
-A INPUT -p udp --sport 53 -j ACCEPT
-A INPUT -p udp --sport 123 --dport 123 -j ACCEPT
-A SERVICES -p tcp --dport 12222 -j ACCEPT
-A SERVICES -p tcp --dport 80 -j ACCEPT
-A SERVICES -p tcp --dport 443 -j ACCEPT
COMMIT
/////
service iptables restart
■アパッチ
sudo yum install httpd
sudo /etc/rc.d/init.d/httpd start
sudo /sbin/chkconfig httpd on
DocumentRoot "/var/www/html"
■パーミッション
sudo chown hoge /var/www/html