[ Thread > From: > Date: by Date: ][ Follow-Ups : List-archive Date Next by Thread Index :
[Fedora 839] Re: Redhat 9 での apacheの suexec の設定 ■新規■
saved in /usr/local/fml/.fml/system ---Install to お世話になります。 以前の投稿では文章がまとまってなかったので 今までやったことを整理してみました。 ☆目的 メーリングリストの fml の設定をブラウザにて行いたい。 ☆手順 RedHat 9 において fml のブラウザ設定を行うために以下の手順を用いた。 以下の文章中 # root で実行 % fml ユーザーで実行 を意味する。 ・RedHat 9 では標準的にインストールされた apache が suEXEC が使用できないようので apache をコンパイルしなおした。 # rpm -e httpd-2.0.40-21 error: Failed dependencies: httpd-mmn = 20020628 is needed by (installed) mod_perl-1.99_07-5 libaprutil.so.0 is needed is needed by (installed) php-4.2.2-17 libapr.so.0 is needed by (installed) mod_perl-1.99_07-5 webserver is needed by (installed) mod_perl-1.99_07-5 httpd >= 2.0.40 is (installed) mod_python-3.0.1-3 httpd-mmn = 20020628 is needed by (installed) redhat-config-httpd-1.0.1-18 上記依存関係が発生するので上記 rpm をアンインストールする。 上記以外にも以下の依存関係があるのでそれもアンインストールする。 # php-imap-4.2.2-17 # php-ldap-4.2.2-17 # php-4.2.2-17 # rpm -e httpd-2.0.40-21 ・apache をソースコードから suEXEC オプションを追加してコンパイルしなおした。 # tar xvzf httpd-2.0.48.tar.gz # cd httpd-2.0.48 # ./configure --enable-suexec --with-suexec-bin=/usr/sbin/suexec --with-suexec-caller=1000 --with-suexec-uidmin=500 --with-suexec-gidmin=500 --with-suexec-logfile=/var/log/httpd/ # make ; make install ・Apache の suEXEC を有効にする # chmod 4711 /usr/sbin/suexec ・Apache の設定ファイルを変更した /etc/httpd/conf/httpd.conf を編集した。 #AddHandler cgi-script .cgi→ AddHandler cgi-script .cgi /etc/httpd/conf/httpd.conf に以下の文章を追加した。 <Directory /home/fml/public_html/cgi-bin/fml/> Options ExecCGI </Directory> 編集を完了し、/etc/httpd/conf/httpd.conf をセーブします。 # /etc/rc.d/init.d/httpd restart←Apache を再起動する。 ・ fml メーリングリストを管理するユーザー名 fml を作成した。 # groupadd -g 1000 fml # useradd fml -u 1000 -g fml # passwd fml # Changing passwd for user fml # New password: # Retype new password: ・ fml メーリングリストで使用するディレクトリを作成した。 # mkdir /usr/local/fml /var/spool/ml # chown fml /usr/local/fml /var/spool/ml % mkdir /home/fml/public_html ・ fml を解凍しインストールを行った。 # su - fml % tar zxvf fml-4.0.X-release-XXXXXXXX.tar.gz % cd fml-4.0.X-release-XXXXXXXX % make install ・オプションはデフォルトで設定した。 ----------<fml インストール画面 開始>---------- ---NOT USING configuration file (for the Fml system to /tmp/e. (y/n) [n]y Installing fml system or ML-Admin-Group-Shared by (installed) mod_ssl-2.0.40-21 httpd is needed by /tmp/e Fixing Path: src .. libexec ..... sbin . cf . bin ................... Done. Back-up"ing templates in /tmp/e/drafts ... Generating nroff manuals: doc/man/fml.8 doc/man/makefml.1 Installing bin ... Installing sbin ... Installing libexec ... Installing cf ... Installing etc ... Installing sys ... Installing src ... Installing drafts ... Installing messages ... Installing doc ... Done. -- Enjoy Internetworking! ----------<fml インストール画面 終了>---------- ・fml をブラウザで設定するために以下のコマンドを入力した。 % /usr/local/fml/makefml admin.cgi config ************************************************************ <<< makefml --- FML CGI Configuration Interface --- >>> 0 END 1 USE_MOD_SSL YES 2 REAL_CGI_PATH /usr/local/fml/www/share/cgi-bin/fml 3 CGI_AUTHDB_DIR /usr/local/fml/www/authdb 4 CHANGE PASSWORD 5 REMAKE CGI SCRIPTS 6 MTA sendmail 7 HOW TO UPDATE ALIAS newaliases which ? (0-7) [0] 4.以下を順番に設定する. 「項目1」で「USE_MOD_SSL」を「NO」に変更する. which ? (0-7) [0] 1<リターン> Q: DO YOU USE SSL? (y/n) [y] n<リターン> 「項目2」の「REAL_CGI_PATH」を「/home/fml/public_html/cgi-bin/fml」に変更する. which ? (0-7) [0] 2<リターン> Q: REAL_CGI_PATH (directory) [/usr/local/fml/www/share/cgi-bin/fml] /home/fml/public_html/cgi-bin/fml<リターン> 「項目4」でユーザとパスワードを設定する. which ? (0-7) [0] 4<リターン> user (fml) [fml] fml<リターン> % /usr/local/apache/bin/htpasswd /usr/local/fml/www/authdb/admin/htpasswd fml New password:表示されないけど,パスワードを入れている Re-type new password:表示されないけど,もう一度パスワードを入れている Adding password for user fml 「項目6」でMTAにpostfixを指定する. which ? (0-7) [0] 6<リターン> 0 END 1 newaliases 2 postalias /home/fml/ml/etc/aliases which ? (0-2) [0] 2<リターン> 「項目0」でメニューを終了し CGI スクリプトを生成した。 ・ fml のブラウザ設定をする前の準備 以下のコマンドでディレクトリのパーミッションを変更した。 % find ~/public_html -type d -perm +022 -exec chmod go-w \{\} \;← ユーザーのホームディレクトリの public_html 以下を変更します。 % find ~/public_html -type f -perm +033 -exec chmod go-wx \{\} \;← ユーザーのホームディレクトリの public_html 以下を変更します。 % chown -R fml:fml ~/public_html← ユーザーのホームディレクトリの public_html 以下の所有者を変更します。 % cd ~/ % cd .. % chmod 711 fml← ユーザー fml のホームディレクトリのパーミッションも変更します。 ・以下ページをブラウザにて閲覧した http://(fmlが動いているホスト)/~fml/cgi-bin/fml/admin/menu.cgi ※エラーメッセージは控えておくのを忘れたので後日お送りします。 メッセージとしてはページが見つからないというようなものでした。 //////////////////// 全力でもってfedoraを習得します!! (剣豪 李 烈火の言葉より) 石川 喬 1 sendmail 2 postfix which ? (0-2) [0] 2<リターン> 「項目7」でaliasesファイルの書き換え方法を指定する. which ? (0-7) [0] 7<リターン> 0 END the first time) THIS HOST (beth.fml.org) IS [i386-unknown-netbsd1.4.] ---Please Define Your Fml System Configurations Personal Use or fmlserv you use? Personal, Group, Fmlserv (personal/group/fmlserv) [personal] DOMAIN NAME [sub.domain.com] FQDN [host.sub.domain.com] EXEC FILES DIRECTORY [/usr/local/fml] TOP LEVEL ML DIRECTORY [/var/spool/ml] Language (Japanese or English) [Japanese] TimeZone (TZ: e.g. +0900, -0300) [+0900] --- summary --- DOMAIN: sub.domain.com FQDN: apple.sub.domain.com EXEC_DIR: /usr/local/fml ML_DIR: /var/spool/ml Language: Japanese TimeZone: +0900 The Current Config is needed by (installed) mod_ssl-2.0.40-21 httpd-mmn = 20020628 is needed by (installed) webalizer-2.01_10-11 httpd >= 2.0.40 is needed by (installed) mod_python-3.0.1-3 httpd is needed by (installed) mod_perl-1.99_07-5 httpd-mmn = 20020628