サーバー設定 · 5 min read · Nov 26, 2025
完璧なサーバー - Ubuntu 17.04 (Zesty Zapus) と Apache, PHP, MySQL, PureFTPD, BIND, Postfix, Dovecot および ISPConfig 3.1 - ページ 3
16. Roundcube Webmail のインストール
Roundcube Webmail をインストールするには、次のコマンドを実行します:
apt-get -y install roundcube roundcube-core roundcube-mysql roundcube-plugins roundcube-plugins-extra javascript-common libjs-jquery-mousewheel php-net-sieve tinymceインストーラーは次の質問をします:
Configure database for roundcube with dbconfig-common? <-- Yes
MySQL application password for roundcube: <-- Press enter
次に、RoundCube の apache 設定ファイルを編集します。
nano /etc/apache2/conf-enabled/roundcube.confAlias 行の前の # を削除し、”
# Those aliases do not work properly with several hosts on your apache server
# Uncomment them to use it or adapt them to your configuration
Alias /roundcube /var/lib/roundcube
[...]
AddType application/x-httpd-php .php
[...] そして apache を再起動します。
service apache2 restart次に、RoundCube config.inc.php 設定ファイルを編集します:
nano /etc/roundcube/config.inc.phpデフォルトホストを localhost に変更します:
$config['default_host'] = 'localhost';これにより、Roundcube がログインフォームにサーバー名入力フィールドを表示しないようになります。
17. ISPConfig 3.1 のインストール
最新リリース版から ISPConfig 3 をインストールするには、次のようにします:
cd /tmp
wget -O ispconfig.tar.gz https://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=stable-3.1
tar xfz ispconfig.tar.gz
cd ispconfig3*/install/次のステップは、次のコマンドを実行することです。
php -q install.phpこれにより、ISPConfig 3 インストーラーが起動します。インストーラーは、Postfix、Dovecot などのすべてのサービスを自動的に設定します。
# php -q install.php--------------------------------------------------------------------------------
_____ ___________ _____ __ _ ____
|_ _/ ___| ___ \ / __ \ / _(_) /__ \
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ /
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` | |_ |
_| |_\/__/ / | | \__/\ (_) | | | | | | | (_| | ___\ \
\___/\____/\_| \____/\___/|_| |_|_| |_|
\__, | \____/
__/ |
|___/
-------------------------------------------------------------------------------->> Initial configurationOperating System: Ubuntu 17.04 (Zesty Zapus)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]: <-- Hit EnterInstallation mode (standard,expert) [standard]: <-- Hit EnterFull qualified hostname (FQDN) of the server, eg server1.domain.tld [server1.canomi.com]: <-- Hit EnterMySQL server hostname [localhost]: <-- Hit EnterMySQL server port [3306]: <-- Hit EnterMySQL root username [root]: <-- Hit EnterMySQL root password []: <-- Enter your MySQL root passwordMySQL database to create [dbispconfig]: <-- Hit EnterMySQL charset [utf8]: <-- Hit EnterConfiguring Postgrey
Configuring Postfix
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 2 letter country code
State or Province Name (full name) [Some-State]: <-- Enter the name of the state
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) []: <-- Enter the server hostname, in my case: server1.example.com
Email Address []: <-- Hit Enter
Configuring Mailman
Configuring Dovecot
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring BIND
Configuring Jailkit
Configuring Pureftpd
Configuring Apache
Configuring vlogger
Configuring Metronome XMPP Server
writing new private key to 'localhost.key'
-----
Country Name (2 letter code) [AU]: <-- Enter 2 letter country code
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) [server1.canomi.com]: <-- Enter the server hostname, in my case: server1.example.com
Email Address []: <-- Hit EnterConfiguring Ubuntu Firewall
Configuring Fail2ban
[INFO] service OpenVZ not detected
Configuring Apps vhost
Installing ISPConfig
ISPConfig Port [8080]:Admin password [admin]:Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]: <-- Hit EnterGenerating 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 2 letter country code
State or Province Name (full name) [Some-State]: <-- Enter the name of the state
Locality Name (eg, city) []: <-- Enter your city
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- Enter company name or press enter
Organizational Unit Name (eg, section) []: <-- Hit Enter
Common Name (e.g. server FQDN or YOUR name) []: <-- Enter the server hostname, in my case: server1.example.com
Email Address []: <-- Hit EnterPlease enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: <-- Hit Enter
An optional company name []: <-- Hit Enter
writing RSA key
Configuring DBServer
Installing ISPConfig crontab
no crontab for root
no crontab for getmail
Detect IP addresses
Restarting services ...
Installation completed.インストーラーはすべての基盤となるサービスを自動的に設定するため、手動での設定は必要ありません。
その後、ISPConfig 3 にアクセスできます http(s)://server1.example.com:8080/ または http(s)://192.168.1.100:8080/ (HTTP または HTTPS はインストール中に選択したものに依存します)。ユーザー名 admin とパスワード admin でログインします (初回ログイン後にデフォルトのパスワードを変更する必要があります):
システムは現在使用可能です。
18. 追加の注意事項
18.1 OpenVZ
このチュートリアルで設定した Ubuntu サーバーが OpenVZ コンテナ (仮想マシン) の場合、ホストシステムで次の操作を行う必要があります (OpenVZ コンテナの ID が 101 であると仮定しています - あなたのシステムの正しい VPSID に置き換えてください):
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
done18.2 このチュートリアルの仮想マシンイメージのダウンロード
このチュートリアルは、VMWare および Virtualbox と互換性のある ovf/ova 形式の使用準備が整った仮想マシンイメージとして利用可能です。仮想マシンイメージは次のログイン詳細を使用します:
SSH / シェルログイン
ユーザー名: administrator
パスワード: howtoforge
このユーザーには sudo 権限があります。
ISPConfig ログイン
ユーザー名: admin
パスワード: admin
MySQL ログイン
ユーザー名: root
パスワード: howtoforge
VM の IP は 192.168.1.100 で、/etc/network/interfaces ファイルで変更できます。上記のすべてのパスワードを変更して仮想マシンを保護してください。
19. リンク
- Ubuntu: http://www.ubuntu.com/
- ISPConfig: http://www.ispconfig.org/
新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。