처음에는 그냥 yum으로 설치하려 했는데 일이 커졌다ㅋ
sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-3.noarch.rpm
에러로그를 보니 eventfd() failed...
yum으로 nginx를 설치하면 --with-file-aio 옵션이 들어가는데 이를 지원하려면 커널이 FreeBSD 4.3+, Linux 2.6.22+ 이어야함
설치는 했는데 문제는 서버 실행과 중지가 너무 힘들다
sudo /usr/local/sbin/nginx
sudo kill `cat /usr/local/nginx/logs/nginx.pid`
다음과 같은 /etc/init.d/nginx 파일을 생성했다.
# nginx - this script starts and stops the nginx daemin
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# config: /usr/local/nginx/conf/nginx.conf
# pidfile: /usr/local/nginx/logs/nginx.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
nginx="/usr/local/sbin/nginx"
NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"
lockfile=/var/lock/subsys/nginx
[ -f $NGINX_CONF_FILE ] || exit 6
echo -n $"Starting $prog: "
daemon $nginx -c $NGINX_CONF_FILE
[ $retval -eq 0 ] && touch $lockfile
echo -n $"Stopping $prog: "
[ $retval -eq 0 ] && rm -f $lockfile
echo -n $"Reloading $prog: "
$nginx -t -c $NGINX_CONF_FILE
rh_status >/dev/null 2>&1
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
이제 yum으로 설치했을때 처럼 사용할 수 있다!!!
sudo /etc/init.d/nginx (start, stop, restart, reload, status, configtest)