댓글 쓰기 권한이 없습니다. 로그인 하시겠습니까?
Add necessary repositories:
CentOS 5.x i386:
sudo rpm -ivh http://mirror.yandex.ru/epel/5/i386/epel-release-5-4.noarch.rpm sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpmCentOS 5.x x86_64:
sudo rpm -ivh http://mirror.yandex.ru/epel/5/x86_64/epel-release-5-4.noarch.rpm sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpmCentOS 6.x i386:
sudo rpm -ivh http://mirror.yandex.ru/epel/6/i386/epel-release-6-8.noarch.rpm sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpmCentOS 6.x x86_64:
sudo rpm -ivh http://mirror.yandex.ru/epel/6/x86_64/epel-release-6-8.noarch.rpm sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Create?/etc/yum.repos.d/nginx.repo?file and add:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1Save the file.
To install Nginx, PHP 5.3.10 and PHP-FPM run:
yum install nginx php php-fpm php-common
Install some PHP modules: PEAR (php-pear), PDO (php-pdo), MySQL (php-mysql), Memcache (php-pecl-memcache), Memcached (php-pecl-memcached), GD (php-gd), XML (php-xml), MBString (php-mbstring), MCrypt (php-mcrypt)
yum --enablerepo=remi install php-pecl-apc php-cli php-pear php-pdo php-mysql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml
Enable Nginx and PHP-FPM. You can do it this way:
/etc/init.d/nginx start /etc/init.d/php-fpm start
or this way:
service nginx start service php-fpm start
To start Nginx on boot:
chkconfig --add nginx chkconfig --levels 235 nginx on
To start PHP-FPM on boot:
chkconfig --add php-fpm chkconfig --levels 235 php-fpm on
Creating folders for our website and logs:
mkdir -p /home/web/www/howtounix.info/public_html mkdir /home/web/www/howtounix.info/logs chown -R nginx:nginx /home/web/www/howtounix.info
Create folders for virtual hosts:
mkdir /etc/nginx/sites-available mkdir /etc/nginx/sites-enabled
Add to?/etc/nginx/nginx.conf?file after "include /etc/nginx/conf.d/*.conf":
include /etc/nginx/sites-enabled/*;
Add virtual host. In?/etc/nginx/sites-available/?directory create the file named as your website. In our case it's howtounix.info, add:
server { server_name howtounix.info; access_log /home/web/www/howtounix.info/logs/access.log; error_log /home/web/www/howtounix.info/logs/error.log; root /home/web/www/howtounix.info/public_html; location / { index index.html index.htm index.php; } location ~ \.php$ { include /etc/nginx/fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/web/www/howtounix.info/public_html$fastcgi_script_name; } }
Create a symlink to the virtual host and restart Nginx:
cd /etc/nginx/sites-enabled/ ln -s /etc/nginx/sites-available/howtounix.info service nginx restart
Add the virtual host to?/etc/host?file:
127.0.0.1 localhost howtounix.infoIt will be the same pattern for an external IP address.
Check on Nginx and PHP-FPM. Create?index.php?file in?/home/web/www/howtounix.info/public_html/?directory and add:
<?php phpinfo(); ?>
Navigate your website in a browser to check how it works.
글쓴이 | 분류 | 제목 | 조회 수 |
---|---|---|---|
Luatic™ | WordPress | 워드프레스 3.9.1 기준 멀티사이트 옵션 켜기 | 1632 |
Luatic™ | WordPress | 워드프레스 브라우저 캐시 설정 | 1463 |
Luatic™ | WordPress | 워드프레스 속도, 성능 최적화하기 | 1780 |
Luatic™ | WordPress | 워드프레스 주소 변경 방법 | 859 |
merkava | WordPress | 워드프레스 최적화 | 1097 |
Luatic™ | WordPress | 워드프레스 최적화 #1 (작성중) 2 | 488 |
루아틱 | Linux | 웹소스 euc-kr 에서 utf-8 일괄변환(find, iconv 이용) | 14813 |
Omega3 | Etc | 웹페이지 가속 기술인 모드 페이지스피드(mod_pagespeed)를 이용한 순수한 속도 향상 | 3706 |
루아틱 | Etc | 윈도우 사용자 dns 캐시 초기화 명령 1 | 6630 |
고객지원 | XpressEngine | 유튜브와 같은 영상 쉽게 올리기. | 1782 |
루아틱 | PHP | 인덱스가 비어있을때.. 즉 public_html 하위에 빌더 또는 보드 설치시.. 1 | 2080 |
Luatic™ | MySQL | 자주 쓰는 MySQL 명령어 정리 | 2298 |
Luatic™ | WebServer | 크로스 브라우징을 위한 테스트 사이트 | 1040 |
YJSoft™ | Windows | 크롬 버전 37 업데이트 이후 영어 글자 간격이 이상하다면 2 | 2166 |
Luatic™ | Windows | 크롬에서 DNS 캐시 초기화하기 | 2514 |
Luatic™ | Windows | 티밍이란? 4 | 4885 |
cholalo | Windows | 파이어폭스 캐쉬 초기화하는 방법 | 3572 |
YJSoft | Etc | 편집기 사용시 팁 | 1989 |
merkava | Etc | 퓨니코드 변환하기 | 711 |
YJSoft | Etc | 하위 도메인에 티스토리/네이버 블로그 연결 | 3425 |
Luatic.co.kr
Copyright © 2010-2023 Luatic.co.kr기본적인 저작권은 루아틱에서 소유합니다. All rights reserved.