Skip to content

웹호스팅을 위한 ubuntu 설정 방법

$sudo apt-get install curl libcurl3 libcurl3-dev php5-curl expect
apt-get install g++ libkrb5-dev make imagemagick
apt-get install ntpd

$dpkg-reconfigure tzdata

PHP

php.ini max upload 20M
#OS
/etc/sysctl.conf
vm.swappiness = 10
vm.vfs_cache_pressure = 50

권한 설정

System Setting
echo “############################################################”
echo ” System Setting”
echo “############################################################”
echo “”
chmod 400 /var/tmp
chmod 700 /proc
chmod 700 /root
chmod 701 /bin /boot /dev /home /lib /mnt /opt /sbin
chmod 755 /var /usr
chmod 777 /tmp
chmod 701 /home
chmod 707 /backup
# change Permission system binary
echo “############################################################”
echo ” Change Permission system binary”
echo “############################################################”
echo “”
chmod 700 /bin/ps
chmod 700 /bin/df
chmod 700 /bin/ping
chmod 700 /bin/mount
#chmod 700 /usr/bin/mail
chmod 700 /bin/umount
chmod 700 /bin/netstat
chmod 700 /usr/bin/users
#chmod 700 /usr/bin/at
chmod 700 /usr/bin/gpg
chmod 700 /usr/bin/gcc
chmod 700 /usr/bin/ssh
chmod 700 /usr/bin/top
chmod 700 /usr/bin/chsh
chmod 700 /usr/bin/free
chmod 700 /usr/bin/chage
chmod 700 /usr/bin/newgrp
chmod 700 /usr/bin/nslookup
chmod 700 /usr/bin/passwd
chmod 700 /usr/bin/vmstat
chmod 700 /usr/bin/crontab
chmod 700 /usr/bin/gpasswd
#chmod 700 /usr/bin/procmail
chmod 700 /usr/bin/c++
#chmod 700 /usr/bin/ftpwho
chmod 700 /usr/bin/whoami
#chmod 700 /usr/bin/finger
chmod 700 /usr/bin/pstree
chmod 700 /usr/bin/whereis
chmod 700 /usr/bin/cc
chmod 700 /usr/bin/make
#chmod 700 /usr/bin/rlog
chmod 700 /usr/bin/rlogin
chmod 700 /usr/bin/which
chmod 700 /usr/bin/who
chmod 700 /usr/bin/w
chmod 700 /usr/bin/wget
chmod 700 /usr/bin/host
 echo 60 > /proc/sys/net/ipv4/tcp_keepalive_time
 echo 20 > /proc/sys/net/ipv4/tcp_keepalive_probes
 echo 60 > /proc/sys/net/ipv4/tcp_keepalive_intvl
Published inLinux