웹사이트 검색

Debian 10, Debian 11, Ubuntu 20.04 및 Ubuntu 22.04에 완벽한 서버 자동 ISPConfig 3 설치


이 페이지에서

  1. 전제 조건
  2. 1. 서버에 로그인
  3. 2. 호스트 이름 및 호스트 구성\n
  4. 3. 시스템 업데이트
  5. 4. 자동 설치 프로그램 실행\n
  6. 5. 방화벽 설정\n
  7. 6. 고급 옵션
  8. 7. 마무리
  9. 8 가상 머신으로 다운로드

이 자습서에서는 ISPConfig 자동 설치 프로그램을 사용하여 자체 ISPConfig 3 단일 서버 설정을 설치하는 과정을 안내합니다. 이 설치 프로그램은 이전 Perfect Server 가이드를 따르지만 보다 모듈식이며 따라하기 쉽습니다. 대신 각 서비스에 대한 전용 서버로 다중 서버 설정을 설정하려면 Perfect Multiserver 가이드를 참조하세요.

이 가이드는 Debian 10, Debian 11, Ubuntu 20.04 및 Ubuntu 22.04 모두에서 작동하며 현재 x86_64(AMD64라고도 함) CPU 아키텍처만 지원하고 ARM은 지원하지 않습니다. 호스트 이름은 server1.example.com을 사용합니다. 필요한 경우 교체하십시오. 이 가이드에는 새로 설치되고 비어 있는 기본 OS가 필요합니다. 이미 다른 서비스를 구성한 시스템에서 사용하지 마십시오.

전제 조건

  • 운영 체제: Debian 10, Debian 11, Ubuntu 20.04 또는 Ubuntu 22.04.
  • Intel 또는 AMD 64비트 CPU 아키텍처(x86_64, AMD64라고도 함). ARM CPU는 현재 지원되지 않습니다.\n
  • apt로 소프트웨어를 다운로드하고 설치하려면 시스템에 인터넷 액세스가 있어야 합니다.\n
  • 깨끗하고 빈 기본 OS 설치에서 시작합니다.\n

1. 서버에 로그인

루트로 로그인하거나 다음을 실행하십시오.

su -

진행하기 전에 서버에서 루트 사용자가 되십시오. 중요: su만이 아니라 su를 사용해야 합니다. 그렇지 않으면 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

출력은 다음과 같아야 합니다.

:~$ 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:

"예"라고 대답하고 엔터를 누르십시오. 이제 설치 프로그램이 시작됩니다.

설치 프로그램이 완료되면 다음과 같이 ISPConfig 관리자 및 MySQL 루트 비밀번호가 표시됩니다.

[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

모든 서비스에 필요한 포트는 다음과 같습니다.

웹: 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와 Nginx 웹 서버 중에서 선택하고 시스템에 설치할 서비스를 선택합니다. 명령줄 인수는 다음과 같습니다.

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 linux-console.net.

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로 설정과 같은 Perfect Server를 설치하려면 다음 명령을 사용합니다.

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

또는 이메일 및 DNS 서비스 없이 Nginx 웹 서버를 설치하려면:

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

7. 마무리

이제 설정이 완료되었습니다!

https://www.ispconfig.org/documentation/ 설명서를 구매하여 ISPConfig를 지원할 수 있습니다.

다음 링크는 추가 설정을 위한 몇 가지 유용한 자습서/포인터입니다.

  • 메일 설정(rDNS, SPF, DKIM): https://linux-console.net/how-to-install-an-email-server-with-ispconfig-on-debian-10/
  • Tweaking Roundcube: https://linux-console.net/community/threads/tweaking-the-roundcube-settings.86387/
  • 자동 구성 설정(이메일 클라이언트에 대한 자동 구성): https://schaal-it.com/ispconfig-automail/\n
  • PHPMyAdmin 및 rspamd 인터페이스의 보안 개선: https://linux-console.net/community/threads/improving-the-security-of-phpmyadmin-and-rspamd-ui.86544/
  • ISPConfig 자동 설치 프로그램의 코드 저장소 및 문제 추적기: https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller\n

질문이 있으시면 포럼에서 질문하십시오.

8 가상 머신으로 다운로드

이 설정은 howtoforge 가입자를 위해 ova/ovf 형식(VMWare 및 Virtualbox와 호환 가능)의 가상 머신 다운로드로 사용할 수 있습니다. 가상 머신은 Debian 11을 기반으로 하며 Apache를 웹 서버로 사용합니다.

VM에 대한 로그인 세부 정보

  • 루트 비밀번호: howtoforge\n
  • ISPConfig "admin" 사용자의 비밀번호: howtoforge\n
  • "administrator"라는 이름과 암호를 가진 다른 쉘 사용자가 있습니다: howtoforge\n
  • MySQL 루트 비밀번호: 4VLc2vw5mZzqHNd4xURT\n

최초 로그인 시 모든 비밀번호를 변경하시기 바랍니다.

  • VM의 IP 주소는 192.168.0.100입니다.