FreeBSD 2.2.7R Apache install

FreeBSD 2.2.7R にsambaを導入

  1. ソースを入手

    ソース一式をhttp://japache.infoscience.co.jp/ から辿り入手して下さい。
    ここでは、apache_1.3.6.tar.gzを使用しています。

  2. ソースの展開

    ここでは /usr/local/src に展開する事にします。

    # cp apache_1.3.6.tar.gz /usr/local/src
    # cd /usr/local/src
    # gzip -dc apache_1.3.6.tar.gz | tar xvf -
    
    apache_1.3.6 ディレクトリが作成されそれ以下に展開されたはずです。

  3. コンパイル

    Makefileの作成

    configure で作成します。
    srv# cd /usr/local/src/apache_1.3.6
    srv# ./configure
    Configuring for Apache, Version 1.3.6
     + Warning: Configuring Apache with default settings.
     + This is probably not what you really want.
     + Please read the README.configure and INSTALL files
     + first or at least run './configure --help' for
     + a compact summary of available options.
     + using installation path layout: Apache (config.layout)
    Creating Makefile
    Creating Configuration.apaci in src
    Creating Makefile in src
     + configured for FreeBSD 2.2.7 platform
     + setting C compiler to gcc
     + setting C pre-processor to gcc -E
     + checking for system header files
     + adding selected modules
     + doing sanity check on compiler and options
    Creating Makefile in src/support
    Creating Makefile in src/main
    Creating Makefile in src/ap
    Creating Makefile in src/regex
    Creating Makefile in src/os/unix
    Creating Makefile in src/modules/standard
    srv#
    

    makeとinstall

    make で作成し、make install で一発インストール!
    srv# make
    ...
    srv# make install
    ===> [mktree: Creating Apache installation tree]
    ./src/helpers/mkdir.sh /usr/local/apache/bin
    mkdir /usr/local/apache
    mkdir /usr/local/apache/bin
    ./src/helpers/mkdir.sh /usr/local/apache/bin
    ./src/helpers/mkdir.sh /usr/local/apache/libexec
    ...
    ...
    +--------------------------------------------------------+
    | You now have successfully built and installed the      |
    | Apache 1.3 HTTP server. To verify that Apache actually |
    | works correctly you now should first check the         |
    | (initially created or preserved) configuration files   |
    |                                                        |
    |   /usr/local/apache/conf/httpd.conf
    |                                                        |
    | and then you should be able to immediately fire up     |
    | Apache the first time by running:                      |
    |                                                        |
    |   /usr/local/apache/bin/apachectl start
    |                                                        |
    | Thanks for using Apache.       The Apache Group        |
    |                                http://www.apache.org/  |
    +--------------------------------------------------------+
    srv#
    

    起動確認

    起動
    srv# /usr/local/apache/bin/apachectl start
    /usr/local/apache/bin/apachectl start: httpd started
    srv#
    
    ブラウザで接続してみましょう!
    例では、http://srv/ で接続。
    サーバに接続し表示されればOK!。

    停止

    srv# kill -TERM `cat /usr/local/apache/logs/httpd.pid`
    srv#
    

  4. 設定

    httpd.conf

    /cgi-bin/ でCGIが利用できるように設定する。
    以下の部分のみを設定変更。

    ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
    
    #
    # "/usr/local/apache/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    
        AllowOverride None
        Options ExecCGI  ←★ NoneをExecCGIに変更
        Order allow,deny
        Allow from all
    
    

  5. マシーン起動時の自動起動設定


リンクはご自由に!

スパムが多いので頭に"_"追加してます。
_sugasawa@ceres.dti.ne.jp
Copyright (C) SUGASAWA. All rights reserved.