HTTPサーバ
対象バージョン
httpd-2.0.54-10
インストール
HTTPサーバに必要なパッケージを3つインストールします。
DVDドライブにFedora Core 4のDVD-ROMをセットします。
# mount /media/cdrom[Enter]
# cd /media/cdrom/Fedora/RPMS[Enter]
# rpm -ihv apr-0.9.6-3.i386.rpm[Enter]
# rpm -ihv apr-util-0.9.6-2.i386.rpm[Enter]
# rpm -ihv httpd-2.0.54-10.i386.rpm[Enter]
# cd /[Enter]
# umount /media/cdrom[Enter]
# cd /media/cdrom/Fedora/RPMS[Enter]
# rpm -ihv apr-0.9.6-3.i386.rpm[Enter]
# rpm -ihv apr-util-0.9.6-2.i386.rpm[Enter]
# rpm -ihv httpd-2.0.54-10.i386.rpm[Enter]
# cd /[Enter]
# umount /media/cdrom[Enter]
設定
HTTPサーバの基本的な設定を行います。
viエディタでApacheの設定ファイルを開きます。
ファイル( /etc/httpd/conf/httpd.conf )
設定が終わったら、rcスクリプトを使用してHTTPサービスを起動します。 続いてランレベルの設定を変更し、次回からの起動を自動起動に設定します。
# vi /etc/httpd/conf/httpd.conf[Enter]
ファイル( /etc/httpd/conf/httpd.conf )
※該当箇所のみ変更※
ServerAdmin root@localhost
↓変更
ServerAdmin webmaster@ranonet.ne.jp
#ServerName www.example.com:80
↓変更
ServerName www.ranonet.ne.jp:80
DirectoryIndex index.html index.html.var
↓変更
DirectoryIndex welcome.htm index.html index.htm
AddDefaultCharset UTF-8
↓変更
AddDefaultCharset off
ServerAdmin root@localhost
↓変更
ServerAdmin webmaster@ranonet.ne.jp
#ServerName www.example.com:80
↓変更
ServerName www.ranonet.ne.jp:80
DirectoryIndex index.html index.html.var
↓変更
DirectoryIndex welcome.htm index.html index.htm
AddDefaultCharset UTF-8
↓変更
AddDefaultCharset off
設定が終わったら、rcスクリプトを使用してHTTPサービスを起動します。 続いてランレベルの設定を変更し、次回からの起動を自動起動に設定します。
# /etc/rc.d/init.d/httpd start[Enter]
# chkconfig httpd on[Enter]
# chkconfig httpd on[Enter]
