Tengine-2.1.0のインストールと構成



※依存ライブラリ:
PCRE
OpenSSL
Zlib
jemalloc
※取り付け方法:
Linuxで解凍し、実行:
./configure
make
make install
 
一、ライブラリファイル
 
tar -jxvfjemalloc-3.6.0.tar.bz2 -C/usr/local/src
sudo apt-get installopenssl libssl-dev
tar -jxvfpcre-8.36.tar.bz2 -C/usr/local/src
tar -xvfzlib-1.2.8.tar.gz -C/usr/local/src
 
wgethttp://tengine.taobao.org/download/tengine-2.1.0.tar.gz
tar -zxvftengine-2.1.0.tar.gz
cd tengine-2.1.0
二、tengine-2.1.0インストール
tengine-2.1.0のルートディレクトリで実行します.
        ./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/src/pcre-8.36--with-jemalloc=/usr/local/src/jemalloc-3.6.0 --with-http_gzip_static_module--with-http_realip_module --with-http_stub_status_module--with-http_concat_module --with-zlib=/usr/local/src/zlib-1.2.8 --user=elvis --group=elvis
'--user=elvis--group=elvis'は書かないでください
注意構成時–with-pcre、–with-openssl、–with-jemalloc、–with-zlibのパスはソースファイルのパスです
    make
    make install
三、配置
 
 
nginxを開きます.confプロファイルの後、最も基礎的なのは以下のいくつかの場所の修正をする必要があります(/usr/local/nginx/conf/nginx.conf)
 
 
--user=elvis
#   CPU            
worker_processes auto;
#         ,    
error_log/home/jason/BigDisk/nginx/error.log;
#  gzip  
gzip on
server {
       #       server(default    ip  servername                server)
       listen      80 default;
       #       
       root /home/jason/Work/nginx-default;
       location / {
           index index.php index.html index.htm;
       }
       #      
       error_page  500 502 503 504 /50x.html;
       location = /50x.html {
           root  html;
       }
       #   php-fpm
       location ~ \.php$ {
           fastcgi_pass  unix:/var/run/php-fpm.socket;
           fastcgi_index index.php;
           fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
           include       fastcgi_params;
       }
   }

 
 
 
#他のvhostプロファイルを参照
include vhost/*.conf;
四、起動
 
wget --no-check-certificate 'http://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx'-O/etc/init.d/nginx
chmod 777/etc/init.d/nginx
/etc/init.d/nginxstart
ブラウザはホストipを入力してアクセスできます
 
途中で問題があったら、いつでも私に聞いてください.