댓글 쓰기 권한이 없습니다. 로그인 하시겠습니까?
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.
글쓴이 | 분류 | 제목 | 조회 수 |
---|---|---|---|
루아틱 | Apache | 사이트 복사 방지 .htaccess에 추가하세요 | 32622 |
루아틱 | Linux | 우분투 12.04 LTS Sever 윈도우에서 우분투로 원격 데스크탑(RDP) 사용하기 3 | 30352 |
루아틱 | Linux | Ubuntu 12.04 LTS Java7 설치시 오류 및 오류 해결법 | 30327 |
Luatic™ | Linux | 갤럭시 S3 에 Ubuntu Linux 설치하기 (영문) 3 | 27813 |
루아틱 | Apache | Apache 2 prefork 와 worker 차이 | 23702 |
루아틱 | Etc | ftp에서 passive와 active 모드의 차이? 2 | 22601 |
Luatic™ | PHP | 워드 프레스 사용시 piwik 쉽게 연동 하기 | 21817 |
루아틱 | Linux | 우분투 10.04 LTS, sendmail 설치 및 설정 3 | 21127 |
루아틱 | Etc | Byte(바이트) 와 bit(비트)의 차이 1 | 19783 |
Luatic™ | XpressEngine | 루아틱 서버 XE사용시 몇가지 팁 | 19375 |
루아틱 | Etc | html 색상표 | 18479 |
루아틱 | Etc | 돈한푼 안들이고 내 사이트 만들기 1탄 3 | 18382 |
루아틱 | MySQL | mysql DB 백업과 복구 | 17609 |
포인트 | Linux | 리눅스 특정확장자 하위디렉토리까지 일괄삭제하기 | 17374 |
루아틱 | Apache | 아파치2 에서 mod_cband 사용법 | 17236 |
루아틱 | PHP | SSL 보안서버인증 적용하기 - 웹호스팅 (XE) | 17139 |
루아틱 | Windows | Windows 2003에서 IIS 6.0 설치(SSL 설정 1) | 16767 |
Luatic™ | PHP | XE Cache 적용하기 | 16365 |
루아틱 | Linux | 우분투 시간 동기화 하기 | 16061 |
루아틱 | PHP | KimsQ RB로 홈페이지+모바일홈피 5분만에 만들기 1 | 15624 |
Luatic.co.kr
Copyright © 2010-2023 Luatic.co.kr기본적인 저작권은 루아틱에서 소유합니다. All rights reserved.