・ Web系SE募集 (技術開発部開発系エンジニア・Java/Tomcat 420万円~750万円)
   ・ 社内SE募集 (業務系システムの開発・社内イントラ)

2008年9月アーカイブ

CPANシェルで mod_perl2 をインストールする。」からの続き。


libapreq2 も同じように、CPANシェルからインストールする。

CPANシェルを起動後、Makefile.PL にのパラメータを設定する。

$ cpan
CPAN: File::HomeDir loaded ok (v0.80)

cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support enabled

cpan[1]> o conf init makepl_arg
Every Makefile.PL is run by perl in a separate process. Likewise we
run 'make' and 'make install' in separate processes. If you have
any parameters (e.g. PREFIX, LIB, UNINST or the like) you want to
pass to the calls, please specify them here.

If you don't understand this question, just press ENTER.

Typical frequently used settings:

    PREFIX=~/perl    # non-root users (please see manual for more hints)

 
Parameters for the 'perl Makefile.PL' command? [] --with-expat=/usr/local/apache2



Please remember to call 'o conf commit' to make the config permanent!


cpan[2]> o conf makepl_arg
    makepl_arg         [--with-expat=/usr/local/apache2]
Type 'o conf' to view all configuration items


cpan[3]>

一次的な設定なので、'o conf commit' はしない。


Makefile.PL にのパラメータを設定しないでインストールすると、次の様にエラーとなりインストールは出来ない。

 cpan[1]> install J/JO/JOESUF/libapreq2-2.08.tar.gz
CPAN: Storable loaded ok (v2.18)
Going to read /home/suzu/.cpan/Metadata
  Database was generated on Mon, 22 Sep 2008 18:02:49 GMT
CPAN: LWP::UserAgent loaded ok (v5.814)
CPAN: Time::HiRes loaded ok (v1.9711)

I would like to connect to one of the following sites to get 'authors/01mailrc.txt.gz':

 http://www.perl.org/CPAN/
 ftp://ftp.perl.org/pub/CPAN/

Is it OK to try to connect to the Internet? [yes]
Fetching with LWP:
  http://www.perl.org/CPAN/authors/01mailrc.txt.gz
CPAN: YAML loaded ok (v0.66)
Going to read /home/suzu/.cpan/sources/authors/01mailrc.txt.gz
Going to read /home/suzu/.cpan/build/
........................
(省略)

---- Unsatisfied dependencies detected during ----
----       JOESUF/libapreq2-2.08.tar.gz       ----
    ExtUtils::XSBuilder [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
(省略)

---- Unsatisfied dependencies detected during ----
----  GRICHTER/ExtUtils-XSBuilder-0.28.tar.gz ----
    Tie::IxHash [requires]
    Parse::RecDescent [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
(省略)

Checking if your kit is complete...
Looks good
Writing Makefile for Tie::IxHash
cp lib/Tie/IxHash.pm blib/lib/Tie/IxHash.pm
Manifying blib/man3/Tie::IxHash.3
  GSAR/Tie-IxHash-1.21.tar.gz
  /usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/ixhash....ok
All tests successful.
Files=1, Tests=25,  0 wallclock secs ( 0.04 usr  0.05 sys +  0.01 cusr  0.02 csys =  0.12 CPU)
Result: PASS
  GSAR/Tie-IxHash-1.21.tar.gz
  /usr/bin/make test -- OK
Running make install
Prepending /home/suzu/.cpan/build/Tie-IxHash-1.21-Wkktf5/blib/arch /home/suzu/.cpan/build/Tie-IxHash-1.21-Wkktf5/blib/lib to PERL5LIB for 'install'
Password:
(省略)

/usr/bin/ld: cannot find -lexpat
collect2: ld returned 1 exit status
make[2]: *** [test_cgi] Error 1
make[2]: Leaving directory `/home/suzu/.cpan/build/libapreq2-2.08-q8E5Li/module'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/suzu/.cpan/build/libapreq2-2.08-q8E5Li/module'
make: *** [all-recursive] Error 1
  JOESUF/libapreq2-2.08.tar.gz
  /usr/bin/make -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
Failed during this command:
 JOESUF/libapreq2-2.08.tar.gz                 : make NO

cpan[2]> bye
Lockfile removed.

この様になった場合、もう一度インストールする前に、次のようにして make clean する。
そうしないと、インストール出来ない。

cpan[3]> clean J/JO/JOESUF/libapreq2-2.08.tar.gz

libapreq2 をインストールする。

cpan[3]> install J/JO/JOESUF/libapreq2-2.08.tar.gz
CPAN: Storable loaded ok (v2.18)
Going to read /home/suzu/.cpan/Metadata
  Database was generated on Sat, 27 Sep 2008 18:26:49 GMT
CPAN: YAML loaded ok (v0.66)
Going to read /home/suzu/.cpan/build/
............................................................................DONE
Found 17 old builds, restored the state of 17
Running make for J/JO/JOESUF/libapreq2-2.08.tar.gz

  CPAN.pm: Going to build J/JO/JOESUF/libapreq2-2.08.tar.gz

perl: 5.10.0 ok
mod_perl2: 2.000004 ok
Apache::Test: 1.31 ok
ExtUtils::MakeMaker: 6.44 ok
ExtUtils::XSBuilder: 0.28 ok
Test::More: 0.8 ok
./configure --enable-perl-glue --with-expat="/usr/local/apache2" --with-apache2-apxs="/usr/local/apache2/bin/apxs" --with-perl="/usr/local/bin/perl"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
(省略)
waiting 60 seconds for server to start: ..
waiting 60 seconds for server to start: ok (waited 0 secs)
server localhost.localdomain:8529 started
t/api/cookie.........ok
t/api/error..........ok
t/api/module.........ok
t/api/param..........ok
t/apreq/big_input....ok
t/apreq/cgi..........ok
t/apreq/cookie.......ok
t/apreq/inherit......ok
t/apreq/request......ok
t/apreq/upload.......ok
All tests successful.
Files=10, Tests=191, 40 wallclock secs ( 2.79 usr  0.02 sys + 11.79 cusr 14.36 csys = 28.96 CPU)
Result: PASS
[warning] server localhost.localdomain:8529 shutdown
pod2test was not found, skipping inlined tests
make[1]: Leaving directory `/home/suzu/.cpan/build/libapreq2-2.08-q8E5Li/glue/perl'
  JOESUF/libapreq2-2.08.tar.gz
  /usr/bin/make test -- OK
Running make install
Prepending /home/suzu/.cpan/build/libapreq2-2.08-q8E5Li/blib/arch /home/suzu/.cpan/build/libapreq2-2.08-q8E5Li/blib/lib to PERL5LIB for 'install'
Password:
(省略)

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/apache2/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------


(省略)
----------------------------------------------------------------------
Before you can use mod_apreq2, you must ensure that an appropriate
"LoadModule" line appears in your webserver's config file:
/usr/local/apache2/conf/httpd.conf

LoadModule apreq_module    /usr/local/apache2/modules/mod_apreq2.so
----------------------------------------------------------------------

(省略)
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/apache2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

(省略)
Installing /usr/local/share/man/man3/Apache2::Request.3
Installing /usr/local/share/man/man3/APR::Request::Cookie.3
Installing /usr/local/share/man/man3/APR::Request::CGI.3
Writing /usr/local/lib/perl5/site_perl/5.10.0/i686-linux/auto/libapreq2/.packlist
Appending installation info to /usr/local/lib/perl5/5.10.0/i686-linux/perllocal.pod
make[3]: Leaving directory `/home/suzu/.cpan/build/libapreq2-2.08-q8E5Li/glue/perl'
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/home/suzu/.cpan/build/libapreq2-2.08-q8E5Li/glue'
make[1]: Leaving directory `/home/suzu/.cpan/build/libapreq2-2.08-q8E5Li/glue'
  JOESUF/libapreq2-2.08.tar.gz
  sudo make install  -- OK

cpan[4]>

CPANシェルで mod_perl2 をインストールする。

mod_perl2 のインストールは、root 権限では test がうまく出来ないので、ユーザー権限でCPANシェルを起動してインストールします。

※ユーザー権限でCPANシェルを使うための設定は 「cpan shell (user 権限)」を参照

ちなみに、root 権限でテストをしようとすると、次のようになる。
Running the test suite is important to make sure that the module that
you are about to install works on your system. If you choose not to
run the test suite and you have a problem using this module, make sure
to return and run this test suite before reporting any problems to the
developers of this module.

Skip the test suite? [No]
make: *** [run_tests] Error 1
  GOZER/mod_perl-2.0.4.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports GOZER/mod_perl-2.0.4.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 GOZER/mod_perl-2.0.4.tar.gz                  : make_test NO

mod_perlをインストールする前に、openssl-devel をインストールしておきます。

sudo yum  install openssl-devel

install Bundle::Apache2 で、依存関係にあるモジュールをインストールする。

$ cpan
CPAN: File::HomeDir loaded ok (v0.80)

cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support enabled

cpan[1]> install Bundle::Apache2
CPAN: Storable loaded ok (v2.18)
CPAN: Time::HiRes loaded ok (v1.9711)

I would like to connect to one of the following sites to get 'authors/01mailrc.txt.gz':

 http://www.perl.org/CPAN/
 ftp://ftp.perl.org/pub/CPAN/

Is it OK to try to connect to the Internet? [yes]
  LWP not available

Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
    http://www.perl.org/CPAN/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok (v2.015)
CPAN: YAML loaded ok (v0.66)
Going to read /home/suzu/.cpan/sources/authors/01mailrc.txt.gz
.................

デフォルトのまま進みます。

(省略)
  CPAN.pm: Going to build D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz

=======================================================
Only one OpenSSL installation found at /usr
Consider running 'perl Makefile.PL --default' the next
time Crypt::SSLeay is upgraded to select this directory
automatically thereby avoiding the following prompt.
=======================================================
Which SSL install path do you want to use? [/usr]

BUILD INFORMATION
================================================
ssl library: OpenSSL 0.9.8 in /usr
ssl header:  openssl/ssl.h
libraries:   -L/usr/lib -lssl -lcrypto -lgcc
include dir: -I/usr/include/openssl
================================================
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lgcc
Writing Makefile for Crypt::SSLeay
The test suite can attempt to connect to public servers
to ensure that the code is working properly. If you are
behind a strict firewall or have no network connectivity,
these tests may fail (through no fault of the code).

Do you want to run the live tests (y/N) ? [N]

sudo でインストールするように,CPAN シェルに設定しているので、途中パスワードを聞いてきます。

  DLAND/Crypt-SSLeay-0.57.tar.gz
  /usr/bin/make test -- OK
Running make install
Prepending /home/suzu/.cpan/build/Crypt-SSLeay-0.57-SjXk3a/blib/arch /home/suzu/.cpan/build/Crypt-SSLeay-0.57-SjXk3a/blib/lib to PERL5LIB for 'install'
Password:

デフォルトのまま進みます。

Warning: prerequisite FCGI 0.67 not found.
Writing Makefile for CGI
---- Unsatisfied dependencies detected during ----
----          LDS/CGI.pm-3.42.tar.gz          ----
    FCGI [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]

インストール後の確認。

 cpan[2]> install Bundle::Apache2
Crypt::SSLeay is up to date (0.57).
Devel::CoreStack is up to date (1.3).
Devel::Symdump is up to date (2.08).
Digest::MD5 is up to date (2.36_01).
URI is up to date (1.37).
Net::Cmd is up to date (2.29).
MIME::Base64 is up to date (3.07_01).
HTML::Tagset is up to date (3.20).
HTML::Parser is up to date (3.56).
HTML::HeadParser is up to date (2.22).
LWP is up to date (5.814).
IPC::Run3 is up to date (0.042).
CGI is up to date (3.42).
Chatbot::Eliza is up to date (1.04).
Compress::Zlib is up to date (2.015).
Devel::Symdump is up to date (2.08).
HTML::HeadParser is up to date (2.22).
IPC::Run3 is up to date (0.042).
LWP is up to date (5.814).

cpan[3]>

mod_perl-2.0.4.tar.gz をインストールする。

cpan[3]> install G/GO/GOZER/mod_perl-2.0.4.tar.gz
Running make for G/GO/GOZER/mod_perl-2.0.4.tar.gz

  CPAN.pm: Going to build G/GO/GOZER/mod_perl-2.0.4.tar.gz

no conflicting prior mod_perl version found - good.

Next we need to know where the 'apxs' script is located. This script
provides a lot of information about the Apache installation, and makes
it easier to find things on your system. Normally it's located in the
same directory as the 'httpd' executable.

If you don't yet have Apache installed you can build Apache against
the Apache source code, but you won't be able to run the test suite (a
very important step). Therefore you may want to install Apache before
proceeding.


Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed):  /usr/local/apache2/bin/apxs

途中で、apxs のPATHを聞かれるので入力する。

Configuring Apache/2.2.9 mod_perl/2.0.4 Perl/v5.10.0
Checking if your kit is complete...
Looks good
Subroutine MY::postamble redefined at ./Makefile.PL line 167.
Subroutine MY::constants redefined at ./Makefile.PL line 181.
[   info] generating script t/TEST
[   info] generating script ./t/cgi-bin/cookies.pl
[   info] generating script ./t/cgi-bin/next_available_port.pl
Writing Makefile for Apache::Test
Checking for File::Spec...ok
Checking for Cwd...ok
[   info] generating script t/TEST
Checking if your kit is complete...
Looks good
Writing Makefile for ModPerl::Registry
Writing Makefile for APR::Base64
Writing Makefile for APR::Brigade
Writing Makefile for APR::Bucket
Writing Makefile for APR::BucketAlloc
Writing Makefile for APR::BucketType
Writing Makefile for APR::Date
(省略)
[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning]
[warning]   LoadModule perl_module modules/mod_perl.so
[warning]
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.

[warning] Check the results of
[warning]
[warning]   $ /usr/local/apache2/bin/apxs -q LIBEXECDIR
[warning]
[warning] and adjust the LoadModule directive accordingly.

(省略)
waiting 90 seconds for server to start: ...
waiting 90 seconds for server to start: ok (waited 1 secs)
server localhost.localdomain:8529 started
t/206................ok
t/304................ok
t/404................ok
t/500................ok
t/bad_scripts........ok
t/basic..............ok
t/bin_resp...........ok
t/cgi................ok
t/closure............ok
t/dirindex...........ok
t/fatalstobrowser....skipped: (no reason given)
t/flush..............ok
t/ithreads...........skipped: (no reason given)
t/nph................ok
t/perlrun_extload....ok
t/prefork............ok
t/redirect...........ok
t/regex..............ok
t/rewrite_env........ok
t/special_blocks.....ok
All tests successful.
Files=20, Tests=85, 19 wallclock secs ( 0.52 usr  0.04 sys + 12.79 cusr  4.66 csys = 18.01 CPU)
Result: PASS
[warning] server localhost.localdomain:8529 shutdown
make[1]: Leaving directory `/home/suzu/.cpan/build/mod_perl-2.0.4-s4I7vI/ModPerl-Registry'
  GOZER/mod_perl-2.0.4.tar.gz
  /usr/bin/make test -- OK
Running make install
Prepending /home/suzu/.cpan/build/mod_perl-2.0.4-s4I7vI/blib/arch /home/suzu/.cpan/build/mod_perl-2.0.4-s4I7vI/blib/lib to PERL5LIB for 'install'
Password:

sudo でインストールするように,CPAN シェルに設定しているので、途中パスワードを聞いてきます。

※入力ミスなどで途中失敗したら、次のようになりますので、
  /usr/bin/make test -- OK
Running make install
Prepending /home/suzu/.cpan/build/mod_perl-2.0.4-s4I7vI/blib/arch /home/suzu/.cpan/build/mod_perl-2.0.4-s4I7vI/blib/lib to PERL5LIB for 'install'
Password:
  GOZER/mod_perl-2.0.4.tar.gz
  sudo make install  -- NOT OK
Failed during this command:
 GOZER/mod_perl-2.0.4.tar.gz                  : install NO

cpan[4]> 
make clean する必要がある。
cpan[4]> clean G/GO/GOZER/mod_perl-2.0.4.tar.gz
make clean したら、もう一度インストールし直す。

インストール完了

(省略)
Installing /usr/local/share/man/man3/Apache2::ServerUtil.3
Installing /usr/local/share/man/man3/Apache2::URI.3
Installing /usr/local/share/man/man3/Apache::TestRequest.3
Installing /usr/local/share/man/man3/Apache2::Util.3
Installing /usr/local/share/man/man3/Bundle::Apache2.3
Installing /usr/local/share/man/man3/APR::Error.3
Installing /usr/local/share/man/man3/mod_perl2.3
Installing /usr/local/share/man/man3/ModPerl::PerlRunPrefork.3
Installing /usr/local/share/man/man3/APR::Socket.3
Installing /usr/local/bin/mp2bug
Writing /usr/local/lib/perl5/site_perl/5.10.0/i686-linux/auto/mod_perl2/.packlist
Appending installation info to /usr/local/lib/perl5/5.10.0/i686-linux/perllocal.pod
+--------------------------------------------------------------+
|                                                              |
| For details on getting started with mod_perl 2, see:         |
|                                                              |
|   http://perl.apache.org/docs/2.0/user/intro/start_fast.html |
|                                                              |
|                                                              |
| Found a bug?  File a bug report:                             |
|                                                              |
|   http://perl.apache.org/bugs/                               |
|                                                              |
+--------------------------------------------------------------+
  GOZER/mod_perl-2.0.4.tar.gz
  sudo make install  -- OK

cpan[4]>

root権限ではなく、ユーザー権限で、make test したい場合があります。
その時は、CPANシェルをユーザー権限で実行します。
そのための設定です。

mod_perlをインストールする時は、root権限での make test がうまくいきません。そういう時はユーザー権限でインストールします。

ftp://mama.indstate.edu/linux/tree/
より、最新バージョンのファイルを取得する

$ wget ftp://mama.indstate.edu/linux/tree/tree-1.5.2.1.tgz
$ tar xzvf tree-1.5.2.1.tgz
tree-1.5.2.1/CHANGES
tree-1.5.2.1/INSTALL
tree-1.5.2.1/LICENSE
tree-1.5.2.1/Makefile
tree-1.5.2.1/README
tree-1.5.2.1/tree.c
tree-1.5.2.1/strverscmp.c
tree-1.5.2.1/man/tree.1
tree-1.5.2.1/man/tree.1.fr
$ cd tree-1.5.2.1
$ less INSTALL
$ make
gcc -O2 -Wall -fomit-frame-pointer -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -c -o tree.o tree.c
gcc -s -o tree tree.o
$ sudo make install
$ ll
total 192
-rw-r--r-- 1 suzu suzu  5907 2008-08-27 15:10 CHANGES
-rw-r--r-- 1 suzu suzu   362 2008-08-27 14:25 INSTALL
-rw-r--r-- 1 suzu suzu 18009 2004-08-12 16:38 LICENSE
-rw-r--r-- 1 suzu suzu  1801 2008-08-27 14:34 Makefile
drwxrwxr-x 2 suzu suzu  4096 2008-09-21 17:44 man
-rw-r--r-- 1 suzu suzu  3583 2008-08-27 14:23 README
-rw-r--r-- 1 suzu suzu  5322 2008-08-27 13:34 strverscmp.c
-rwxrwxr-x 1 suzu suzu 36688 2008-09-21 17:45 tree
-rw-r--r-- 1 suzu suzu 52163 2008-08-27 15:05 tree.c
-rw-rw-r-- 1 suzu suzu 48720 2008-09-21 17:45 tree.o
$ ./tree
.
|-- CHANGES
|-- INSTALL
|-- LICENSE
|-- Makefile
|-- README
|-- man
|   |-- tree.1
|   `-- tree.1.fr
|-- strverscmp.c
|-- tree
|-- tree.c
`-- tree.o

1 directory, 11 files
$ sudo make install
Password:
install -d /usr/bin
install -d /usr/man/man1
if [ -e tree ]; then \
                install -s tree /usr/bin/tree; \
        fi
install man/tree.1 /usr/man/man1/tree.1
$

configure は無いので、インストールオプションは Makefile を編集して行う。

wget ftp://mama.indstate.edu/linux/tree/tree-1.5.2.1.tgz
tar xzvf tree-1.5.2.1.tgz
cd tree-1.5.2.1
make
sudo make install

初めてcpanシェルを起動した時のセットアップ。

$ sudo su -
Password:
[root@localhost ~]# cpan


CPAN is the world-wide archive of perl resources. It consists of about
300 sites that all replicate the same contents around the globe. Many
countries have at least one CPAN site already. The resources found on
CPAN are easily accessible with the CPAN.pm module. If you want to use
CPAN.pm, lots of things have to be configured. Fortunately, most of
them can be determined automatically. If you prefer the automatic
configuration, answer 'yes' below.

If you prefer to enter a dialog instead, you can answer 'no' to this
question and I'll let you configure in small steps one thing after the
other. (Note: you can revisit this dialog anytime later by typing 'o
conf init' at the cpan prompt.)
Would you like me to configure as much as possible automatically? [yes]

(省略)

Autoconfigured everything but 'urllist'.
Please call 'o conf init urllist' to configure your CPAN server(s) now!

commit: wrote '/usr/local/lib/perl5/5.10.0/CPAN/Config.pm'
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?)

cpan[1]>

初めてCPANシェルを起動した時は、「Would you like me to configure as much as possible automatically? [yes]」と聞かれるので、デフォルト(Yes)のままEnterを押す。

再設定をしたい場合は、

cpan[2]> o conf init

とする事で、設定し直す事ができる。その時、「Would you like me to configure as much as possible automatically? [yes]」では no にするとよい


設定内容を確認する。

cpan[1]> o conf
$CPAN::Config options from '/usr/local/lib/perl5/5.10.0/CPAN/Config.pm':
    commit             [Commit changes to disk]
    defaults           [Reload defaults from disk]
    help               [Short help about 'o conf' usage]
    init               [Interactive setting of all options]

    applypatch         []
    auto_commit        [0]
    build_cache        [100]
    build_dir          [/root/.cpan/build]
    build_dir_reuse    [1]
    build_requires_install_policy [ask/yes]
    bzip2              [/usr/bin/bzip2]
    cache_metadata     [1]
    check_sigs         [0]
    colorize_debug     undef
    colorize_output    undef
    colorize_print     undef
    colorize_warn      undef
    commandnumber_in_prompt [1]
    commands_quote     undef
    cpan_home          [/root/.cpan]
    curl               [/usr/bin/curl]
    dontload_hash      undef
    dontload_list      undef
    ftp                []
    ftp_passive        [1]
    ftp_proxy          []
    getcwd             [cwd]
    gpg                []
    gzip               [/bin/gzip]
    histfile           [/root/.cpan/histfile]
    histsize           [100]
    http_proxy         []
    inactivity_timeout [0]
    index_expire       [1]
    inhibit_startup_message [0]
    keep_source_where  [/root/.cpan/sources]
    load_module_verbosity [v]
    lynx               []
    make               [/usr/bin/make]
    make_arg           []
    make_install_arg   []
    make_install_make_command [/usr/bin/make]
    makepl_arg         []
    mbuild_arg         []
    mbuild_install_arg []
    mbuild_install_build_command [./Build]
    mbuildpl_arg       []
    ncftp              []
    ncftpget           []
    no_proxy           []
    pager              [/usr/bin/less]
    password           undef
    patch              [/usr/bin/patch]
    prefer_installer   [MB]
    prefs_dir          [/root/.cpan/prefs]
    prerequisites_policy [ask]
    proxy_pass         undef
    proxy_user         undef
    randomize_urllist  undef
    scan_cache         [atstart]
    shell              [/bin/bash]
    show_unparsable_versions [0]
    show_upload_date   [0]
    show_zero_versions [0]
    tar                [/bin/tar]
    tar_verbosity      [v]
    term_is_latin      [1]
    term_ornaments     [1]
    test_report        [0]
    unzip              []
    urllist
    use_sqlite         [0]
    username           undef
    wait_list          undef
    wget               [/usr/bin/wget]
    yaml_load_code     [0]
    yaml_module        [YAML]


cpan[2]> 

CPAN シェルで使えるコマンドを確認する。

cpan[2]> help

Display Information                                                (ver 1.9205)
 command  argument          description
 a,b,d,m  WORD or /REGEXP/  about authors, bundles, distributions, modules
 i        WORD or /REGEXP/  about any of the above
 ls       AUTHOR or GLOB    about files in the author's directory
    (with WORD being a module, bundle or author name or a distribution
    name of the form AUTHOR/DISTRIBUTION)

Download, Test, Make, Install...
 get      download                     clean    make clean
 make     make (implies get)           look     open subshell in dist directory
 test     make test (implies make)     readme   display these README files
 install  make install (implies test)  perldoc  display POD documentation

Upgrade
 r        WORDs or /REGEXP/ or NONE    report updates for some/matching/all modules
 upgrade  WORDs or /REGEXP/ or NONE    upgrade some/matching/all modules

Pragmas
 force  CMD    try hard to do command  fforce CMD    try harder
 notest CMD    skip testing

Other
 h,?           display this menu       ! perl-code   eval a perl command
 o conf [opt]  set and query options   q             quit the cpan shell
 reload cpan   load CPAN.pm again      reload index  load newer indices
 autobundle    Snapshot                recent        latest CPAN uploads

urllist を設定する。

cpan[3]> o conf init urllist
You have no /root/.cpan/sources/MIRRORED.BY
  I'm trying to fetch one

I would like to connect to one of the following sites to get 'MIRRORED.BY':

 http://www.perl.org/CPAN/
 ftp://ftp.perl.org/pub/CPAN/

Is it OK to try to connect to the Internet? [yes]
  LWP not available

Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
    http://www.perl.org/CPAN/MIRRORED.BY


Now we need to know where your favorite CPAN sites are located. Push
a few sites onto the array (just in case the first on the array won't
work). If you are mirroring CPAN to your local workstation, specify a
file: URL.

First, pick a nearby continent and country by typing in the number(s)
in front of the item(s) you want to select. You can pick several of
each, separated by spaces. Then, you will be presented with a list of
URLs of CPAN mirrors in the countries you selected, along with
previously selected URLs. Select some of those URLs, or just keep the
old list. Finally, you will be prompted for any extra URLs -- file:,
ftp:, or http: -- that host a CPAN mirror.

(1) Africa
(2) Asia
(3) Central America
(4) Europe
(5) North America
(6) Oceania
(7) South America
Select your continent (or several nearby continents) [] 2

(1) China
(2) Hong Kong
(3) Indonesia
(4) Israel
(5) Japan
(6) Korea
(7) Pakistan
(8) Philippines
(9) Republic of Korea
(10) Saudi Arabia
(11) Singapore
(12) Taiwan
(13) Thailand
(14) Turkey
Select your country (or several nearby countries) [] 5

(1) ftp://ftp.dti.ad.jp/pub/lang/CPAN/
(2) ftp://ftp.jaist.ac.jp/pub/CPAN/
(3) ftp://ftp.kddilabs.jp/CPAN/
(4) ftp://ftp.nara.wide.ad.jp/pub/CPAN/
(5) ftp://ftp.riken.jp/lang/CPAN/
(6) ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/
(7) ftp://ftp.u-aizu.ac.jp/pub/CPAN
(8) ftp://ftp.yz.yamagata-u.ac.jp/pub/lang/cpan/
Select as many URLs as you like (by number),
put them on one line, separated by blanks, hyphenated ranges allowed
 e.g. '1 4 5' or '7 1-4 8' [] 2 3

Enter another URL or RETURN to quit: []
New set of picks:
  ftp://ftp.jaist.ac.jp/pub/CPAN/
  ftp://ftp.kddilabs.jp/CPAN/


Please remember to call 'o conf commit' to make the config permanent!


cpan[4]> o conf
$CPAN::Config options from '/usr/local/lib/perl5/5.10.0/CPAN/Config.pm':
(省略)
    urllist
        0 [ftp://ftp.jaist.ac.jp/pub/CPAN/]
        1 [ftp://ftp.kddilabs.jp/CPAN/]

install Bundle::CPAN

cpan[5]> install Bundle::CPAN
CPAN: Storable loaded ok (v2.18)

Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
    ftp://ftp.jaist.ac.jp/pub/CPAN/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok (v2.008)
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
............................................................................DONE

Trying with "/usr/bin/curl -L -f -s -S --netrc-optional" to get
    ftp://ftp.jaist.ac.jp/pub/CPAN/modules/02packages.details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
  Database was generated on Sun, 21 Sep 2008 08:03:21 GMT
  HTTP::Date not available
.....

途中で

Enter arithmetic or Perl expression: exit
と聞かれる。そのまま Enter を押す。
Continue installing YAML.pm? [y]

これも、そのまま Enter 。


インストール後の最後の表示内容。

CPAN: Term::ReadLine::Perl loaded ok (v1.0302)
.....................
21 subroutines in Term::ReadLine redefined
Exiting subroutine via last at /usr/local/lib/perl5/5.10.0/CPAN.pm line 1450.

cpan shell -- CPAN exploration and modules installation (v1.9205)
ReadLine support enabled

cpan[6]>

The Perl Directory at Perl.org にアクセスしソースをダウンロードする。

downloads を開き、Stable Release の Perl 5.10.0 (Download) からダウンロードする。

http://www.cpan.org/src/README.html

wget http://www.cpan.org/authors/id/R/RG/RGARCIA/perl-5.10.0.tar.gz
tar xzvf perl-5.10.0.tar.gz
cd perl-5.10.0

#Configureのオプションを確認する。
./Configure --help

Apacheのソースファイルをダウンロードする。

The Apache HTTP Server Project にアクセスし、Download! from a mirror を開く。

「Other mirrors:」から適当な、mirror サイトを選び、「Change」ボタンを押す。

「Apache HTTP Server 2.2.9 is the best available version」という欄のダウンロード先が変わるので、そこからダウンロードする。

Unix Source: httpd-2.2.9.tar.gz [PGP] [MD5]
wget ftp://ftp.kddilabs.jp/infosystems/apache/httpd/httpd-2.2.9.tar.gz

Apacheをインストールする。

必要に応じて、configure のオプションを設定する。

./configure --enable-rewrite --enable-so --enable-deflate  --enable-vhost-alias  --enable-ssl

# prefix 指定
# --enable-proxy でプロキシ機能を有効
# --enable-proxy-balancer でロードバランスに対応
./configure --prefix=/usr/local/apache2.2.6 --enable-proxy --enable-proxy-balancer --enable-rewrite --enable-so --enable-deflate  --enable-vhost-alias  --enable-ssl

SSL関連でエラーが出る場合

checking whether to enable mod_ssl... checking dependencies
checking for SSL/TLS toolkit base... none
checking for OpenSSL version... checking openssl/opensslv.h usability... no
checking openssl/opensslv.h presence... no
checking for openssl/opensslv.h... no
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
no OpenSSL headers found
checking for SSL-C version... checking sslc.h usability... no
checking sslc.h presence... no
checking for sslc.h... no
no SSL-C headers found
configure: error: ...No recognized SSL/TLS toolkit detected

上記のようなエラーが出る場合、yum で openssl-devel をインストールする。

 sudo yum  install openssl-devel

ダウンロードからインストールまで、まとめ

sudo yum  install openssl-devel
wget ftp://ftp.kddilabs.jp/infosystems/apache/httpd/httpd-2.2.9.tar.gz
tar xzvf httpd-2.2.9.tar.gz
cd httpd-2.2.9

# インストールオをプションを確認
./configure --help

./configure --enable-rewrite --enable-so --enable-deflate  --enable-vhost-alias  --enable-ssl

make
sudo make install

Apacheインストール後の忘れてはならない設定

ServerTokens によるサーバ情報表示をさせない。

sudo vim /usr/local/apache2/conf/extra/httpd-default.conf
ServerTokens Full
  になっているところを
ServerTokens Prod
に変更

ServerSignature On
  になっているところを
ServerSignature Off
に変更

httpd.conf の設定で、httpd-default.confを有効にする。

sudo vim /usr/local/apache2/conf/httpd.conf

コメントを外す。

# Various default settings
Include conf/extra/httpd-default.conf

Apache起動・リスタート・停止

# 起動
sudo /usr/local/apache2/bin/apachectl start
# リスタート
sudo /usr/local/apache2/bin/apachectl restart
#停止
sudo /usr/local/apache2/bin/apachectl stop

coLinux インストール後の環境設定」の続きで、 Apache をインストールしてみましょう。

yum install httpd でApacheをインストールする。

[suzu@localhost ~]$ sudo yum install httpd
[sudo] password for suzu:
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package httpd.i386 0:2.2.8-3 set to be updated
--> Processing Dependency: libapr-1.so.0 for package: httpd
--> Processing Dependency: libaprutil-1.so.0 for package: httpd
--> Processing Dependency: httpd-tools = 2.2.8-3 for package: httpd
--> Processing Dependency: /etc/mime.types for package: httpd
--> Running transaction check
---> Package apr.i386 0:1.2.12-2.fc9 set to be updated
---> Package httpd-tools.i386 0:2.2.8-3 set to be updated
---> Package apr-util.i386 0:1.2.12-5.fc9 set to be updated
---> Package mailcap.noarch 0:2.1.28-1.fc9 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 httpd                   i386       2.2.8-3          fedora            968 k
Installing for dependencies:
 apr                     i386       1.2.12-2.fc9     fedora            128 k
 apr-util                i386       1.2.12-5.fc9     fedora             74 k
 httpd-tools             i386       2.2.8-3          fedora             68 k
 mailcap                 noarch     2.1.28-1.fc9     fedora             15 k

Transaction Summary
=============================================================================
Install      5 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): mailcap-2.1.28-1.fc9.noarch.rpm                 |  15 kB     00:00
(2/5): httpd-tools-2.2.8-3.i386.rpm                    |  68 kB     00:00
(3/5): apr-util-1.2.12-5.fc9.i386.rpm                  |  74 kB     00:00
(4/5): apr-1.2.12-2.fc9.i386.rpm                       | 128 kB     00:00
(5/5): httpd-2.2.8-3.i386.rpm                          | 968 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : mailcap                                           [1/5]
  Installing     : apr                                               [2/5]
  Installing     : apr-util                                          [3/5]
  Installing     : httpd-tools                                       [4/5]
  Installing     : httpd                                             [5/5]

Installed: httpd.i386 0:2.2.8-3
Dependency Installed: apr.i386 0:1.2.12-2.fc9 apr-util.i386 0:1.2.12-5.fc9 httpd-tools.i386 0:2.2.8-3 mailcap.noarch 0:2.1.28-1.fc9
Complete!
[suzu@localhost ~]$

Apacheを起動する。

[suzu@localhost ~]$ sudo /etc/init.d/httpd start
Starting httpd:                                            [  OK  ]
[suzu@localhost ~]$

起動したApacheプロセスを確認する。

[suzu@localhost ~]$ ps aux | grep httpd
root      2909  0.0  1.0  10284  2788 ?        Ss   07:32   0:00 /usr/sbin/httpd
apache    2910  0.0  0.7  10420  2028 ?        S    07:32   0:00 /usr/sbin/httpd
apache    2911  0.0  0.7  10420  2028 ?        S    07:32   0:00 /usr/sbin/httpd
apache    2913  0.0  0.7  10420  2028 ?        S    07:32   0:00 /usr/sbin/httpd
apache    2914  0.0  0.7  10420  2028 ?        S    07:32   0:00 /usr/sbin/httpd
apache    2915  0.0  0.7  10420  2028 ?        S    07:32   0:00 /usr/sbin/httpd
apache    2916  0.0  0.7  10420  2028 ?        S    07:32   0:00 /usr/sbin/httpd
apache    2917  0.0  0.7  10420  2028 ?        S    07:32   0:00 /usr/sbin/httpd
apache    2918  0.0  0.7  10420  2028 ?        S    07:32   0:00 /usr/sbin/httpd
suzu      2939  0.0  0.2   4120   704 pts/1    R+   07:47   0:00 grep httpd
[suzu@localhost ~]$

ブラウザからアクセスして確認してみる。

WindowsからcoLinuxのApacheへアクセスは、slirp 経由のまま変更していなければ、
URLに、http://localhost/ でアクセスします。

「Fedora Test Page」画面が表示される。


インストールしたばかりの coLinux を起動してみる。」からの続き。

PuTTYで、coLinuxにログイン後、root になり環境設定を行う。

su - で root になる。

[suzu@localhost ~]$ su -
[root@localhost ~]# loadkeys jp106
Loading /lib/kbd/keymaps/i386/qwerty/jp106.map.gz

キーボートマップを loadkeys で 日本語配列にする。


お好みのエディターをインストールする。

[root@localhost ~]# yum install vim
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.i386 2:7.1.291-1.fc9 set to be updated
--> Processing Dependency: vim-common = 2:7.1.291-1.fc9 for package: vim-enhanced
--> Processing Dependency: libgpm.so.1 for package: vim-enhanced
--> Running transaction check
---> Package vim-common.i386 2:7.1.291-1.fc9 set to be updated
---> Package gpm.i386 0:1.20.1-90.fc9 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 vim-enhanced            i386       2:7.1.291-1.fc9  fedora            892 k
Installing for dependencies:
 gpm                     i386       1.20.1-90.fc9    fedora            181 k
 vim-common              i386       2:7.1.291-1.fc9  fedora            6.6 M

Transaction Summary
=============================================================================
Install      3 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 7.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): gpm-1.20.1-90.fc9.i386.rpm                      | 181 kB     00:00
(2/3): vim-enhanced-7.1.291-1.fc9.i386.rpm             | 892 kB     00:00
(3/3): vim-common-7.1.291-1.fc9.i386.rpm               | 6.6 MB     00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : gpm                                               [1/3]
  Installing     : vim-common                                        [2/3]
  Installing     : vim-enhanced                                      [3/3]

Installed: vim-enhanced.i386 2:7.1.291-1.fc9
Dependency Installed: gpm.i386 0:1.20.1-90.fc9 vim-common.i386 2:7.1.291-1.fc9
Complete!
[root@localhost ~]#

sudo を使えるようにする。

[root@localhost ~]# yum install sudo
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package sudo.i386 0:1.6.9p13-4.fc9 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 sudo                    i386       1.6.9p13-4.fc9   fedora            224 k

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 224 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): sudo-1.6.9p13-4.fc9.i386.rpm                    | 224 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : sudo                                              [1/1]

Installed: sudo.i386 0:1.6.9p13-4.fc9
Complete!
[root@localhost ~]# 

インストールしたら、設定ファイルを編集する。

[root@localhost ~]# /usr/sbin/visudo
## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
suzu    ALL=(ALL)       ALL

変更を保存して、使えるようになったか確かめる。
一度、Exitして sudo su - を試す。

[root@localhost ~]# exit
logout
[suzu@localhost ~]$
[suzu@localhost ~]$ sudo su -

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for suzu:
audit_log_user_command(): Connection refused
[1]+  Terminated              $SHELL -c "echo > /dev/tcp/10.0.2.2/7000" 2>> /dev/null
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# exit

確認できたら、exit して、ユーザーに戻る。

また、 sudo su - しなくても、次の様にして設定を確認できる。

[suzu@localhost ~]$ sudo -l
User suzu may run the following commands on this host:
    (ALL) ALL
[suzu@localhost ~]$

タイムゾーンを設定する。

[suzu@localhost ~]# 
[suzu@localhost ~]$ sudo cp -p /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
[sudo] password for suzu:
audit_log_user_command(): Connection refused
[suzu@localhost ~]# 
[suzu@localhost ~]$ date
Sat Sep 20 07:13:13 JST 2008
[suzu@localhost ~]$

シェル環境を整える。

コマンドプロンプト を カスタマイズ.

[suzu@localhost ~]$
[suzu@localhost ~]$ echo 'PS1="\[\e[32m\][\[\e[0m\]\u\[\e[1;36m\]@\[\e[0m\]\[\e[1;31m\]\h\]\[\e[0;32m\]] \[\e[33m\]\[\e[1;32m\][\d \t]\n \[\e[0;33m\]\w\[\e[0m\]\n\$ "' >> ~/.bashrc
[suzu@localhost ~]$

コマンド履歴を増やす.

[suzu@localhost ~]$ echo "HISTSIZE=10000" >> ~/.bashrc
[suzu@localhost ~]$

なにかしら必要と思われるものをインストール・アップデートしておく。

アップデートできるものを次のコマンドで確認

sudo yum check-update

必要に応じて、UPDATEする。

個別 アップデート
sudo yum update パッケージ名 
or 全アップデート
sudo yum update 

必要そうなのをインストールしておく。

sudo yum install glib
sudo yum install gcc
sudo yum install wget
sudo yum install curl
sudo yum install pam-devel
sudo yum install bind-utils

sudo で 「audit_log_user_command(): Connection refused」と出るので、新しいヴァージョンを入れる。

今まで、 sudo を使うたびに、上記のメッセージが表示されていました。

新しいヴァージョンをソースからインストールします。

sudo yum info sudo
から確認できるURL、http://www.courtesan.com/sudo へアクセスし、Download Sudoから最新版をダウンロードします。
現時点では、sudo-1.6.9p17.tar.gz が最新でしたので、このヴァージョンを入れます。

そのまえに、まず、pam-develを「sudo yum install pam-devel」で入れておく必要があります。

tar xzvf sudo-1.6.9p17.tar.gz
cd sudo-1.6.9p17
./configure
make
sudo make install

ログインし直して、ヴァージョンを確認してみてください。

$ sudo -V
Sudo version 1.6.9p17

$ sudo ls
Password:
src  work  yum_list.txt

audit_log_user_command(): Connection refused」のメッセージも表示されなくなりました。


Windows Vista に coLinux をインストールする」からの続き

起動するためのBatファイルを編集する。

colinux-daemon.exe  kernel=vmlinux initrd=initrd.gz mem=256  cobd0="C:/Program Files/coLinux/Fedora-9.img"  cobd1="C:/Program Files/coLinux/swap.img"  root=/dev/cobd0 eth0=slirp,,tcp:5901:5900  ro

となっているところを、次の用に編集する。

c:
cd "C:\Program Files\coLinux\"
colinux-daemon.exe kernel=vmlinux initrd=initrd.gz mem=256 cobd0="D:/colinux/Fedora-9.img" cobd1="D:/colinux/swap.img" root=/dev/cobd0 eth0=slirp,,tcp:22:22/tcp:80:80/tcp:5901:5900 ro

変更内容

coLinux本体は、Cドライブにインストールし、イメージファイルはDドライブにインストールしたので、
c:に移動してから、
cd でcolinux本体のあるPATHへカレントディレクトリを移す。

イメージファイルをインストールした先のPATHを、cobd0と、cobd1 に加える。

eth0 の、slirpで接続できるように eth0 の引数に Port 22を加える。
(Port 80 も 加えておいた)


coLinux を 起動してログインみる。

変更したBatファイルを開いて起動する。

2つの画面が開き coLinux が起ち上がる。
ひとつは、Batファイルを開いた DOS画面、もう一つは coLinux の コンソール画面。

coLinux のコンソールに、ログインプロンプトが表示されるので、
root
と入力し、パスワードは空欄のままEnterを押す。

通常使うユーザーを登録する
[root@localhost ~]# adduser suzu
パスワードを設定
[root@localhost ~]# passwd suzu

お気に入りのターミナル(PuTTY)から coLinux にログインする。

PuTTY ごった煮版 がおすすめ!

PuTTYを開く。
ホスト名の欄に、
localhost
と入力し、ポートは22のままで開くボタンを押す

ログインプロンプトが表示されるので、 先ほどcoLinux のコンソールで作ったユーザー名でログインする。パスワードも設定したパスワードを入力する。

login as: suzu
suzu@localhost's password:
At a command line run "startx" so you can connect to this virtual machine
using the vnc address:

  127.0.0.1:1

Once logged into an X11 session, you can add packages by running pirut.


[suzu@localhost ~]$


coLinux をインストールする。

最新の stable coLinuxDevelopment Snapshotsからダウンロードする。

現在の最新版は
Self-installing binary: stable-coLinux-20080524.exe (4,854,912 bytes)

Windowsユーザーが管理者権限でなければ、右クリックで「管理者として実行」を行う。
※普通に開いても、管理者として実行するための確認画面が表示される。

Choose Components
では、
・Bridged Ethernet (WinPcap)
・Root Filesystem image Download

の2つの チェックを外す。

インストール先はデフォルトのままでインストール開始する。

途中で 「Windowsセキュリティ」の警告が出るの。
インストールを選択する。


Filesystem imageを用意する。

Downloads
(binary and source)
を開くと、各ディストリビューションがある。

ArchLinux
Debian
Fedora
Gentoo
Ubuntu
など

使用したいものを選んでダウンロードする。

ここでは、

Images 2.6.x Fedora Fedora 9 August 27, 2008

をダウンロードする。


ダウンロードしたFilesystem imageをインストールする。

ダウンロードしたファイルを開くと、destination folder を聞いてくるので、適当なPATHを設定する。
ここでは、D:\colinux にする。

次へ進むと、インストールが始まる。しばらく時間がかかる。

インストール後は次のようなファイルがある。

D:\colinux>dir
 ドライブ D のボリューム ラベルがありません。
 ボリューム シリアル番号は C4AF-640D です

 D:\colinux のディレクトリ

2008/09/17  23:17    <DIR>          .
2008/09/17  23:17    <DIR>          ..
2008/08/27  07:15     4,290,772,992 Fedora-9.img
2008/08/27  06:35             3,182 README-Fedora-9.txt
2008/08/27  06:36               192 start-Fedora-9.bat
2008/08/27  06:37               401 start-Fedora-9.sh
2008/08/26  22:07       536,870,912 swap.img
               5 個のファイル       4,827,647,679 バイト
               2 個のディレクトリ  69,345,222,656 バイトの空き領域

D:\colinux>

このアーカイブについて

このページには、2008年9月に書かれたブログ記事が新しい順に公開されています。

次のアーカイブは2008年10月です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。