Windows10をUbuntuのコマンドで操作する! 軽量なWEBサーバのインストール!(lighttpd)

スポンサーリンク

コンテンツ

bash on Windows10を使用できるようにする方法と注意事項は、以下の記事にまとめてあります!正式名称は「bash on Ubuntu on Windows10」です。

Windows10をUbuntuのコマンドで操作する! 1.使えるように準備をする(開発者モードを有効にする)!

64ビット版 Windows10のインストール「bash on Windows10」と呼ばれている機能です。2016年5月現在、ベータ版です。Windows10インサイダー プレビュー版が必要です。通常のWindows10では利用できません

Windows10をUbuntuのコマンドで操作する! 2.「bash on Windows10」を有効にする!

「bash on Windows10」のインストール2016年5月現在、ベータ版です。Windows10インサイダー プレビュー版が必要です。通常のWindows10では利用できません。また、64ビット版Windows10でないと使用できま

Windows10をUbuntuのコマンドで操作する! 3.「bash on Windows10」のインストール!

「bash on Windows10」のインストール2016年5月現在、ベータ版です。Windows10インサイダー プレビュー版が必要です。通常のWindows10では利用できません。また、64ビット版Windows10でないと使用できま

Windows10をUbuntuのコマンドで操作する! 4.bash on Windows10(ばっしゅ おん うぃんどうずてん)を起動する!

前回までの記事この記事はbash on Windows10を使えるようにするまでの記事の4番目です。1-3番目の記事は以下をどうぞ!bash on Windows10の起動bash on Windows10を起動するには以下のようにします。

軽量なWEBサーバのインストール

「bash on Windows10」で軽量なWEBサーバをインストールするには、以下のコマンドを実行します

 sudo apt-get remove lighttpd

それでは実行してみましょう。

t@DESKTOP-1QGFR8O:~$ sudo apt-get install lighttpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apache2-bin apache2-data fontconfig-config fonts-dejavu-core libapr1
  libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libfontconfig1
  libfreetype6 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libtiff5 libvpx1
  libxpm4 libxslt1.1 nginx-common nginx-core os-prober php5-cli php5-readline
  ssl-cert
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  gamin libgamin0 libterm-readkey-perl libterm-readline-perl-perl spawn-fcgi
Suggested packages:
  rrdtool apache2-utils
The following NEW packages will be installed:
  gamin libgamin0 libterm-readkey-perl libterm-readline-perl-perl lighttpd
  spawn-fcgi
0 upgraded, 6 newly installed, 0 to remove and 25 not upgraded.
Need to get 378 kB of archives.
After this operation, 1,622 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/universe libgamin0 amd64 0.1.10-4.1ubuntu1 [16.4 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty/universe gamin amd64 0.1.10-4.1ubuntu1 [41.1 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main libterm-readkey-perl amd64 2.31-1 [27.4 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty/universe libterm-readline-perl-perl all 1.0303-1 [51.9 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty/universe lighttpd amd64 1.4.33-1+nmu2ubuntu2 [227 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ trusty/universe spawn-fcgi amd64 1.6.3-1 [14.0 kB]
Fetched 378 kB in 3s (98.7 kB/s)
E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)
Selecting previously unselected package libgamin0.
(Reading database ... 27550 files and directories currently installed.)
Preparing to unpack .../libgamin0_0.1.10-4.1ubuntu1_amd64.deb ...
Unpacking libgamin0 (0.1.10-4.1ubuntu1) ...
Selecting previously unselected package gamin.
Preparing to unpack .../gamin_0.1.10-4.1ubuntu1_amd64.deb ...
Unpacking gamin (0.1.10-4.1ubuntu1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.31-1_amd64.deb ...
Unpacking libterm-readkey-perl (2.31-1) ...
Selecting previously unselected package libterm-readline-perl-perl.
Preparing to unpack .../libterm-readline-perl-perl_1.0303-1_all.deb ...
Unpacking libterm-readline-perl-perl (1.0303-1) ...
Selecting previously unselected package lighttpd.
Preparing to unpack .../lighttpd_1.4.33-1+nmu2ubuntu2_amd64.deb ...
Unpacking lighttpd (1.4.33-1+nmu2ubuntu2) ...
Selecting previously unselected package spawn-fcgi.
Preparing to unpack .../spawn-fcgi_1.6.3-1_amd64.deb ...
Unpacking spawn-fcgi (1.6.3-1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
WARN: / is group writable!
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libterm-readkey-perl (2.31-1) ...
Setting up libterm-readline-perl-perl (1.0303-1) ...
Setting up spawn-fcgi (1.6.3-1) ...
update-alternatives: using /usr/bin/spawn-fcgi.standalone to provide /usr/bin/spawn-fcgi (spawn-fcgi) in auto mode
update-alternatives: warning: not replacing /usr/share/man/man1/spawn-fcgi.1.gz with a link
Setting up gamin (0.1.10-4.1ubuntu1) ...
Setting up libgamin0 (0.1.10-4.1ubuntu1) ...
Setting up lighttpd (1.4.33-1+nmu2ubuntu2) ...
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
WARN: / is group writable!
Processing triggers for ureadahead (0.100.0-16) ...

バージョンを確認してみます

t@DESKTOP-1QGFR8O:~$ lighttpd -v
lighttpd/1.4.33 (ssl) - a light and fast webserver
Build-Date: Jan 28 2014 17:26:04

バージョン1.4.33のようです。