サーバー設定 · 1 min read · Dec 13, 2025

完璧なサーバー - OpenSUSE 11.4 x86_64 [ISPConfig 2] - ページ 6

13 Webalizer

webalizerをインストールするには、次のコマンドを実行します。

yast2 -i webalizer

14 システムクロックの同期

システムクロックをNTPサーバーと同期させたい場合は、次のようにします。

yast2 -i xntp

次に、ntpのシステム起動リンクを追加し、ntpを開始します。

chkconfig -f –add ntp
/etc/init.d/ntp start

15 SpamAssassinに必要なPerlモジュールのインストール(ISPConfigに付属)

次のコマンドを実行します。

yast2 -i perl-HTML-Parser perl-Net-DNS perl-Digest-SHA1 perl-NetAddr-IP perl-Archive-Tar

16 終わり

サーバーの設定は完了しました。これからISPConfigをインストールすることができます。インストール手順は次のリンクを参照してください: http://www.ispconfig.org/manual_installation.htm

ISPConfigをインストールする前に、1つ重要なことを行う必要があります。/usr/include/stdio.hを開き、653行目のgetlineをparselineに置き換えます。

vi /usr/include/stdio.h

| [...] /* Like `getdelim', but reads up to a newline. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern _IO_ssize_t parseline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __wur; #endif [...] |

これを行わないと、次のエラーが発生してインストールが失敗します。

htpasswd.c:101: error: conflicting types for ‘getline’
/usr/include/stdio.h:653: note: previous declaration of ‘getline’ was here
make[2]: [htpasswd.o] Error 1
make[2]: Leaving directory `/home/ISPConfig-2.2.stable/install_ispconfig/compile_aps/apache_1.3.41/src/support’
make[1]:
[build-support] Error 1
make[1]: Leaving directory `/home/ISPConfig-2.2.stable/install_ispconfig/compile_aps/apache_1.3.41’
make: * [build] Error 2
ERROR: Could not make Apache

ISPConfigのインストールが成功した後、/usr/include/stdio.hの変更を元に戻すことができます(ただし、ISPConfigを更新するたびに元に戻すことを忘れないでください!)。

インストール後は、ISPConfig 2.x - 初めのステップガイドを確認してください。OpenSUSEでISPConfigとPHPを連携させるために絶対に必要なステップは、そのガイドの2.4.3章に記載されています。

/home/admispconfig/ispconfig/lib/config.inc.phpを開きます…

vi /home/admispconfig/ispconfig/lib/config.inc.php

… そして、$go_info[“server”][“apache2_php”]をaddhandlerに変更します。

| [...] $go_info["server"]["apache2_php"] = 'addhandler'; [...] |

ISPConfigのインストールが成功した後、次のコマンドを実行することを確認してください。

postconf -e ‘relay_domains = $mydestination, hash:/etc/postfix/relay’
/etc/init.d/postfix restart

16.1 SuExecに関する注意

CGIスクリプトをsuExecで実行したい場合は、ISPConfigで作成されたウェブサイトのウェブルートとして/srv/wwwを指定する必要があります。SUSEのsuExecは/srv/wwwをDoc_Rootとしてコンパイルされています。次のコマンドを実行します。

/usr/sbin/suexec2 -V

出力は次のようになります。

server1:~ # /usr/sbin/suexec2 -V
-D AP_DOC_ROOT=”/srv/www”
-D AP_GID_MIN=96
-D AP_HTTPD_USER=”wwwrun”
-D AP_LOG_EXEC=”/var/log/apache2/suexec.log”
-D AP_SAFE_PATH=”/usr/local/bin:/usr/bin:/bin”
-D AP_UID_MIN=96
-D AP_USERDIR_SUFFIX=”public_html”
server1:~ #

したがって、ISPConfigでsuExecを使用したい場合は、ISPConfigのインストール中にエキスパートモードを使用する場合、デフォルトのウェブルート(/srv/www)を変更しないでください(標準モードではウェブルートを変更できないため、いずれにせよsuExecを使用できます)。

17 リンク

Share: X/Twitter LinkedIn

新しい投稿を受信箱で受け取る

スパムはありません。いつでも購読を解除できます。