Windows system >> Windowsの知識 >  >> Linuxシステムチュートリアル >> LinuxシステムFAQ >> Azureクラウドへのnginx

Azureクラウドへのnginx

  
のインストールnginxをインストールする前に、まずlibeventをインストールすることができますlibeventをインストールする手順は次のとおりです:1. libeventのダウンロード:wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar。 Gz2。libeventの解凍:tar -zxvpf libevent-2.0.21-stable.tar.gz3解凍ディレクトリに移動:cd libevent-2.0.21-stable4インストールディレクトリの指定:./configure --prefix = /usr /local /libevent -2.0.215。libeventのインストール:makemake install6、nginxyumのインストール-y openssl * tar -xvf pcre-8.31.tar.gz -C /usr /local /tar -xvf nginx-1.4.2.tar.gzcd nginx-1.4 .2。/configure --with-http_ssl_module --prefix = /usr /local /nginx --with-pcre = /usr /local /pcre-8.31 --with-http_stub_status_modulepS:チーフコンパイルスクリプト1.121 /122yum -y install gcc自動作成autoconf libtool make./configure --prefix = /usr /local /nginx --with-http_stub_status_module --with-http_realip_module --with-http_gzip_static_module --with-http_ssl_module --with-http_ssl_module --with-pcre = /usr /local /pcre- 8.31 makemake install

7、コンパイルパラメータを表示します。

/usr /local /nginx /sbin /nginx -V
8、nginxアカウントを使用してsetcapを起動します。CAP_NET_BIND_SERVICE = + ep /usr /local /nginx /sbin /nginx最初にrootアカウントで/usr /local /nginx /sbin /nginxを実行してからnginxプロセスを強制終了し、nginxアカウントに切り替えてservice nginx restartまたは/usr /local /nginx /sbin /nginxを起動します。 nginxアカウントで9から始め、デバッグエラー[nginx @ lb_net_1〜] $ service nginx startstart nginxnginx:[emerg] bind()を0.0.0.0:80に失敗しました(13:権限が拒否されました)nginxは実行中です[nginx @ lb_net_1〜] $ [nginx @ lb_net_1〜] $ exitlogout [root @ lb_net_1 conf]#[root @ lb_net_1 conf]#sudo chown root:wheel /usr /local /nginx /sbin /nginx [root @ lb_net_1 conf]#sudo chmod u + s /usr /local /nginx /sbin /nginx [root @ lb_net_1 conf]#[root @ lb_net_1 conf]#su - nginx [[root @ lb_net_1 conf]#sudo chmod u + x /usr /local /nginx /sbin /nginx nginxアカウントを入力した後、それは正常に起動しました。zh-CN"],null,[0.98204631],zh-CN"]]]

Copyright © Windowsの知識 All Rights Reserved