FreeBSD/Apache2.2 のバックアップ(No.1)
- バックアップ一覧
- 差分 を表示
- 現在との差分 を表示
- 現在との差分 - Visual を表示
- ソース を表示
- FreeBSD/Apache2.2 へ行く。
- 1 (2007-03-15 (木) 21:41:55)
- 2 (2007-03-15 (木) 21:58:31)
Apache2.2/PHP 5.2.1にバージョンアップ †
環境 †
- FreeBSD 6.1-RELEASE
- PHP 5.2.1
- Apache/2.2.4
インストール/アップグレード †
- /usr/local/etc/pkgtools.confのMAKE_ARGSに以下を追加
'www/apache*' =>[ 'WITH_PROXY_MODULES=no', 'WITH_SUEXEC=yes', 'SUEXEC_DOCROOT=/home', 'SUEXEC_LOGFILE=/var/log/apache/suexec.log', ],
- アップグレードの場合
# portupgrade -o www/apache22 apache
- インストールの場合
# portupgrade apache
起動するとエラーが出てる †
- Apache2.2を起動するとこんなエラーが出てる。
[warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
- accf_http という FreeBSD のカーネルモジュールが無いということらしい
- このようにモジュールを読み込んでやると警告エラーは出なくなる。
# kldload accf_http.ko
- 毎回読み込むのが面倒なので、/boot/loader.confに以下を追加.
# vi /boot/loader.conf accf_http_load="YES"
- 下記のようなエラーが出る場合
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for. ServerName
- httpd.confにServerName 127.0.0.1を追加するとエラーが出なくなります。
PHP5.2.1にバージョンアップ †
# tar zxvf php-5.2.1.tar.gz # cd php-5.2.1 # ./configure --with-mysql=/usr/local \ --enable-cgi --disable-cli --disable-pear \ --enable-force-cgi-redirect \ --with-tsrm-pth --enable-mbstring \ --enable-mbstr-enc-trans --enable-trans-sid \ --enable-versioning #make ;make install
- コンフィグでエラーがlibxml2をインストールするようにいっているらしい
configure: error: xml2-config not found. Please check your libxml2 installation.
- /usr/ports/textproc/libxml2
# cd /usr/ports/textproc/libxml2 # make install
- phpをバージョンアップするとeacceleratorも再インストールする必要がある。 eAcceleratorインストール
自己認証 †
- 秘密鍵の作成
# openssl genrsa -out /usr/local/etc/apache22/server.key 1024
- 秘密鍵からサーバのx509証明書発行要求(CSR)を作成
# openssl req -new -key /usr/local/etc/apache22/server.key -out /root/server.csr
- 自己署名で証明書を作成
# openssl x509 -in /root/server.csr -out /usr/local/etc/apache22/server.crt -req -signkey /usr/local/etc/apache22/server.key -days 365 Signature ok subject=/C=JP/ST=Kanagawa/L=Yokohama-Si/O=unpush network./CN=www.unpush.net/emailAddress=admin@unpush.net Getting Private key