LS-GL ハックキット 2.0 Web サーバのインストール

LS-GL

ファームウェアが 1.11 になったことだし、 Movable Type もバージョンアップしたことだし(ん?) LS-GL にハックキットをきれいにいれ直す。

続いて Web サーバのインストール。

apache インストール

ude:~# apt-get install apache
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  apache-common apache2-utils libapr1 libaprutil1 libexpat1 libmagic1 libpq4 libsqlite3-0 lynx mime-support ucf
Suggested packages:
  apache-doc apache-ssl apache-perl file
Recommended packages:
  debconf-utils
The following NEW packages will be installed:
  apache apache-common apache2-utils libapr1 libaprutil1 libexpat1 libmagic1 libpq4 libsqlite3-0 lynx mime-support ucf
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 4483kB of archives.
After unpacking 12.9MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp2.jp.debian.org proposed-updates/main libmagic1 4.17-5etch2 [274kB]
Get:2 http://ftp2.jp.debian.org etch/main mime-support 3.39-1 [30.9kB]
Get:3 http://ftp2.jp.debian.org etch/main libexpat1 1.95.8-3.4 [57.1kB]
Get:4 http://ftp2.jp.debian.org etch/main libapr1 1.2.7-8.2 [105kB]
Get:5 http://ftp2.jp.debian.org proposed-updates/main libpq4 8.1.9-0etch1 [265kB]
Get:6 http://ftp2.jp.debian.org etch/main libsqlite3-0 3.3.8-1.1 [181kB]
Get:7 http://ftp2.jp.debian.org etch/main libaprutil1 1.2.7+dfsg-2 [65.7kB]
Get:8 http://ftp2.jp.debian.org proposed-updates/main apache2-utils 2.2.3-4+etch1 [345kB]
Get:9 http://ftp2.jp.debian.org etch/main ucf 2.0020 [57.7kB]
Get:10 http://ftp2.jp.debian.org etch/main lynx 2.8.5-2sarge2.2 [1864kB]
Get:11 http://ftp2.jp.debian.org etch/main apache-common 1.3.34-4.1 [845kB]
Get:12 http://ftp2.jp.debian.org etch/main apache 1.3.34-4.1 [391kB]
Fetched 4483kB in 23s (188kB/s)
Package configuration が起動し、 suExec を有効にするかを聞いてきたが、 デフォルトのまま No とした。
Selecting previously deselected package libmagic1.
(Reading database ... 11796 files and directories currently installed.)
Unpacking libmagic1 (from .../libmagic1_4.17-5etch2_arm.deb) ...
Selecting previously deselected package mime-support.
Unpacking mime-support (from .../mime-support_3.39-1_all.deb) ...
Selecting previously deselected package libexpat1.
Unpacking libexpat1 (from .../libexpat1_1.95.8-3.4_arm.deb) ...
Selecting previously deselected package libapr1.
Unpacking libapr1 (from .../libapr1_1.2.7-8.2_arm.deb) ...
Selecting previously deselected package libpq4.
Unpacking libpq4 (from .../libpq4_8.1.9-0etch1_arm.deb) ...
Selecting previously deselected package libsqlite3-0.
Unpacking libsqlite3-0 (from .../libsqlite3-0_3.3.8-1.1_arm.deb) ...
Selecting previously deselected package libaprutil1.
Unpacking libaprutil1 (from .../libaprutil1_1.2.7+dfsg-2_arm.deb) ...
Selecting previously deselected package apache2-utils.
Unpacking apache2-utils (from .../apache2-utils_2.2.3-4+etch1_arm.deb) ...
Selecting previously deselected package ucf.
Unpacking ucf (from .../archives/ucf_2.0020_all.deb) ...
Moving old data out of the way
Selecting previously deselected package lynx.
Unpacking lynx (from .../lynx_2.8.5-2sarge2.2_arm.deb) ...
Selecting previously deselected package apache-common.
Unpacking apache-common (from .../apache-common_1.3.34-4.1_arm.deb) ...
Selecting previously deselected package apache.
Unpacking apache (from .../apache_1.3.34-4.1_arm.deb) ...
Setting up libmagic1 (4.17-5etch2) ...

Setting up mime-support (3.39-1) ...

Setting up libexpat1 (1.95.8-3.4) ...

Setting up libapr1 (1.2.7-8.2) ...

Setting up libpq4 (8.1.9-0etch1) ...

Setting up libsqlite3-0 (3.3.8-1.1) ...

Setting up libaprutil1 (1.2.7+dfsg-2) ...

Setting up apache2-utils (2.2.3-4+etch1) ...
Setting up ucf (2.0020) ...

Setting up lynx (2.8.5-2sarge2.2) ...

Setting up apache-common (1.3.34-4.1) ...

Setting up apache (1.3.34-4.1) ...

Creating config file /etc/apache/httpd.conf with new version

Creating config file /etc/apache/srm.conf with new version

Creating config file /etc/apache/access.conf with new version

Creating config file /etc/apache/modules.conf with new version
Starting apache 1.3 web server....

ude:~#

apache の設定変更

Vine の頃は /home/httpd/{html,cgi-bin} だったのでそれに合わせる。
ude:~# cd /etc/apache/
ude:/etc/apache# mv httpd.conf httpd.conf.orig
ude:/etc/apache# cp httpd.conf.orig httpd.conf
ude:/etc/apache# vi httpd.conf
	:
	:
ude:/etc/apache# diff -c httpd.conf.orig httpd.conf
*** httpd.conf.orig     Sat Aug 25 21:19:20 2007
--- httpd.conf  Sat Aug 25 21:32:42 2007
***************
*** 273,285 ****
  ServerName localhost
  #
  #ServerName new.host.name

  #
  # DocumentRoot: The directory out of which you will serve your
  # documents. By default, all requests are taken from this directory, but
  # symbolic links and aliases may be used to point to other locations.
  #
! DocumentRoot /var/www

  #
  # Each directory to which Apache has access, can be configured with respect
--- 273,287 ----
  ServerName localhost
  #
  #ServerName new.host.name
+ ServerName ude.yamasita.jp

  #
  # DocumentRoot: The directory out of which you will serve your
  # documents. By default, all requests are taken from this directory, but
  # symbolic links and aliases may be used to point to other locations.
  #
! #yasunari     DocumentRoot /var/www
! DocumentRoot /home/httpd/html

  #
  # Each directory to which Apache has access, can be configured with respect
***************
*** 304,310 ****
  #
  # This should be changed to whatever you set DocumentRoot to.
  #
! 

  #
  # This may also be "None", "All", or any combination of "Indexes",
--- 306,313 ----
  #
  # This should be changed to whatever you set DocumentRoot to.
  #
! #yasunari     
! 

  #
  # This may also be "None", "All", or any combination of "Indexes",
***************
*** 585,597 ****
  # Alias.
  #
  
!     ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

  #
  # "/usr/lib/cgi-bin" could be changed to whatever your ScriptAliased
  # CGI directory exists, if you have that configured.
  #
!     
          AllowOverride None
          Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
          Order allow,deny
--- 588,602 ----
  # Alias.
  #
  
! #yasunari    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
!     ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/

  #
  # "/usr/lib/cgi-bin" could be changed to whatever your ScriptAliased
  # CGI directory exists, if you have that configured.
  #
! #yasunari    
!     
          AllowOverride None
          Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
          Order allow,deny
***************
*** 903,909 ****
  # If the perl module is installed, this will be enabled.
  
    
!    Alias /perl/ /var/www/perl/
    
    
      SetHandler perl-script
--- 908,915 ----
  # If the perl module is installed, this will be enabled.
  
    
! #yasunari   Alias /perl/ /var/www/perl/
!    Alias /perl/ /home/httpd/html/perl/
    
    
      SetHandler perl-script
ude:/etc/apache#
外向きにするなら、その他いろいろ変更が必要であるが、、、

httpd.conf のリロード

ude:~# /etc/init.d/apache reload
Reloading apache 1.3 configuration....
ude:~#

ディレクトリの作成

実体は /mnt に作る
ude:~# mv /home /mnt/home
ude:~# ln -s /mnt/home /home
ude:~# mkdir /mnt/home/httpd

コンテンツのコピー

www.yamasita.jp からコンテンツをコピーする。
コンテンツは毎日バックアップが取ってあるので、 そのバックアップをリストアする。
ude:/# tar zxvf /tmp/ns-httpd.Sat.tar.gz
	:

確認

http://ude.yamasita.jp へアクセスできることを確認する。
Hack BBS もそのまま動いているようだ。

LS-160GL
楽天市場
Amazon
Yahoo!ショッピング
ソフマップ
ツクモネットショプ
livedoor デパート
ドスパラ


LS-GL ハックキット 2.0 メールの設定
ハックの記録
LinkStation/玄箱 をハックしよう

LS-GL ハックキット 2.0 MySql のインストール

Copyright (C) 2003-2007 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市