Install Roundcube Di Freebsd

· ~al1r4d · ⮕openbsd · #roundcube #email

Table of Contents

Roundcube di OpenBSD

Unduh paket-paket yang digunakan dalam pemasangan Roundcube.

$ doas pkg_add -i roundcubemail mariadb-server php-pdo_mysql php-intl php-curl php-gd

Harap diingat: pastikan memilih versi php yang sama. Jika anda disuruh memilih database, maka pilihlah MySQL.

PHP

Buat symlink konfigurasi contoh PHP ke direktori PHP.

$ cd /etc/php-8.2.sample/
$ for i in * ; do
> doas ln -sf ../php-8.2.sample/$i ../php-8.2/
> done

MariaDB

Lakukan penyiapan MariaDB.

$ doas mysql_install_db

Aktifkan dan mulai layanan MariaDB.

$ doas rcctl enable mysqld
$ doas rcctl start mysqld

Setelah itu, lakukan inisialisasi MySQL.

$ doas mysql_secure_installation

Mari kita buat konfigurasi database untuk Roundcube.

$ doas -s
# mysql
> CREATE DATABASE roundcube 
> GRANT ALL PRIVILEGES ON roundcube.* TO roundcube@localhost IDENTIFIED BY 'password';
> QUIT
# mysql roundcube < /var/www/roundcubemail/SQL/mysql.initial.sql

httpd

Buat konfigurasi httpd. Jika anda bingung, bisa baca artikel “Mendapatkan Ssl Dengan Acme Client Di OpenBSD” .

server "domain" {
  listen on * tls port 443

      tls certificate "/etc/ssl/domain.com.crt"
       tls key "/etc/ssl/private/domain.com.key"

       root "/roundcubemail"
   directory index index.php
 location "*.php" {
        fastcgi socket "/run/php-fpm.sock"
    }
}

types {
    include "/usr/share/misc/mime.types"
}

Roundcube

Kita buat konfigurasi baru untuk Roundcube.

# nvim /var/www/roundcubemail/config/config.inc.php

Salin dan tempel. Jangan lupa sesuaikan sesuai kebutuhan.

$config['db_dsnw'] = 'mysql://roundcube:password@localhost/roundcube';

$config['log_driver'] = 'syslog';
$config['syslog_id'] = 'roundcube';
$config['syslog_facility'] = LOG_MAIL;
$config['log_logins'] = true;

$config['imap_host'] = 'tls://server.com:143';

$config['smtp_host'] = 'tls://server.com:587';


$config['auto_create_user'] = true;

// This key is used to encrypt the users imap password which is stored
// in the session record. For the default cipher method it must be
// exactly 24 characters long.
// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
$config['des_key'] = '';
$config['mime_types'] = '/usr/share/misc/mime.types';

$config['plugins'] = ['archive', 'zipdownload'];

$config['prefer_html'] = false;

Jika sudah, nyalakan servis PHP

# rcctl enable php82_fpm
# rcctl start php82_fpm

Terakhir, buka installer roundcube dan selesaikan. Jika sudah, kamu berhasil memasang Roundcube di OpenBSD.

https://domain.com/installer

Pertanyaan atau komentar? Email kami.