티스토리 뷰
Apache가 대중적으로 많이 사용되고 있지만 요즘 가벼운 웹 서비스를
구축할려는 수요가 많이 보여진다.
NGINX 를 설치해보았다.
다운로드
wget http://nginx.org/download/nginx-1.1.8.tar.gz
|
설치
설치전 필요패키지
yum install pcre* make
tar xvfz nginx-1.1.8.tar.gz ./configure --prefix=/usr/local/nginx && make && make install |
http://wiki.nginx.org/RedHatNginxInitScript 사이트에서 스크립트 파일 내용 복사해서
vim /etc/init.d/nginx 에 붙여넣기
nginx 첨부파일 참조
chmod 700 /etc/init.d/nginx |
wget http://kr2.php.net/get/php-5.2.14.tar.bz2/from/kr.php.net/mirror |
wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz |
Forcing buildconf
buildconf: checking installation...
buildconf: autoconf not found.
You need autoconf version 2.13 or newer installed
to build PHP from CVS.
make: *** [buildmk.stamp] Error 1
위 에러 발생시
[root@localhost php-5.2.17]# yum install autoconf
|
[root@localhost php-5.2.17]# ./buildconf --force
Forcing buildconf
buildconf: checking installation...
buildconf: autoconf version 2.63 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
Running vcsclean for you.
To avoid this, install autoconf-2.13.
Can't figure out your VCS, not cleaning.
위 에러 발생시
yum install autoconf213
|
nginx 컴파일
./configure --prefix=/usr/local/php-fpm --enable-fastcgi --enable-fpm --with-libevent --enable-mod-charset --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-libxml-dir --with-openssl --with-zlib --with-zlib-dir --with-bz2 --enable-calendar --with-curl --enable-dba --with-gdbm --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-imap --with-imap-ssl --with-kerberos --enable-mbstring --with-mhash --with-mcrypt --with-mysql=/usr/local/mysql --with-mysqli --enable-sockets --with-regex=php --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-zendmultibyte && make && make install |
디폴트 스크립트 복사
cp /usr/local/php-fpm/sbin/php-fpm /etc/init.d/
현재 설정과 시스템에 맞게 스크립트 내용 변경
vi /etc/init.d/php-fpm
chkconfig --add php-fpm
vi /usr/local/php-fpm/etc/php-fpm.conf
(아래부분 설정내용 확인)
<value name="owner">nobody</value> |
/etc/init.d/php-fpm start
vi /usr/local/nginx/conf/nginx.conf (아래 설정 내용 확인)
location ~ \.php$ { |
cp php.ini-recommended /usr/local/php-fpm/lib/php.ini
echo '<?php phpinfo(); ?>' > /usr/local/nginx/html/index.php
nginx 시작
/etc/init.d/nginx restart
'Linux' 카테고리의 다른 글
dnssec (0) | 2015.05.20 |
---|---|
네임서버(nameserver) 셋팅 및 운영 (0) | 2015.05.20 |
Fodora18 설치 이후 커스터마이징 (이더넷 이름 등...) (0) | 2015.04.29 |
CentOS 6.X 에 SSH2 extension for PHP 설치하기 (0) | 2015.04.24 |
ab tools (웹성능 퍼포먼스 테스팅) (0) | 2015.04.24 |
- Total
- Today
- Yesterday
- gitlab
- pptp
- 베이어다이나믹
- SSL
- L2TP
- virtualbox
- IPSEC
- iptables
- galera
- cURL
- mod_security
- softether
- MySQL
- kvm
- mariadb
- GeoIP
- ssh
- OpenVPN
- 리눅스
- WAF
- 인증서
- centOS7
- php
- HAProxy
- glusterfs
- ntp
- yum
- centos8
- Apache
- NGINX
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |