Nginxの最新版を入れる
2015.12.26 Sat
ようやくドメインを取得し、ラズパイをもう一台手に入れたので、こいつでWordpressを動かし、このブログをそっちにお引越ししたいと考えています。
ApacheにするかlighttpdにするかNginxにするか悩みましたが、どうも調べた限りではNginxがもっとも軽そうなのでこいつにします。
最新版は1.8.0です。ちょっと気持ち悪いので手動で入れなおそうと思います。
/tmp/nginxにソースパッケージを展開しコンパイルします。
nginx-debが何か悪さしてるっぽい?よくわからない。
言われるままにコマンドを打つ。依存関係の解消をするコマンドらしい。
さらに、ここでまだnginxが動いていることに気づく。
冬休み中に設定を終えてしまいたいですね…
Tweet
ApacheにするかlighttpdにするかNginxにするか悩みましたが、どうも調べた限りではNginxがもっとも軽そうなのでこいつにします。
sudo apt-get install nginx php5 mysql-server php5-fpm php5-mysql phpmyadmin chkconfigしかし、ここで入れたnginxのバージョンは1.2.1でした。
#勝手に入ってくるapache2を切る
sudo chkconfig apache2 off
最新版は1.8.0です。ちょっと気持ち悪いので手動で入れなおそうと思います。
#nginxのアンインストール
sudo apt-get remove nginx
#Nginxのリポジトリ追加
echo 'deb-src http://nginx.org/packages/debian/ wheezy nginx' | sudo tee -a /etc/apt/sources.list
#PGP公開キーを登録
wget http://nginx.org/keys/nginx_signing.key -O - | sudo apt-key add -
#GnuPGに登録
wget http://nginx.org/keys/nginx_signing.key -O - | gpg --no-default-keyring --keyring ~/.gnupg/trustedkeys.gpg --import -
/tmp/nginxにソースパッケージを展開しコンパイルします。
sudo apt-get update最後のインストールになってエラーが出ました。
sudo apt-get build-dep nginx
mkdir /tmp/nginx
cd /tmp/nginx
sudo apt-get source nginx
cd nginx-*
dpkg-buildpackage -uc -b
cd ..
#インストール
dpkg -i nginx_*~wheezy_armhf.deb
nginx-debが何か悪さしてるっぽい?よくわからない。
言われるままにコマンドを打つ。依存関係の解消をするコマンドらしい。
sudo apt-get -f installこれでもまだエラーが出る。今度はnginx-commonが妨害しているようだ。
さらに、ここでまだnginxが動いていることに気づく。
sudo service nginx stopもう一度インストールを試す
sudo apt-get remove nginx-common
$ dpkg -i nginx_*~wheezy_armhf.deb上手くいった。やったね。
(Reading database ... 82645 files and directories currently installed.)
Unpacking nginx (from nginx_1.8.0-1~wheezy_armhf.deb) ...
----------------------------------------------------------------------
Thanks for using nginx!
Please find the official documentation for nginx here:
* http://nginx.org/en/docs/
Commercial subscriptions for nginx are available on:
* http://nginx.com/products/
----------------------------------------------------------------------
Setting up nginx (1.8.0-1~wheezy) ...
Installing new version of config file /etc/nginx/scgi_params ...
Installing new version of config file /etc/nginx/fastcgi_params ...
Installing new version of config file /etc/nginx/koi-win ...
Installing new version of config file /etc/nginx/nginx.conf ...
Installing new version of config file /etc/nginx/koi-utf ...
Installing new version of config file /etc/nginx/win-utf ...
Installing new version of config file /etc/nginx/uwsgi_params ...
Installing new version of config file /etc/nginx/mime.types ...
Installing new version of config file /etc/init.d/nginx ...
Installing new version of config file /etc/logrotate.d/nginx ...
Installing new version of config file /etc/default/nginx ...
$nginx -v
nginx version: nginx/1.8.0
冬休み中に設定を終えてしまいたいですね…
スポンサーサイト
カテゴリー:RaspberryPi
Tweet