Install Roundcube Debian 12: Perbedaan antara revisi

Dari Dokumentasi Robie
Loncat ke navigasi Loncat ke pencarian
Tidak ada ringkasan suntingan
Tidak ada ringkasan suntingan
 
(18 revisi perantara oleh pengguna yang sama tidak ditampilkan)
Baris 1: Baris 1:
apt update && apt -y upgrade


= Tujuan Pembelajaran =
Setelah mempelajari modul ini, peserta didik diharapkan dapat:


1. Memahami konsep dasar mail server
Mail Server: Install postfix


2. Menginstal dan mengkonfigurasi mail server
<code>apt -y install postfix sasl2-bin</code>
root@mail-server:~# apt -y install postfix sasl2-bin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
postfix is already the newest version (3.7.11-0+deb12u1).
The following additional packages will be installed:
  db-util db5.3-util
The following NEW packages will be installed:
  db-util db5.3-util sasl2-bin
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 179 kB of archives.
After this operation, 736 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 db5.3-util amd64 5.3.28+dfsg2-1 [64.0 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 db-util all 5.3.2 [2176 B]
Get:3 http://deb.debian.org/debian bookworm/main amd64 sasl2-bin amd64 2.1.28+dfsg-10 [112 kB]
Fetched 179 kB in 0s (800 kB/s)
Preconfiguring packages ...
Selecting previously unselected package db5.3-util.
(Reading database ... 19138 files and directories currently installed.)
Preparing to unpack .../db5.3-util_5.3.28+dfsg2-1_amd64.deb ...
Unpacking db5.3-util (5.3.28+dfsg2-1) ...
Selecting previously unselected package db-util.
Preparing to unpack .../archives/db-util_5.3.2_all.deb ...
Unpacking db-util (5.3.2) ...
Selecting previously unselected package sasl2-bin.
Preparing to unpack .../sasl2-bin_2.1.28+dfsg-10_amd64.deb ...
Unpacking sasl2-bin (2.1.28+dfsg-10) ...
Setting up db5.3-util (5.3.28+dfsg2-1) ...
Setting up db-util (5.3.2) ...
Setting up sasl2-bin (2.1.28+dfsg-10) ...
Processing triggers for man-db (2.11.2-2) ...
root@mail-server:~#
cp /usr/share/postfix/main.cf.dist /etc/postfix/main.cf


3. Mengintegrasikan Roundcube sebagai webmail
nano /etc/postfix/main.cf
 
4. Melakukan konfigurasi dasar keamanan
 
= Prasyarat =
- Sistem Operasi: Debian 12 (Bookworm)
 
- Hak akses: Root atau sudo
 
- Koneksi Internet
 
- Domain atau subdomain yang telah disiapkan
 
= Perangkat Lunak yang Dibutuhkan =
- Postfix (Mail Transfer Agent)
 
- Dovecot (IMAP/POP3 Server)
 
- Roundcube (Webmail Interface)
 
- Apache Web Server
 
- PHP
 
- MariaDB
 
= Langkah Instalasi =
 
== <nowiki>###</nowiki> Langkah 1: Update Sistem ==
```bash
 
sudo apt update
 
sudo apt upgrade -y
 
```
 
== <nowiki>###</nowiki> Langkah 2: Instalasi Paket Dasar ==
```bash
 
sudo apt install -y postfix dovecot-core dovecot-imapd dovecot-pop3d \
 
apache2 mariadb-server php php-cli php-fpm php-json php-common \
 
php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear \
 
php-bcmath libapache2-mod-php
 
```
 
== <nowiki>###</nowiki> Langkah 3: Konfigurasi Postfix ==
1. Buka konfigurasi postfix
 
```bash
 
sudo nano /etc/postfix/main.cf
 
```
 
2. Tambahkan/edit konfigurasi berikut:
 
```
 
myhostname = mail.example.com
 
mydestination = $myhostname, localhost.$mydomain, localhost
 
inet_interfaces = all
 
inet_protocols = all
 
home_mailbox = Maildir/
 
```
 
3. Restart layanan postfix
 
```bash
 
sudo systemctl restart postfix
 
```
 
== <nowiki>###</nowiki> Langkah 4: Konfigurasi Dovecot ==
1. Edit konfigurasi dovecot
 
```bash
 
sudo nano /etc/dovecot/dovecot.conf
 
```
 
2. Tambahkan/edit konfigurasi:
 
```
 
protocols = imap pop3
 
mail_location = maildir:~/Maildir
 
```
 
3. Restart layanan dovecot
 
```bash
 
sudo systemctl restart dovecot
 
```
 
== <nowiki>###</nowiki> Langkah 5: Instalasi Roundcube ==
1. Download Roundcube
 
```bash
 
cd /tmp
 
wget <nowiki>https://github.com/roundcube/roundcubemail/releases/download/1.6.2/roundcubemail-1.6.2-complete.tar.gz</nowiki>
 
tar -xvzf roundcubemail-1.6.2-complete.tar.gz
 
```
 
2. Pindahkan ke direktori web
 
```bash
 
sudo mv roundcubemail-1.6.2 /var/www/roundcube
 
```
 
== <nowiki>###</nowiki> Langkah 6: Konfigurasi Database ==
1. Buat database untuk Roundcube
 
```bash
 
sudo mysql -e "CREATE DATABASE roundcube;"
 
sudo mysql -e "CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'password';"
 
sudo mysql -e "GRANT ALL PRIVILEGES ON roundcube.* TO 'roundcube'@'localhost';"
 
sudo mysql -e "FLUSH PRIVILEGES;"
 
```
 
== <nowiki>###</nowiki> Langkah 7: Konfigurasi Web Server ==
1. Buat konfigurasi Apache
 
```bash
 
sudo nano /etc/apache2/sites-available/roundcube.conf
 
```
 
2. Tambahkan konfigurasi:
 
```apache
 
<VirtualHost *:80>
 
    ServerName mail.example.com
 
    DocumentRoot /var/www/roundcube
 
    <Directory /var/www/roundcube>
 
        Options FollowSymLinks
 
        AllowOverride All
 
        Require all granted
 
    </Directory>
 
</VirtualHost>
 
```
 
3. Aktifkan situs dan modul
 
```bash
 
sudo a2ensite roundcube
 
sudo a2enmod rewrite
 
sudo systemctl restart apache2
 
```
 
== <nowiki>###</nowiki> Langkah 8: Finishing Setup ==
1. Akses Roundcube melalui browser
 
2. Ikuti wizard instalasi
 
3. Gunakan kredensial database yang telah dibuat
 
= <nowiki>##</nowiki> Keamanan Tambahan =
1. Aktifkan SSL/TLS
 
2. Konfigurasi firewall
 
3. Gunakan autentikasi dua faktor
 
<nowiki>##</nowiki> Troubleshooting Umum
 
- Periksa log sistem: `/var/log/mail.log`
 
- Pastikan port 25, 143, 993 terbuka
 
- Cek izin direktori dan file
 
= <nowiki>##</nowiki> Evaluasi Praktikum =
1. Berhasil menginstal mail server
 
2. Dapat login ke Roundcube
 
3. Mampu mengirim dan menerima email
 
= <nowiki>##</nowiki> Referensi Lanjutan =
- Dokumentasi Postfix
 
- Dokumentasi Dovecot
 
- Dokumentasi Roundcube

Revisi terkini sejak 11 Desember 2024 04.31

apt update && apt -y upgrade


Mail Server: Install postfix

apt -y install postfix sasl2-bin

root@mail-server:~# apt -y install postfix sasl2-bin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
postfix is already the newest version (3.7.11-0+deb12u1).
The following additional packages will be installed:
  db-util db5.3-util
The following NEW packages will be installed:
  db-util db5.3-util sasl2-bin
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 179 kB of archives.
After this operation, 736 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 db5.3-util amd64 5.3.28+dfsg2-1 [64.0 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 db-util all 5.3.2 [2176 B]
Get:3 http://deb.debian.org/debian bookworm/main amd64 sasl2-bin amd64 2.1.28+dfsg-10 [112 kB]
Fetched 179 kB in 0s (800 kB/s)
Preconfiguring packages ...
Selecting previously unselected package db5.3-util.
(Reading database ... 19138 files and directories currently installed.)
Preparing to unpack .../db5.3-util_5.3.28+dfsg2-1_amd64.deb ...
Unpacking db5.3-util (5.3.28+dfsg2-1) ...
Selecting previously unselected package db-util.
Preparing to unpack .../archives/db-util_5.3.2_all.deb ...
Unpacking db-util (5.3.2) ...
Selecting previously unselected package sasl2-bin.
Preparing to unpack .../sasl2-bin_2.1.28+dfsg-10_amd64.deb ...
Unpacking sasl2-bin (2.1.28+dfsg-10) ...
Setting up db5.3-util (5.3.28+dfsg2-1) ...
Setting up db-util (5.3.2) ...
Setting up sasl2-bin (2.1.28+dfsg-10) ...
Processing triggers for man-db (2.11.2-2) ...
root@mail-server:~#

cp /usr/share/postfix/main.cf.dist /etc/postfix/main.cf

nano /etc/postfix/main.cf