このチュートリアルでは、ISPConfig3のインストール用にDebianJessieサーバー(Apache2、BIND、Dovecotを使用)を準備する方法と、ISPConfig3をインストールする方法を示します。WebホスティングコントロールパネルISPConfig3では、Webブラウザーを介して次のサービスを構成できます。 ApacheまたはnginxWebサーバー、Postfixメールサーバー、CourierまたはDovecot IMAP / POP3サーバー、MySQL、BINDまたはMyDNSネームサーバー、PureFTPd、SpamAssassin、ClamAVなど。このセットアップは、Apache(nginxの代わりに)、BIND(MyDNSの代わりに)、およびDovecot(Courierの代わりに)を対象としています。
1予備的注意
このチュートリアルでは、ホスト名server1.example.comとIPアドレス192.168.1.100およびゲートウェイ192.168.1.1を使用します。これらの設定は異なる場合があるため、必要に応じて置き換える必要があります。先に進む前に、Debian 8の最小インストールが必要です。これは、ホスティングプロバイダーからのDebian最小イメージであるか、最小Debianサーバーチュートリアルを使用してベースシステムをセットアップしている可能性があります。
2 SSHサーバーをインストールします(オプション)
システムのインストール中にOpenSSHサーバーをインストールしなかった場合は、今すぐインストールできます。
apt-get install ssh openssh-server
今後は、PuTTYなどのSSHクライアントを使用して、ワークステーションからDebian Jessieサーバーに接続し、このチュートリアルの残りの手順に従うことができます。
3シェルテキストエディタをインストールします(オプション)
nanoを使用します このチュートリアルのテキストエディタ。一部のユーザーはクラシックなviエディターを好むため、ここで両方のエディターをインストールします。デフォルトのviプログラムは、DebianとUbuntuで奇妙な動作をします。これを修正するには、vim-noxをインストールします:
apt-get install nano vim-nox
viがお気に入りのエディタである場合は、次のコマンドでnanoをviに置き換えてファイルを編集します。
4ホスト名を構成します
サーバーのホスト名は、「server1.example.com」のようなサブドメインである必要があります。 「example.com」のようなサブドメイン部分のないドメイン名をホスト名として使用しないでください。後でメールの設定で問題が発生する可能性があります。まず、/ etc / hostsのホスト名を確認し、必要に応じて変更する必要があります。行は次のようになります:「IPアドレス-スペース-ドメインを含む完全なホスト名-スペース-サブドメイン部分」。ホスト名server1.example.comの場合、ファイルは次のようになります。
nano /etc/hosts
127.0.0.1 localhost.localdomain localhost 192.168.1.100 server1.example.com server1 # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
次に、/ etc / hostnameファイルを編集します:
nano /etc/hostname
この場合、サブドメイン部分のみが含まれます:
server1
最後に、サーバーを再起動して変更を適用します。
reboot
もう一度ログインし、次のコマンドを使用してホスト名が正しいかどうかを確認します。
hostname
hostname -f
出力は次のようになります:
[email protected]:/tmp# hostname
server1
[email protected]:/tmp# hostname -f
server1.example.com
5Debianインストールを更新する
まず、/ etc / apt /sources.listにjessie/updatesリポジトリが含まれていること(これにより、常に最新のセキュリティ更新を取得できるようになります)、およびcontribリポジトリとnon-freeリポジトリが有効になっていることを確認します(libapache2-などの一部のパッケージ)。 mod-fastcgiはメインリポジトリにありません)。
nano /etc/apt/sources.list
#deb cdrom:[Debian GNU/Linux 8.0.0 _Jessie_ - Official amd64 NETINST Binary-1 20150425-12:50]/ jessie main
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
実行:
apt-get update
aptパッケージデータベースを更新するには
apt-get upgrade
最新のアップデートがある場合はそれをインストールします。
6デフォルトのシェルを変更する
/ bin/shは/bin/ dashへのシンボリックリンクですが、/ bin/dashではなく/bin/bashが必要です。したがって、これを行います:
dpkg-reconfigure dash
デフォルトのシステムシェル(/ bin / sh)としてダッシュを使用しますか? <-いいえ
これを行わないと、ISPConfigのインストールが失敗します。
7システム時計を同期する
システムクロックをNTPと同期することをお勧めします( n etwork t ime p rotocol)インターネット上のサーバー。実行するだけです
apt-get install ntp ntpdate
システム時刻は常に同期されます。
8 Postfix、Dovecot、MySQL、phpMyAdmin、rkhunter、binutilsをインストールします
Postfix、Dovecot、MySQL、rkhunter、binutilsを1つのコマンドでインストールできます:
apt-get install postfix postfix-mysql postfix-doc mariadb-client mariadb-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve dovecot-lmtpd sudo
MariaDBよりもMySQLを使用する場合は、上記のコマンドのパッケージ「mariadb-clientmariadb-server」を「mysql-clientmysql-server」に置き換えてください。
次の質問があります:
メール構成の一般的なタイプ:<-インターネットサイト
システムメール名:<-server1.example.com
MariaDB「root」ユーザーの新しいパスワード:<-yourrootsqlpassword
繰り返しますMariaDBの「root」ユーザーのパスワード:<-yourrootsqlpassword
次に、PostfixでTLS / SSLと送信ポートを開きます:
nano /etc/postfix/master.cf
次のようにsubmissionセクションとsmtpsセクションのコメントを解除し、必要に応じて行を追加して、master.cfファイルのこのセクションが以下のセクションとまったく同じになるようにします。
[...] submission inet n - - - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
-o syslog_name=postfix/smtps
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING [...]
その後、Postfixを再起動します:
service postfix restart
MariaDBがローカルホストだけでなくすべてのインターフェースでリッスンするようにしたいので、/ etc / mysql / my.cnfを編集して、bind-address =127.0.0.1:
の行をコメントアウトします。nano /etc/mysql/my.cnf
[...] # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. #bind-address = 127.0.0.1 [...]>
次に、MySQLを再起動します:
service mysql restart
次に、ネットワークが有効になっていることを確認します。実行
netstat -tap | grep mysql
出力は次のようになります。
[email protected]:/tmp# netstat -tap | grep mysql
tcp6 0 0 [::]:mysql [::]:* LISTEN 27371/mysqld
9 Amavisd-new、SpamAssassin、Clamavをインストール
amavisd-new、SpamAssassin、ClamAVをインストールするには、
を実行します。apt-get install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl
ISPConfig 3のセットアップでは、SpamAssassinフィルターライブラリを内部的にロードするamavisdを使用するため、SpamAssassinを停止してRAMを解放できます。
service spamassassin stop
systemctl disable spamassassin
10 Apache2、PHP5、phpMyAdmin、FCGI、suExec、Pear、およびmcryptをインストールします
Apache2、PHP5、phpMyAdmin、FCGI、suExec、Pear、およびmcryptは、次のようにインストールできます。
apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libruby libapache2-mod-python php5-curl php5-intl php5-memcache php5-memcached php5-pspell php5-recode php5-sqlite php5-tidy php5-xmlrpc php5-xsl memcached libapache2-mod-passenger
次の質問が表示されます:
Web server to reconfigure automatically: <- apache2
Configure database for phpmyadmin with dbconfig-common? <- yes
Enter the password of the administrative user? <- yourrootmysqlpassword
Enter the phpmyadmin application password? <- Just press enter
次に、次のコマンドを実行して、Apacheモジュールのsuexec、rewrite、ssl、actions、およびinclude(さらに、WebDAVを使用する場合はdav、dav_fs、およびauth_digest)を有効にします。
a2enmod suexec rewrite ssl actions include dav_fs dav auth_digest cgi
次のコマンドを実行してモジュールを有効にします:
service apache2 restart
11 SuPHPをインストールします(オプション、非推奨)
更新された注:SuPHPはもうインストールしないでください。手順11に進んでください
SuPHPはDebianJessieでは利用できなくなりました。 php-fpmやphp-fcgiなどのより優れたPHPモードが利用可能であるため、supphpモードはISPConfigで使用しないでください。従来の理由で本当にsuphpが必要な場合は、この章の手順に従って手動でコンパイルしてください。
apt-get install apache2-dev build-essential autoconf automake libtool flex bison debhelper binutils
cd /usr/local/src
wget http://suphp.org/download/suphp-0.7.2.tar.gz
tar zxvf suphp-0.7.2.tar.gz
wget -O suphp.patch https://lists.marsching.com/pipermail/suphp/attachments/20130520/74f3ac02/attachment.patch
patch -Np1 -d suphp-0.7.2 < suphp.patch
cd suphp-0.7.2
autoreconf -if
./configure --prefix=/usr/ --sysconfdir=/etc/suphp/ --with-apr=/usr/bin/apr-1-config --with-apache-user=www-data --with-setid-mode=owner --with-logfile=/var/log/suphp/suphp.log
make
make install
suphp構成ディレクトリとsuphp.confファイルを作成します:
mkdir /var/log/suphp
mkdir /etc/suphp
nano /etc/suphp/suphp.conf
[global]
;Path to logfile
logfile=/var/log/suphp/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=www-data
;Path all scripts have to be in
docroot=/var/www
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0022
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
x-httpd-suphp="php:/usr/bin/php-cgi"
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
umask=0022
次に、設定ファイルを追加して、apacheにsuphpモジュールをロードします。
echo "LoadModule suphp_module /usr/lib/apache2/modules/mod_suphp.so" > /etc/apache2/mods-available/suphp.load
次に、/ etc / apache2 / mods-available / suphp.conf ...
を開きます。nano /etc/apache2/mods-available/suphp.conf
...そして次のコンテンツを追加します:
<IfModule mod_suphp.c> AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml suPHP_AddHandler application/x-httpd-suphp <Directory /> suPHP_Engine on </Directory> # By default, disable suPHP for debian packaged web applications as files # are owned by root and cannot be executed by suPHP because of min_uid. <Directory /usr/share> suPHP_Engine off </Directory> # # Use a specific php config file (a dir which contains a php.ini file) # suPHP_ConfigPath /etc/php5/cgi/suphp/ # # Tells mod_suphp NOT to handle requests with the type <mime-type>. # suPHP_RemoveHandler <mime-type> </IfModule>のリクエスト
apacheでsuphpモジュールを有効にします:
a2enmod suphp
その後、Apacheを再起動します:
service apache2 restart
12XCacheとPHP-FPM
XCacheは、PHP中間コードをキャッシュおよび最適化するための無料のオープンPHPオペコードキャッシャーです。これは、eAcceleratorやAPCなどの他のPHPオペコードキャッシャーに似ています。 PHPページを高速化するために、これらのいずれかをインストールすることを強くお勧めします。
XCacheは次のようにインストールできます:
apt-get install php5-xcache
次にApacheを再起動します:
service apache2 restart
12.2 PHP-FPM
ISPConfig 3.0.5以降、Apacheで使用するために選択できる追加のPHPモードがあります:PHP-FPM。
PHP-FPMをApacheで使用するには、mod_fastcgi Apacheモジュールが必要です(これをmod_fcgidと混同しないでください。これらは非常に似ていますが、PHP-FPMをmod_fcgidで使用することはできません)。 PHP-FPMとmod_fastcgiは次のようにインストールできます:
apt-get install libapache2-mod-fastcgi php5-fpm
モジュールを有効にして、Apacheを再起動してください:
a2enmod actions fastcgi alias
service apache2 restart
13Mailmanのインストール
ISPConfigを使用すると、Mailmanメーリングリストを管理(作成/変更/削除)できます。この機能を利用する場合は、次のようにMailmanをインストールします。
apt-get install mailman
少なくとも1つの言語を選択してください。例:
Languages to support: <-- en (English)
Missing site list <-- Ok
Mailmanを開始する前に、mailmanという最初のメーリングリストを作成する必要があります。
newlist mailman
[email protected]:~# newlist mailman
Enter the email of the person running the list: <-- admin email address, e.g. [email protected]
Initial mailman password: <-- admin password for the mailman list
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases' program:
## mailman mailing list
mailman: "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin: "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces: "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm: "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join: "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave: "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner: "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request: "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe: "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"
Hit enter to notify mailman owner... <-- ENTER
[email protected]:~#
後で/etc/aliasesを開きます...
vi /etc/aliases
...そして次の行を追加します:
[...] ## mailman mailing list mailman: "|/var/lib/mailman/mail/mailman post mailman" mailman-admin: "|/var/lib/mailman/mail/mailman admin mailman" mailman-bounces: "|/var/lib/mailman/mail/mailman bounces mailman" mailman-confirm: "|/var/lib/mailman/mail/mailman confirm mailman" mailman-join: "|/var/lib/mailman/mail/mailman join mailman" mailman-leave: "|/var/lib/mailman/mail/mailman leave mailman" mailman-owner: "|/var/lib/mailman/mail/mailman owner mailman" mailman-request: "|/var/lib/mailman/mail/mailman request mailman" mailman-subscribe: "|/var/lib/mailman/mail/mailman subscribe mailman" mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"
実行
newaliases
その後、Postfixを再起動します:
service postfix restart
最後に、MailmanApache構成を有効にする必要があります。
ln -s /etc/mailman/apache.conf /etc/apache2/conf-enabled/mailman.conf
これにより、すべてのApachevhostのエイリアス/cgi-bin / mailman /が定義されます。つまり、http://server1.example.com/cgi-bin/mailman/admin/にあるリストのMailman管理インターフェイスにアクセスできます。メーリングリストのユーザー向けのWebページは、http://server1.example.com/cgi-bin/mailman/listinfo/にあります。
http://server1.example.com/pipermailの下に、メーリングリストのアーカイブがあります。
その後、Apacheを再起動します:
service apache2 restart
次に、Mailmanデーモンを起動します:
service mailman start
14PureFTPdとクォータのインストール
PureFTPdとquotaは、次のコマンドでインストールできます:
apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool
ファイル/etc/ default / pure-ftpd-common ...
を編集しますnano /etc/default/pure-ftpd-common
...そして、開始モードがスタンドアロンに設定されていることを確認し、VIRTUALCHROOT =trueを設定します:
[...] STANDALONE_OR_INETD=standalone [...] VIRTUALCHROOT=true [...]
次に、FTPおよびTLSセッションを許可するようにPureFTPdを構成します。 FTPは、すべてのパスワードとすべてのデータがクリアテキストで転送されるため、非常に安全でないプロトコルです。 TLSを使用することで、通信全体を暗号化できるため、FTPの安全性が大幅に向上します。
FTPおよびTLSセッションを許可する場合は、
を実行します。echo 1 > /etc/pure-ftpd/conf/TLS
TLSを使用するには、SSL証明書を作成する必要があります。 / etc / ssl / private /に作成するので、最初にそのディレクトリを作成します:
mkdir -p /etc/ssl/private/
その後、次のようにSSL証明書を生成できます。
openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
Country Name (2 letter code) [AU]: <-- Enter your Country Name (e.g., "DE").
State or Province Name (full name) [Some-State]: <-- Enter your State or Province Name.
Locality Name (eg, city) []: <-- Enter your City.
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter your Organization Name (e.g., the name of your company).
Organizational Unit Name (eg, section) []: <-- Enter your Organizational Unit Name (e.g. "IT Department").
Common Name (eg, YOUR name) []: <-- Enter the Fully Qualified Domain Name of the system (e.g. "server1.example.com").
Email Address []: <-- Enter your Email Address.
SSL証明書の権限を変更します:
chmod 600 /etc/ssl/private/pure-ftpd.pem
次に、PureFTPdを再起動します:
service pure-ftpd-mysql restart
/ etc/fstabを編集します。私の場合は次のようになります(マウントポイントのあるパーティションに、usrjquota =quote.user、grpjquota =quote.group、jqfmt =vfsv0を追加しました/):
nano /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=3dc3b58d-97e5-497b-8254-a913fdfc5408 / ext4 errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 1
# swap was on /dev/sda5 during installation
UUID=36bf486e-8f76-492d-89af-5a8eb3ce8a02 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
クォータを有効にするには、次のコマンドを実行します。
mount -o remount /
quotacheck -avugm
quotaon -avug
15BINDDNSサーバーのインストール
BINDは次のようにインストールできます:
apt-get install bind9 dnsutils
16 Vlogger、Webalizer、AWStatsをインストール
Vlogger、Webalizer、AWStatsは次のようにインストールできます:
apt-get install vlogger webalizer awstats geoip-database libclass-dbi-mysql-perl
その後、/ etc / cron.d/awstatsを開きます...
nano /etc/cron.d/awstats
...そしてそのファイルのすべてをコメントアウトします:
#MAILTO=root #*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh # Generate static reports: #10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh
17Jailkitをインストールする
Jailkitは、SSHユーザーをchrootする場合にのみ必要です。次のようにインストールできます(重要:JailkitはISPConfigの前にインストールする必要があります-後でインストールすることはできません!):
apt-get install build-essential autoconf automake libtool flex bison debhelper binutils
cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.17.tar.gz
tar xvfz jailkit-2.17.tar.gz
cd jailkit-2.17
./debian/rules binary
これで、次のようにJailkit.debパッケージをインストールできます。
cd ..
dpkg -i jailkit_2.17-1_*.deb
rm -rf jailkit-2.17*
18fail2banをインストール
これはオプションですが、ISPConfigモニターがログを表示しようとするため、推奨されます:
apt-get install fail2ban
fail2banでPureFTPdとDovecotを監視するには、ファイル/etc/fail2ban/jail.local:
を作成します。nano /etc/fail2ban/jail.local
[pureftpd] enabled = true port = ftp filter = pureftpd logpath = /var/log/syslog maxretry = 3 [dovecot-pop3imap] enabled = true filter = dovecot-pop3imap action = iptables-multiport[name=dovecot-pop3imap, port="pop3,pop3s,imap,imaps", protocol=tcp] logpath = /var/log/mail.log maxretry = 5 [postfix-sasl] enabled = true port = smtp filter = postfix-sasl logpath = /var/log/mail.log maxretry = 3
次に、次の2つのフィルターファイルを作成します。
nano /etc/fail2ban/filter.d/pureftpd.conf
[Definition] failregex = .*pure-ftpd: \(.*@<HOST>\) \[WARNING\] Authentication failed for user.* ignoreregex =
nano /etc/fail2ban/filter.d/dovecot-pop3imap.conf
[Definition] failregex = (?: pop3-login|imap-login): .*(?:Authentication failure|Aborted login \(auth failed|Aborted login \(tried to use disabled|Disconnected \(auth failed|Aborted login \(\d+ authentication attempts).*rip=(?P<host>\S*),.* ignoreregex =
次に、postfix-saslフィルターファイルにignoreregex行を追加するには、次のコマンドを実行します。
echo "ignoreregex =" >> /etc/fail2ban/filter.d/postfix-sasl.conf
その後、fail2banを再起動します:
service fail2ban restart
19squirrelmailをインストールする
SquirrelMailウェブメールクライアントをインストールするには、
を実行しますapt-get install squirrelmail
次に、SquirrelMailを設定します:
squirrelmail-configure
Dovecot-IMAP / -POP3を使用していることをSquirrelMailに通知する必要があります:
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> <-- D
SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others. If you select your IMAP server, this option will
set some pre-defined settings for that server.
Please note that you will still need to go through and make sure
everything is correct. This does not change everything. There are
only a few settings that this will change.
Please select your IMAP server:
bincimap = Binc IMAP server
courier = Courier IMAP server
cyrus = Cyrus IMAP server
dovecot = Dovecot Secure IMAP server
exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington's IMAP server
gmail = IMAP access to Google mail (Gmail) accounts
quit = Do not change anything
Command >> <-- dovecot
SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others. If you select your IMAP server, this option will
set some pre-defined settings for that server.
Please note that you will still need to go through and make sure
everything is correct. This does not change everything. There are
only a few settings that this will change.
Please select your IMAP server:
bincimap = Binc IMAP server
courier = Courier IMAP server
cyrus = Cyrus IMAP server
dovecot = Dovecot Secure IMAP server
exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington's IMAP server
gmail = IMAP access to Google mail (Gmail) accounts
quit = Do not change anything
Command >> dovecot
imap_server_type = dovecot
default_folder_prefix =
trash_folder = Trash
sent_folder = Sent
draft_folder = Drafts
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false
optional_delimiter = detect
delete_folder = false
Press any key to continue... <-- press a key
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> <-- S
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color on
S Save data
Q Quit
Command >> <-- Q
次に、/squirrelmailまたは/webmailエイリアスを使用して、(ISPConfigを介して作成された)Webサイト内からSquirrelMailを使用できるように構成します。したがって、Webサイトがwww.example.comの場合、www.example.com/squirrelmailまたはwww.example.com/webmailを使用してSquirrelMailにアクセスできます。
SquirrelMailのApache設定はファイル/etc/squirrelmail/apache.confにありますが、このファイルは/etc/apache2/conf.d/ディレクトリにないため、Apacheによってロードされません。したがって、/ etc / squirrelmail / apache.confを指す/etc/apache2/conf.d/ディレクトリにsquirrelmail.confというシンボリックリンクを作成し、後でApacheをリロードします。
cd /etc/apache2/conf-enabled/
ln -s ../../squirrelmail/apache.conf squirrelmail.conf
service apache2 reload
/etc/apache2/conf-enabled/squirrelmail.confを開きます...
nano /etc/apache2/conf-enabled/squirrelmail.conf
...そして、コンテナに次の行を追加して、ISPConfigでWebサイトに選択したPHPモードに関係なく、mod_phpがSquirrelMailへのアクセスに使用されるようにします。
[...] <Directory /usr/share/squirrelmail> Options FollowSymLinks <IfModule mod_php5.c> AddType application/x-httpd-php .php php_flag magic_quotes_gpc Off php_flag track_vars On php_admin_flag allow_url_fopen Off php_value include_path . php_admin_value upload_tmp_dir /var/lib/squirrelmail/tmp php_admin_value open_basedir /usr/share/squirrelmail:/etc/squirrelmail:/var/lib/squirrelmail:/etc/hostname:/etc/mailname php_flag register_globals off </IfModule> <IfModule mod_dir.c> DirectoryIndex index.php </IfModule> # access to configtest is limited by default to prevent information leak <Files configtest.php> order deny,allow deny from all allow from 127.0.0.1 </Files> </Directory> [...]
ディレクトリ/var/ lib / squirrelmail / tmp ...
を作成しますmkdir /var/lib/squirrelmail/tmp
...そしてそれをユーザーが所有するようにするwww-data:
chown www-data /var/lib/squirrelmail/tmp
Apacheを再度リロードします:
service apache2 reload
すでにそれだけです-/etc/apache2/conf-enabled/squirrelmail.confは、SquirrelMailのインストールディレクトリ/ usr / share/squirrelmailを指す/squirrelmailというエイリアスを定義しています。
これで、次のようにWebサイトからSquirrelMailにアクセスできます。
http://192.168.0.100/squirrelmail
http://www.example.com/squirrelmail
次のように、ISPConfigコントロールパネルの仮想ホストからアクセスすることもできます(ISPConfigをインストールした後、次の章を参照してください)(これにはISPConfigでの構成は必要ありません):
http://server1.example.com:8080/squirrelmail
/squirrelmailの代わりにエイリアス/webmailを使用する場合は、/ etc / apache2 / conf-enabled / squirrelmail.conf
を開くだけです。nano /etc/apache2/conf-enabled/squirrelmail.conf
...そして、Alias / webmail / usr / share / squirrelmail:
という行を追加します。Alias /squirrelmail /usr/share/squirrelmail Alias /webmail /usr/share/squirrelmail [...]
次に、Apacheをリロードします:
service apache2 reload
これで、次のようにSquirrelmailにアクセスできます。
http://192.168.1.100/webmail
http://www.example.com/webmail
http://server1.example.com:8080/webmail(ISPConfigをインストールした後、次の章)
If you'd like to define a vhost like webmail.example.com where your users can access SquirrelMail, you'd have to add the following vhost configuration to /etc/apache2/conf-enabled/squirrelmail.conf:
vi /etc/apache2/conf-enabled/squirrelmail.conf
[...] <VirtualHost *:80> DocumentRoot /usr/share/squirrelmail ServerName webmail.example.com </VirtualHost>
Of course, there must be a DNS record for webmail.example.com that points to the IP address that you use in the vhost configuration. Also make sure that the vhost webmail.example.com does not exist in ISPConfig (otherwise both vhosts will interfere with each other!).
Now reload Apache...
/etc/init.d/apache2 reload
... and you can access SquirrelMail under http://webmail.example.com!
20 Install ISPConfig 3
To install ISPConfig 3 from the latest released version, do this:
cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/
The next step is to run
php -q install.php
This will start the ISPConfig 3 installer. The installer will configure all services like Postfix, Dovecot, etc. for you. A manual setup as required for ISPConfig 2 (perfect setup guides) is not necessary.
NOTE:Do not be alarmed that the ISPConfig 3 installer identifies Debian Jessie as unknown version. This does not interfere with any functionality and will be fixed with the next ISPConfig update.
[email protected]:/tmp/ispconfig3_install/install# php -q install.php
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
--------------------------------------------------------------------------------
_____ ___________ _____ __ _ ____
|_ _/ ___| ___ \ / __ \ / _(_) /__ \
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ /
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ |
_| |_/\__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/
__/ |
|___/
--------------------------------------------------------------------------------
>> Initial configuration
Operating System: Debian or compatible, unknown version.
Following will be a few questions for primary configuration so be careful.
Default values are in [brackets] and can be accepted with .
Tap in "quit" (without the quotes) to stop the installer.
Select language (en,de) [en]: <-- ENTER
Installation mode (standard,expert) [standard]: <-- ENTER
Full qualified hostname (FQDN) of the server, eg server1.domain.tld [server1.example.com]: <-- ENTER
MySQL server hostname [localhost]: <-- ENTER
MySQL root username [root]: <-- ENTER
MySQL root password []: <-- yourrootsqlpassword
MySQL database to create [dbispconfig]: <-- ENTER
MySQL charset [utf8]: <-- ENTER
Generating a 4096 bit RSA private key
.............................................................++
.........................................................................................................................++
writing new private key to 'smtpd.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]: <-- ENTER
State or Province Name (full name) [Some-State]: <-- ENTER
Locality Name (eg, city) []: <-- ENTER
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER
Organizational Unit Name (eg, section) []: <-- ENTER
Common Name (e.g. server FQDN or YOUR name) []: <-- ENTER
Email Address []: <-- ENTER
Configuring Jailkit
Configuring Dovecot
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring Pureftpd
Configuring BIND
Configuring Apache
Configuring Vlogger
Configuring Apps vhost
Configuring Bastille Firewall
Configuring Fail2ban
Installing ISPConfig
ISPConfig Port [8080]: <-- ENTER
Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]: <-- ENTER
Generating RSA private key, 4096 bit long modulus
.................................................................................................++
........++
e is 65537 (0x10001)
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]: <-- ENTER
State or Province Name (full name) [Some-State]: <-- ENTER
Locality Name (eg, city) []: <-- ENTER
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER
Organizational Unit Name (eg, section) []: <-- ENTER
Common Name (e.g. server FQDN or YOUR name) []: <-- ENTER
Email Address []: <-- ENTER
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: <-- ENTER
An optional company name []: <-- ENTER
writing RSA key
Configuring DBServer
Installing ISPConfig crontab
no crontab for root
no crontab for getmail
Restarting services ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld ..
Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..
Stopping Postfix Mail Transport Agent: postfix.
Starting Postfix Mail Transport Agent: postfix.
Stopping amavisd: amavisd-new.
Starting amavisd: amavisd-new.
Stopping ClamAV daemon: clamd.
Starting ClamAV daemon: clamd .
Restarting IMAP/POP3 mail server: dovecot.
[Tue May 07 02:36:22 2013] [warn] NameVirtualHost *:443 has no VirtualHosts
[Tue May 07 02:36:22 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
[Tue May 07 02:36:23 2013] [warn] NameVirtualHost *:443 has no VirtualHosts
[Tue May 07 02:36:23 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
Restarting web server: apache2 ... waiting .
Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -H -O clf:/var/log/pure-ftpd/transfer.log -Y 1 -D -u 1000 -A -E -b -8 UTF-8 -B
Installation completed.
[email protected]:/tmp/ispconfig3_install/install#
The installer automatically configures all underlying services, so no manual configuration is needed.
You now also have the possibility to let the installer create an SSL vhost for the ISPConfig control panel, so that ISPConfig can be accessed using https:// instead of http://. To achieve this, just press ENTER when you see this question:Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]:.
Afterwards you can access ISPConfig 3 under http(s)://server1.example.com:8080/ or http(s)://192.168.0.100:8080/ ( http or https depends on what you chose during installation). Log in with the username admin and the password admin (you should change the default password after your first login):
The system is now ready to be used.
20.1 ISPConfig 3 Manual
ISPConfig 3の使用方法を学ぶために、ISPConfig3マニュアルをダウンロードすることを強くお勧めします。
300ページ以上で、ISPConfig(管理者、再販業者、クライアント)の背後にある概念をカバーし、ISPConfig 3をインストールおよび更新する方法を説明し、有効な入力の例とともにISPConfigのすべてのフォームとフォームフィールドのリファレンスを含み、チュートリアルを提供しますISPConfig 3の最も一般的なタスクについても説明します。また、サーバーをより安全にする方法を示し、最後にトラブルシューティングのセクションがあります。
20.2 ISPConfig Monitor App For Android
With the ISPConfig Monitor App, you can check your server status and find out if all services are running as expected. You can check TCP and UDP ports and ping your servers. In addition to that you can use this app to request details from servers that have ISPConfig installed (please note that the minimum installed ISPConfig 3 version with support for the ISPConfig Monitor App is 3.0.3.3! ); these details include everything you know from the Monitor module in the ISPConfig Control Panel (e.g. services, mail and system logs, mail queue, CPU and memory info, disk usage, quota, OS details, RKHunter log, etc.), and of course, as ISPConfig is multiserver-capable, you can check all servers that are controlled from your ISPConfig master server.
For download and usage instructions, please visit http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/.
21 Additional Notes
21.1 OpenVZ
If the Debian server that you've just set up in this tutorial is an OpenVZ container (virtual machine), you should do this on the host system (I'm assuming that the ID of the OpenVZ container is 101 - replace it with the correct VPSID on your system):
VPSID=101
for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
do
vzctl set $VPSID --capability ${CAP}:on --save
done
22 Links
- Debian:http://www.debian.org/
- ISPConfig:http://www.ispconfig.org/