GNU/Linux >> Linux の 問題 >  >> Ubuntu

Debian10-11およびUbuntu20.04へのPerfectServerAutomatedISPConfig3のインストール

このチュートリアルでは、ISPConfig自動インストーラーを使用して独自のISPConfig3シングルサーバーセットアップをインストールする方法について説明します。このインストーラーは、古いPerfect Serverガイドに従いますが、よりモジュール化されており、簡単に実行できます。代わりに、サービスごとに専用サーバーを使用してマルチサーバーセットアップをセットアップする場合は、「パーフェクトマルチサーバーガイド」を参照してください。

このガイドは、Debian 10、Debian 11、Ubuntu20.04の両方で機能します。ホスト名server1.example.comを使用します。必要に応じて交換してください。このガイドでは、新しくインストールした空のベースOSが必要です。他のサービスを既に構成しているシステムでは、このOSを使用しないでください。

1。サーバーにログインします

ルートとしてログインするか、実行します

su -

続行する前に、サーバーのrootユーザーになります。 重要 :「su」だけでなく「su-」を使用する必要があります。そうしないと、DebianによってPATH変数が間違って設定されます。

2。ホスト名とホストを構成します

サーバーのホスト名は、「server1.example.com」のようなサブドメインである必要があります。 「example.com」のようなサブドメイン部分のないドメイン名をホスト名として使用しないでください。後でセットアップで問題が発生する可能性があります。まず、/ etc / hostsでホスト名を確認し、必要に応じて変更する必要があります。行は次のようになります:「IPアドレス-スペース-ドメインを含む完全なホスト名-スペース-サブドメイン部分」。ホスト名server1.example.comの場合、ファイルは次のようになります(一部の行は異なる場合があり、ホスティングプロバイダーごとに異なる場合があります):

nano /etc/hosts
127.0.0.1 localhost.localdomain   localhost
# This line should be changed to the correct servername:
127.0.1.1 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

最後に、サーバーを再起動して変更を適用します。

systemctl reboot

再度ログインし、次のコマンドを使用してホスト名が正しいかどうかを確認します。

hostname
hostname -f

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

[email protected]:~$ hostname
server1
[email protected]:~$ hostname -f
server1.example.com

また、サーバーを指すDNSプロバイダーでDNSレコードを設定する必要があります。パブリックIPを指すサブドメインのA(および/またはAAAA)レコードが必要です。

3。システムを更新する

システムパッケージを更新するには、次のコマンドを実行します。

apt update && apt upgrade

4。自動インストーラーを実行します

これで、自動インストーラーを実行できます。基本的なセットアップには、次のソフトウェアパッケージ(およびもちろんそれらの依存関係)が含まれています:Apache2、PHP(バージョン5.6〜8.0)、MariaDB、Postfix、Dovecot、Rspamd、BIND、Jailkit、Roundcube、PHPMyAdmin、Mailman、Webalizer、AWStats、GoAccess。インストーラーに引数を渡すことで、特定の関数を使用しないか、追加のサービスをインストールするかを簡単に選択できます。次のコマンドですべての引数を表示できます:

wget -O - https://get.ispconfig.org | sh -s -- --help

これで、引数を使用してスクリプトを実行できます。たとえば、パッシブFTP +無人アップグレードのポート範囲で通常のインストールが必要な場合は、次のコマンドを実行します。

wget -O - https://get.ispconfig.org | sh -s -- --use-ftp-ports=40110-40210 --unattended-upgrades

しばらくすると、次のように表示されます。

WARNING! This script will reconfigure your complete server!
It should be run on a freshly installed server and all current configuration that you have done will most likely be lost!
Type 'yes' if you really want to continue:

「はい」と答えてEnterキーを押します。インストーラーが起動します。

インストーラーが終了すると、ISPConfig管理者とMySQLのrootパスワードが次のように表示されます。

[INFO] Your ISPConfig admin password is: 5GvfSSSYsdfdYC
[INFO] Your MySQL root password is: kkAkft82d!kafMwqxdtYs

後で必要になるので、この情報を必ず書き留めてください。

5。ファイアウォールの設定

最後に行うことは、ファイアウォールを設定することです。

ISPConfig UIにログインし、[システム]->[ファイアウォール]に移動します。次に、[新しいファイアウォールレコードを追加]をクリックします。

通常の設定では、次のようになります。

TCP:

20,21,22,25,80,443,40110:40210,110,143,465,587,993,995,53,8080,8081

UDP:

53

すべてのサービスに必要なポートは次のとおりです。

Web:20、21、22、80、443および40110:40210(すべてTCP、UDPなし)

メール:25、110、143、465、587、993、および995(すべてTCP、UDPなし)

DNS:53(TCPおよびUDP)

パネル:8080および8081(すべてTCP、UDPなし)

これでサーバーがセットアップされ、使用できるようになりました。 https://server1.example.com:8080でログインできます。

6。詳細オプション

自動インストーラーには、セットアップを微調整するためのさまざまなコマンドラインオプションがあります。たとえば、 ApacheとNginxWebサーバーのどちらかを選択し、どのサービスをシステムにインストールするかを選択します。コマンドライン引数は次のとおりです。

Usage: ispc3-ai.sh [] [...]

This script automatically installs all needed packages for an ISPConfig 3 setup using the guidelines from the "Perfect Server Setup" howtos on www.howtoforge.com.

Possible arguments are:
    --help          Show this help page
    --debug         Enable verbose logging (logs each command with the exit code)
    --channel       Choose the channel to use for ISPConfig. --channel=<stable|dev>
                    "stable" is the latest ISPConfig release available on www.ispconfig.org
                    "dev" is the latest stable-branch from the ISPConfig git repository: https://git.ispconfig.org/ispconfig/ispconfig3/tree/stable-3.1
                    -> The dev channel might contain bugs and less-tested features and should only be used in production by very experienced users.
    --lang          Use language for ISPConfig installation. Specify with --lang=en|de (only en (English) and de (German) supported currently).
    --interactive   Don't install ISPConfig in non-interactive mode. This is needed if you want to use expert mode, e. g. to install a slave server that shall be integrated into an existing
                    multiserver setup.
    --use-nginx     Use nginx webserver instead of apache2
    --use-amavis    Use amavis instead of rspamd for mail filtering
    --use-unbound   Use unbound instead of bind9 for local resolving. Only allowed if --no-dns is set.
    --use-php       Use specific PHP versions, comma separated, instead of installing multiple PHP, e.g. --use-php=7.4,8.0 (5.6, 7.0, 7.1, 7.2, 7.3, 7.4 and 8.0 available).
                    --use-php=system disables the sury repository and just installs the system's default PHP version.
                    ommiting the argument (use all versions)
    --use-ftp-ports This option sets the passive port range for pure-ftpd. You have to specify the port range separated by hyphen, e. g. --use-ftp-ports=40110-40210.
                    If not provided the passive port range will not be configured.
    --use-certbot   Use Certbot instead of acme.sh for issuing Let's Encrypt certificates. Not adviced unless you are migrating from a old server that uses Certbot.
    --no-web        Do not use ISPConfig on this server to manage webserver setting and don't install nginx/apache or pureftpd. This will also prevent installing an ISPConfig UI and implies
                    --no-roundcube as well as --no-pma
    --no-mail       Do not use ISPConfig on this server to manage mailserver settings. This will install postfix for sending system mails, but not dovecot and not configure any settings for
                    ISPConfig mail. It implies --no-mailman.
    --no-dns        Do not use ISPConfig on this server to manage DNS entries. Bind will be installed for local DNS caching / resolving only.
    --no-local-dns  Do not install local DNS caching / resolving via bind.
    --no-firewall   Do not install ufw and tell ISPConfig to not manage firewall settings on this server.
    --no-roundcube  Do not install roundcube webmail.
    --roundcube     Install Roundcube even when --no-mail is used. Manual configuration of Roundcube config is needed.
    --no-pma        Do not install PHPMyAdmin on this server.
    --no-mailman    Do not install Mailman mailing list manager.
    --no-quota      Disable file system quota
    --no-ntp        Disable NTP setup
    --unattended-upgrades
                    Install UnattendedUpgrades. You can add extra arguments for automatic cleanup and automatic reboots when necessary with --unattended-upgrades=autoclean,reboot (or only
                    one of them).
    --i-know-what-i-am-doing
                    Prevent the autoinstaller to ask for confirmation before continuing to reconfigure the server.

たとえば、Apacheの代わりにNginxを使用したセットアップのような「パーフェクトサーバー」をインストールするには、次のコマンドを使用します。

wget -O - https://get.ispconfig.org | sh -s -- --use-nginx --use-ftp-ports=40110-40210 --unattended-upgrades

または、EメールおよびDNSサービスなしでNginx Webサーバーをインストールするには:

wget -O - https://get.ispconfig.org | sh -s -- --use-nginx --no-dns --no-mail --use-ftp-ports=40110-40210 --unattended-upgrades

7。ファイナライズ

これでセットアップは完了です!

ISPConfigをサポートするには、次のマニュアルを購入してください:https://www.ispconfig.org/documentation/

次のリンクは、さらにセットアップするための便利なチュートリアル/ポインタです。

  • メールの設定(rDNS、SPF、DKIM):https://www.howtoforge.com/how-to-install-an-email-server-with-ispconfig-on-debian-10/
  • Roundcubeの調整:https://www.howtoforge.com/community/threads/tweaking-the-roundcube-settings.86387/
  • autoconfigのセットアップ(電子メールクライアントの自動構成):https://schaal-it.com/ispconfig-automail/
  • PHPMyAdminとrspamdインターフェイスのセキュリティを向上させる:https://www.howtoforge.com/community/threads/improving-the-security-of-phpmyadmin-and-rspamd-ui.86544/
  • ISPConfig Autoinstallerのコードリポジトリと課題追跡システム:https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller

ご不明な点がございましたら、フォーラムでお尋ねください。


Ubuntu
  1. 完璧なサーバー-Ubuntu15.04(nginx、BIND、Dovecot、ISPConfig 3)

  2. Ubuntu20.04およびDebian10でのISPConfigパーフェクトマルチサーバーのセットアップ

  3. Debian10-11およびUbuntu20.04へのPerfectServerAutomatedISPConfig3のインストール

  1. Ubuntu20.04サーバーのインストール

  2. Ubuntu20.04PostgreSQLのインストール

  3. Debian10-11およびUbuntu20.04へのPerfectServerAutomatedISPConfig3のインストール

  1. Ubuntu22.04PostgreSQLのインストール

  2. Ubuntu 18.04 /Debian9にNginxをインストールして構成する方法

  3. 完璧なサーバー-Ubuntu14.04(nginx、BIND、MySQL、PHP、Postfix、Dovecot、ISPConfig 3)