インストール
- ftp
- 4.11-RELEASE-i386-miniinst.isoを使用してCDROMからブート
- インストールメディアとして、PCMCIAを選択しない。
- 勘違いですうパターンためしたが、メモリとかIRQは不明なまま。
- Kern-Developerを選択。
- portsはインストールしない。
- portsが無いと、異様に速くインストール終了する。:-)
- HDDのパーティション分け
/dev/ad0s1a on / (ufs, local, soft-updates)
/dev/ad0s1f on /tmp (ufs, local, soft-updates)
/dev/ad0s1g on /usr (ufs, local, soft-updates)
/dev/ad0s1e on /var (ufs, local, soft-updates)
procfs on /proc (procfs, local)
- ログ復旧の観点から、/varはnewfsしない方がよいかも。
- Packageからインストールするモノ
- ここでひとまずリブート
初回起動後
*default host=cvsup4.jp.FreeBSD.org
cvsup -g stable-supfile
cvsup -g ports-supfile
vipw
toor:*:0:0:Bourne-again Superuser:/root:/usr/local/bin/zsh
passwd -l toor
CPUTYPE=i686
- csvup終了後
- cd /usr/src/sys/i386/conf
- cp GENERIC XXX
- XXXを適当に編集
- make worldする
- 一般的にどういう呪文を使っているのか調査しておこう
- 一晩がかりなので寝る
shutdown -h now
ソースからBuildするもの
方針
- 主要アプリケーションはソースからBuildする。
- 主要アプリケーションが必要とする依存関係は、portsを使ってもよい。
- ソースは必ず保存するべし。
- 個別作業に入る前に/var/logを復旧しておくべし。
Apache2.0.54 + PHP4.4 + Subversion1.2.1 + ViewCVS1.0
- UserとGroupの登録
- /stand/sysinstall -> Configure -> User Management
- システムデフォルトで登録されている様だが、無ければ追加する。
www:*:80:80:World Wide Web Owner:/nonexistent:/sbin/nologin
cd /usr/ports/databaes/db42
make install
cd /usr/ports/lang/python
make install
- Apache2.0.54
- sslとproxy関係のみDSOで組み込む。
- ./configureがBarkley DB関係で探しているのは、binじゃなくてlibの様な気がするけど、特に修正はせず。
- Install
./configure --prefix=/usr/local \
--enable-layout=FreeBSD \
--enable-with-barkley-db=/usr/local/bin/db42 \
CPPFLAGS=-I/usr/local/include/db42 \
LDFLAGS=-L/usr/local/lib/db42 \
--enable-dav=yes \
--enable-dav-fs=yes \
--enable-headers=yes \
--enable-ssl=yes \
--enable-proxy=yes \
--enable-proxy-connect=yes \
--enable-proxy-ftp=yes \
--enable-proxy-http=yes \
--with-ssl=/usr/bin \
--enable-so=yes \
--enable-mods-shared='ssl proxy proxy-connect proxy-ftp proxy-http' \
--enable-auth-digest=yes
make
make install
cd /usr/ports/textproc/libxml2 # 2.6.20
./configure
Install prefix: /usr/local
Compiler: gcc
XML Parser: libxml 2.6.20
SSL library: SSL support is not enabled
zlib support: zlib support enabled, using -lz
Build libraries: Shared=no, Static=yes
make
make install
apache2_enable="YES"
./configure --with-apxs2=/usr/local/sbin/apxs \
--with-mysql
make
make install
LoadModule php4_module libexec/apache2/libphp4.so
AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source /phps
./configure
gmake
gmake install
./viewcvs-install
viewcvs.confを適宜変更
-
- Subversion1.2.1
- INSTALL によると、./configure に先だってsh ./autogen.sh を実施する。
- エラーが出たら、都度それにあわせて環境変数を変更する。
AUTOCONF=/usr/local/bin/autoconf259 \
AUTOHEADER=/usr/local/bin/autoheader259 \
LIBTOOL_M4=/usr/local/lib/php/build/libtool.m4 \
sh ./autogen.sh
./configure --prefix=/usr/local \
--with-apxs=/usr/local/sbin/apxs \
--with-berkeley-db=/usr/local/bin/db42 \
CPPFLAGS=-I/usr/local/include/db42 \
LDFLAGS=-L/usr/local/lib/db42 \
--with-swig=/usr/local/bin/swig \
--with-apr=/usr/local/bin/apr-config \
--with-apr-util=/home/src/httpd-2.0.54/srclib/apr-util
make
make install
make swig-py
make install-swig-py
もしダメなら、subversion/bindings/swig/INSTALL で同じ事をやってみる。
cd /usr/local/lib/python2.4/site-packaes
ln -s /usr/local/lib/svn-python/* .
- 基本的には、INSTALLを読みながら進めればよい。
- UserとGroupの作成
pgsql:*:70:70:PostgreSQL Daemon:/home/pgsql:/bin/sh
pg_dumpall > db.out
pg_ctl stop
./configure --prefix=/usr/local --with-perl
gmake
gmake check # for regression test
su
gmake install
gmake -C src/bin install
gmake -C src/include install
gmake -C src/interfaces install
gmake -C doc install
mkdir /home/pgsql
mkdir /home/pgsql/data
chown -R pgsql:pgsql /home/pgsql
su pgsql
initdb --encoding=EUC_JP --no-locale -D /home/pgsql/data
su pgsql -c '/usr/local/bin/pg_ctl start -o -i -D /home/pgsql/data '
su
su pgsql
psql -e template1 < db.out
- 基本方針
- MySQL4.1.x の最新版
- デフォルトの言語設定は ujis
- テーブルは MyISAM, InnoDBを使用、NDBClusterは当面見送り ..orz
- 常駐するので、プロセスサイズを小さくする設定。
- portsの場合
cd /usr/ports/databases/mysql41-server
make WITH_CHARSET=ujis
make install
mysql:*:88:88:MySQL Daemon:/home/mysql:/sbin/nologin
./configure --help
./configure --prefix=/usr/local \
--with-tcp-port=3306 \
--with-mysqld-user=mysql \
--with-charset=ujis \
--with-extra-charsets=all \
--with-csv-storage-engine \
--localstatedir=/home/mysql
make
make install
cp support-files/my-small.cnf /etc/my.cnf
cd /home/mysql
/usr/local/bin/mysql_install_db --user=mysql
/usr/local/bin/mysqld_safe --user=mysql &
--localstatedirを指定しない場合、初期化する際に明示する必要がある。
/usr/local/bin/mysql_install_db --datadir=/home/mysql
/usr/local/bin/mysqld_safe --datedir=/home/mysql
wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
tar zxvf mod_perl-2.0-current.tar.gz
cd mod_perl-2.0
perl Makefile.PL MP_USE_DSO=1 \
MP_APXS=/usr/local/sbin/apxs \
EVERYTHING=1
make
make test # 1時間以上かかるので注意
su toor
make install
http://perl.apache.org/docs/1.0/guide/install.html
The Gory Details
We saw that the basic mod_perl installation is quite simple and
takes about 10 commands. You can copy and paste them from these
pages. The parameter EVERYTHING=1 selects a lot of options, but
sometimes you will need different ones. You may need to pass only
specific parameters, to bundle other components with mod_perl etc.
You may want to build mod_perl as a loadable object instead of
compiling it into Apache, so that it can be upgraded without
rebuilding Apache itself.
- httpd.conf
- 実は Directive の中身をよく分からないままな。
- 使うときは、必ずマニュアルを見て設定すること。
LoadModule perl_module libexec/apache2/mod_perl.so
Alias /cgi-perl /usr/local/www/cgi-perl
<Location /cgi-perl>
SetHandler perl-script
PerlHandler Apache::Registory
Options +ExecCGI
</Location>
- 動作確認
- テストコードがないので、動作確認できず..
- make testで一部エラーになったのが気になる。
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/apache/util.t 8 4 50.00% 1-4
t/api/in_out_filters.t 1 1 100.00% 1
t/compat/request_body.t 5 1 20.00% 5
35 tests skipped.
Failed 3/230 test scripts, 98.70% okay. 6/2099 subtests failed, 99.71% okay.
[warning] server localhost:8529 shutdown
[warning] port 8529 still in use...
...done
[ error] error running tests (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
*** Error code 1
mod_encoding
- 情報源
- WebDAV クライアントの仕様に起因する問題
- Web Folder Client (MSDAIPP.DLL) Versions and Issues List
- nemuiDoc: WebDAVClients
- libiconv_hookのインストール
- ダウンロードして、mod_encoding.cを最新版に差し替える
wget http://webdav.todo.gr.jp/download/mod_encoding-20020611a.tar.gz
wget http://webdav.todo.gr.jp/download/experimental/mod_encoding.c.apache2.20040616
cp mod_encoding.c.apache2.20040616 mod_encoding-20020611a/mod_encoding.c
cd ./mod_encoding-20020611a/lib
./configure
gmake #gmakeじゃないとコンパイルできない
su
gmake install
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/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
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
cd ../
./configure --with-apxs=/usr/local/sbin/apxs
gmake
su
gmake install
/usr/local/share/apache2/build/libtool --mode=install cp mod_encoding.so /usr/local/libexec/apache2/
cp mod_encoding.so /usr/local/libexec/apache2/mod_encoding.so
cp: mod_encoding.so: No such file or directory
apxs:Error: Command failed with rc=65536
.
gmake[1]: *** [install-exec-local] エラー 1
gmake[1]: Leaving directory `/usr/home/src/mod_encoding-20020611a'
gmake: *** [install-am] エラー 2
- 自力でmod_encoding.soをコンパイルする
gcc -shared -o mod_encoding.so mod_encoding.o -Wc,-Wall -L/usr/local/lib -Llib -liconv_hook
ls mod_encoding.so
mod_encoding.so
cp mod_encoding.so /usr/local/libexec/apache2
LoadFile /usr/local/lib/libiconv.so
LoadModule encoding_module libexec/apache2/mod_encoding.so
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
<IfModule mod_encoding.c>
EncodingEngine on
NormalizeUsername on
SetServerEncoding UTF-8
DefaultClientEncoding JA-AUTO-SJIS-MS SJIS
</IfModule>
- 問題点
- この状態で、
- WebDriveからは問題なく利用できるが、
- Windows2000 の Web フォルダからはマウントできません。