3 - tar

------

roundcubemail CentOS 7

-----------

                                                                                                  /usr/share/roundcube

 yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

 yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

 yum install yum-utils

 yum-config-manager --enable remi-php72

 yum install -y php php-json php-mcrypt php-cli php-gd php-curl php-xml php-mysql php-mbstring php-pspell php-imagick php-imap php-pear-DB php-intl php-ldap

yum --enablerepo=remi-php74 install php php-json php-mcrypt php-cli php-gd php-curl php-xml php-mysql php-mbstring php-pspell php-imagick php-imap php-pear-DB php-intl php-ldap

root@~]# vi /etc/php.ini

date.timezone = Asia/Dhaka

# vim /etc/php.ini

cgi.fix_pathinfo=0

date.timezone = "Asia/Dhaka"

                 -----------------------------------------------------------------------------------

# cd /tmp

 wget http://nchc.dl.sourceforge.net/project/roundcubemail/roundcubemail/1.1.4/roundcubemail-1.1.4-complete.tar.gz

    wget https://github.com/roundcube/roundcubemail/releases/download/1.4.6/roundcubemail-1.4.6-complete.tar.gz     # latest

  wget https://github.com/roundcube/roundcubemail/releases/download/1.3.10/roundcubemail-1.3.10-complete.tar.gz             # BEST

tar xfz roundcubemail-1.3.10-complete.tar.gz

tar -xvf roundcubemail-1.3.10-complete.tar.gz

mkdir /usr/share/roundcubemail

mv /tmp/roundcubemail-1.3.10/* /usr/share/roundcubemail/

chown -R root:root /usr/share/roundcubemail

chown apache /usr/share/roundcubemail/temp

chown apache /usr/share/roundcubemail/logs

cd /usr/share/

chown -R apache:apache roundcubemail

chown apache:apache -R /var/www/html/roundcube

#  vi  /etc/httpd/conf.d/roundcubemail.conf

  --------

#

# Round Cube Webmail is a browser-based multilingual IMAP client #  Alias /roundcubemail /usr/share/roundcubemail

Alias /webmail /usr/share/roundcubemail # Define who can access the Webmail # You can enlarge permissions once configured  <Directory /usr/share/roundcubemail/>         Options none         AllowOverride Limit         Require all granted </Directory>  # Define who can access the installer # keep this secured once configured  <Directory /usr/share/roundcubemail/installer>         Options none         AllowOverride Limit         Require all granted </Directory>   # Those directories should not be viewed by Web clients. <Directory /usr/share/roundcubemail/bin/>     Order Allow,Deny     Deny from all </Directory> <Directory /usr/share/roundcubemail/plugins/enigma/home/>     Order Allow,Deny     Deny from all </Directory>

   

                                                     -------X------ 

[root@mail share]# vi /etc/httpd/conf.d/roundcubemail.conf

#

# Round Cube Webmail is a browser-based multilingual IMAP client

#

Alias /roundcubemail /usr/share/roundcubemail

Alias /webmail /usr/share/roundcubemail

# Define who can access the Webmail

# You can enlarge permissions once configured

<Directory /usr/share/roundcubemail/>

    <IfModule mod_authz_core.c>

        # Apache 2.4

        #Require local

        Require all granted

    </IfModule>

    <IfModule !mod_authz_core.c>

        # Apache 2.2

        Order Deny,Allow

        Deny from all

        Allow from 127.0.0.1

        Allow from ::1

    </IfModule>

</Directory>

# Define who can access the installer

# keep this secured once configured

<Directory /usr/share/roundcubemail/installer/>

    <IfModule mod_authz_core.c>

        # Apache 2.4

        #Require local

        Require all granted

    </IfModule>

    <IfModule !mod_authz_core.c>

        # Apache 2.2

        Order Deny,Allow

        Deny from all

        Allow from 127.0.0.1

        Allow from ::1

    </IfModule>

</Directory>

# Those directories should not be viewed by Web clients.

<Directory /usr/share/roundcubemail/bin/>

    Order Allow,Deny

    Deny from all

</Directory>

<Directory /usr/share/roundcubemail/plugins/enigma/home/>

    Order Allow,Deny

    Deny from all

</Directory>

                                                      ------------

 --------

systemctl restart httpd.service

# mysql -u root -p

> create database roundcube;

> grant all privileges on roundcube.* to roundcube@'localhost' identified by 'password';

> flush privileges;

> exit

 

# cd /usr/share/roundcubemail/SQL

# mysql -u roundcube -D roundcube -p < mysql.initial.sql

systemctl start httpd

systemctl enable httpd

http://192.168.80.1/roundcubemail/installer

SMTP PORT 25%

# vi /usr/share/roundcube/config/config.inc.php

<?php

/* Local configuration for Roundcube Webmail */

// ----------------------------------

// SQL DATABASE

// ----------------------------------

// Database connection string (DSN) for read+write operations

// Format (compatible with PEAR MDB2): db_provider://user:password@host/database

// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle

// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php

// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'

// or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'

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

                              

// ----------------------------------

// IMAP

// ----------------------------------

// The IMAP host chosen to perform the log-in.

// Leave blank to show a textbox at login, give a list of hosts

// to display a pulldown menu or set one host as string.

// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://

// Supported replacement variables:

// %n - hostname ($_SERVER['SERVER_NAME'])

// %t - hostname without the first part

// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)

// %s - domain name after the '@' from e-mail address provided at login screen

// For example %n = mail.domain.tld, %t = domain.tld

// WARNING: After hostname change update of mail_host column in users table is

// required to match old user data records with the new host.

$config['default_host'] = 'localhost';

// provide an URL where a user can get support for this Roundcube installation

// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!

$config['support_url'] = '';

// This key is used for encrypting purposes, like storing of imap password

// in the session. For historical reasons it's called DES_key, but it's used

// with any configured cipher_method (see below).

$config['des_key'] = 'pb0UucO0eqjgvhrqYlFTBVjE';

// ----------------------------------

// PLUGINS

// ----------------------------------

// List of active plugins (in plugins/ directory)

$config['plugins'] = array();

// Set the spell checking engine. Possible values:

// - 'googie' - the default (also used for connecting to Nox Spell Server, see 'spellcheck_uri' setting)

// - 'pspell' - requires the PHP Pspell module and aspell installed

// - 'enchant' - requires the PHP Enchant module

// - 'atd' - install your own After the Deadline server or check with the people at http://www.afterthedeadline.com before using their API

// Since Google shut down their public spell checking service, the default settings

// connect to http://spell.roundcube.net which is a hosted service provided by Roundcube.

// You can connect to any other googie-compliant service by setting 'spellcheck_uri' accordingly.

$config['spellcheck_engine'] = 'pspell';

$config['enable_installer'] = true;

# vi config.inc.php

$config['enable_installer'] = true;

// List of active plugins (in plugins/ directory)

$config['plugins'] = array('managesieve', 'password', 'acl', 'zipdownload');

$config['htmleditor'] = 1;

$config['enable_installer'] = true;

# vi /usr/share/roundcube/config/config.inc.php

$config['enable_installer'] = false;

                                                    -----------------------------X----------------------------------

                                                                   /var/www/html/roundcube         

 yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

 yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

 yum install yum-utils

 yum-config-manager --enable remi-php72

 yum install -y php php-json php-mcrypt php-cli php-gd php-curl php-xml php-mysql php-mbstring php-pspell php-imagick php-imap php-pear-DB php-intl php-ldap

root@tec ~]#  vi /etc/php.ini

date.timezone = Asia/Dhaka

# vim /etc/php.ini

cgi.fix_pathinfo=0

date.timezone = "Asia/Dhaka"

wget https://github.com/roundcube/roundcubemail/releases/download/1.3.10/roundcubemail-1.3.10-complete.tar.gz             # BEST

wget https://github.com/roundcube/roundcubemail/releases/download/1.4.1/roundcubemail-1.4.1-complete.tar.gz    

 tar -zxpvf roundcubemail-1.3.10-complete.tar.gz -C /var/www/html/

 tar -zxpvf roundcubemail-1.4.1-complete.tar.gz -C /var/www/html/

 

 mv roundcubemail-1.4.1 /var/www/html/roundcubemail

#  mv roundcubemail-1.1.3 roundcube

# chown apache:apache roundcube

chown apache:apache -R /var/www/html/roundcube

chown apache:apache -R /var/www/html/roundcubemail

chmod -R 775 /var/www/html/roundcubemail/temp/ /var/www/html/roundcubemail/logs/

systemctl start httpd

systemctl enable httpd

# mysql -u root -p

> create database roundcube;

> grant all privileges on roundcube.* to roundcube@'localhost' identified by 'password';

> flush privileges;

> exit

# cd /var/www/html/roundcube/SQL

# mysql -u roundcube -D roundcube -p < mysql.initial.sql

http://192.168.80.1/roundcubemail/installer

# rm -rf /var/www/html/roundcubemail/installer

                                                                   -------------------

[root@mail roundcubemail]# vi  /etc/httpd/conf.d/roundcubemail.conf

Alias /roundcubemail /var/www/html/roundcubemail

Alias /rmail /var/www/html/roundcubemail

# Define who can access the Webmail

# You can enlarge permissions once configured

<Directory /var/www/html/roundcubemail/>

    <IfModule mod_authz_core.c>

        # Apache 2.4

        #Require local

        Require all granted

    </IfModule>

    <IfModule !mod_authz_core.c>

        # Apache 2.2

        Order Deny,Allow

        Deny from all

        Allow from 127.0.0.1

        Allow from ::1

    </IfModule>

</Directory>

# Define who can access the installer

# keep this secured once configured

<Directory /usr/share/roundcubemail/installer/>

    <IfModule mod_authz_core.c>

        # Apache 2.4

        #Require local

        Require all granted

    </IfModule>

    <IfModule !mod_authz_core.c>

        # Apache 2.2

        Order Deny,Allow

        Deny from all

        Allow from 127.0.0.1

        Allow from ::1

    </IfModule>

</Directory>

# Those directories should not be viewed by Web clients.

<Directory /usr/share/roundcubemail/bin/>

    Order Allow,Deny

    Deny from all

</Directory>

<Directory /usr/share/roundcubemail/plugins/enigma/home/>

    Order Allow,Deny

    Deny from all

</Directory>

-----------------------------------------------------------------------

systemctl restart httpd

# vi /etc/httpd/conf.d/roundcube.conf

Note: If you followed my Postfix/Dovecot tutorial, a virtual host already exists. You should edit the following file.

sudo nano /etc/httpd/conf.d/mail.your-domain.com.conf

Put the following text into the file. Replace mail.your-domain.com with your real domain name and don’t forget to set DNS A record for it.

<VirtualHost *:80>   ServerName mail.your-domain.com   DocumentRoot /var/www/roundcube/    ErrorLog /var/log/httpd/roundcube_error.log   CustomLog /var/log/httpd/roundcube_access.log combined    <Directory />     Options FollowSymLinks     AllowOverride All   </Directory>    <Directory /var/www/roundcube/>     Options FollowSymLinks MultiViews     AllowOverride All     Order allow,deny     allow from all   </Directory>  </VirtualHost>

Save and close the file. Reload Apache for the changes to take effect.

systemctl reload httpd

/var/www/html/roundcubemail

cp -p /var/www/html/roundcubemail/config/defaults.inc.php /var/www/html/roundcubemail/config/config.inc.php

OR

cp -p /var/www/html/roundcubemail/config/config.inc.php.sample /var/www/html/roundcubemail/config/config.inc.php

cd /var/www/html/roundcubemail/config/

# vi config.inc.php

$config['enable_installer'] = true;

// List of active plugins (in plugins/ directory)

$config['plugins'] = array('managesieve', 'password', 'acl', 'zipdownload');

$config['htmleditor'] = 1;

$config['enable_installer'] = true;

-------