Quantcast
Channel: しのぶら!!! » sawanoboly
Viewing all articles
Browse latest Browse all 15

SmartOSでpkginに近づけたNginxをビルド

$
0
0

SmartOSのpkginで導入できるNginxはdebugOptionが無効だ。

ちょっとRewrite系の設定を確認したい時なんかはエラーログをdebugにしたいので、近しいバージョンを

Pkgin版のコンフィグオプションを確認する

nginx -V

# ./nginx_110 -V
nginx: nginx version: nginx/1.0.10
nginx: TLS SNI support enabled
nginx: configure arguments:
 --user=www
 --group=www
 --with-ld-opt='-L/opt/local/lib -Wl,-R/opt/local/lib'
 --prefix=/opt/local
 --sbin-path=/opt/local/sbin
 --conf-path=/opt/local/etc/nginx/nginx.conf
 --pid-path=/var/db/nginx/nginx.pid
 --lock-path=/var/db/nginx/nginx.lock
 --error-log-path=/var/log/nginx/error.log
 --http-log-path=/var/log/nginx/access.log
 --http-client-body-temp-path=/var/db/nginx/client_body_temp
 --http-proxy-temp-path=/var/db/nginx/proxy_temp
 --http-fastcgi-temp-path=/var/db/nginx/fstcgi_temp
 --with-mail_ssl_module
 --with-http_ssl_module
 --with-http_dav_module
 --with-http_realip_module
 --with-ipv6
 --with-http_stub_status_module

debugを有効にしたコンフィグオプション

ビルド前にpkginでgcc-compilergmakeを入れておく。

# ./objs/nginx -V
nginx version: nginx/1.0.15
built by gcc 4.6.2 (GCC) 
TLS SNI support enabled
configure arguments:
 --user=www
 --group=www
 --with-ld-opt='-m64 -L/opt/local/lib -Wl,-R/opt/local/lib'
 --prefix=/opt/local
 --sbin-path=/opt/local/sbin
 --conf-path=/opt/local/etc/nginx/nginx.conf
 --pid-path=/var/db/nginx/nginx.pid
 --lock-path=/var/db/nginx/nginx.lock
 --error-log-path=/var/log/nginx/error.log
 --http-log-path=/var/log/nginx/access.log
 --http-client-body-temp-path=/var/db/nginx/client_body_temp
 --http-proxy-temp-path=/var/db/nginx/proxy_temp
 --http-fastcgi-temp-path=/var/db/nginx/fstcgi_temp
 --with-mail_ssl_module
 --with-http_ssl_module
 --with-http_dav_module
 --with-http_realip_module
 --with-ipv6
 --with-http_stub_status_module
 --with-debug
 --with-cc-opt='-m64 -I/opt/local/include'

SmartOS64用にwith-ld-optを編集、 with-cc-opt, with-debug を追加した、これでデバッグ出力可に。


Viewing all articles
Browse latest Browse all 15

Trending Articles