Computer, telephone
and mobile phone
systems specialists
Telephone: +44 208 292 1691 (English or Japanese speeker)
Telephone: +44 870 392 5969 (Japanese speaker)
Telephone: 050 5327 8990 (Domestic Japan)
Email: contact@ukuniversalsupport.com
English   

日本語     
2019080302Centos7Kopano

Install Kopano Community Edtion into a CentOS 7 server.

Kopanoのコミュニティ版を CentOS 7 のサーバ・コンピュータへインストールします。



==== Locale ========================
# localectl list-locales | grep ^jaSet your language specific locale.
# localectl set-locale LANG=ja_JP.utf8


==== PHP 7.1 ========================
# yum install yum-utils
# yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

# yum-config-manager --disable remi-php54
# yum-config-manager --enable remi-php71In this example, version7.1 is used, because we use "core-8.7.82.59-RHEL_7_PHP_71-x86_64.tar.gz".
# yum install php php-pdo php-mysqlnd php-opcache php-xml php-mcrypt php-gd php-devel php-intl php-mbstring php-bcmath php-json php-iconv php-soap php-zip

# vi /etc/php.ini
memory_limit = 756M


==== MariaDB ========================
# yum install mariadb mariadb-server
# systemctl start mariadb
# systemctl enable mariadb

# mysql -u root -p
Enter password: [CR]
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.26-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>create database kopano;
MariaDB [(none)]>grant all on kopano.* TO kopano@localhost identified by 'KogeKogeKoge';
MariaDB [(none)]>flush privileges;
MariaDB [(none)]>exit;
#


==== Apache ========================
# yum install httpd mod_ssl

# firewall-cmd --permanent --zone=public --add-service=httpsAs https is default in Kopano, use https when accessing from a web browser.
# firewall-cmd --reload

# setsebool -P httpd_can_sendmail=1seLinux setting.

# vi /etc/httpd/conf/httpd.conf
ServerAdmin ukus@ukuniversalsupport.comSpecify an administrator email address
ServerName kopano.ukuniversalsupport.com:80Specify the server address


# vi /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/Certificate/Server.Cert.pem
SSLCertificateKeyFile /etc/Certificate/Server.PrivateKey.NoPassPhrase.pem
SSLCertificateChainFile /etc/Certificate/Server.Intermediate.pem

# systemctl start httpd
# systemctl enable httpd

Test the installed certificate in "https://cryptoreport.websecurity.symantec.com/checker/views/certCheck.jsp"


==== Kopano-core ========================
# yum install wget createrepo
# cd /tmp/
$ wget https://download.kopano.io/community/core:/core-8.7.82.61-RHEL_7_EPEL_7-x86_64.tar.gzChose RHEL_7_EPEL_7, because RHEL_7_PHP_71 could not be installed.
# tar xvf core-8.7.82.61-RHEL_7_EPEL_7-x86_64.tar.gz
# createrepo /tmp/core-8.7.82.61-RHEL_7_EPEL_7-x86_64/
# vi /etc/yum.repos.d/kopano.repo
[Kopano-core]
name=Kopano core
type=rpm-md
baseurl=file:///tmp/core-8.7.82.59-RHEL_7_EPEL_7-x86_64/
gpgcheck=0
enabled=1

# yum update
# yum install python36
# yum install kopano-server-packages
Error: Package: kopano-search-8.7.81.203.1889fded5-294.1.x86_64 (Kopano-core)
Requires: python3-xapianThere is not the "python3-xapian" package for CentOS 7.

# yum install xapian-bindings-python"xapian-bindings-python" is used instead of "python3-xapian".
# rpm -ivh --nodeps /tmp/core-8.7.82.59-RHEL_7_EPEL_7-x86_64/kopano-search-8.7.81.203.1889fded5-294.1.x86_64.rpmTo avoid the dependency issue, "kopano-search" is installed by the "rpm" command ignoring the dependency.
# yum install kopano-server-packages


seLinux setting. If you are a computer engineer, keep the seLinux mode "enforced".
# vi kopano.te
module kopano 1.1;

require {
type var_run_t;
type postfix_postdrop_t;
type httpd_t;
type postfix_pipe_t;
type initrc_t;
class sock_file write;
class unix_stream_socket connectto;
class fifo_file { write getattr };
}

#============= httpd_t ==============
allow httpd_t initrc_t:unix_stream_socket connectto;
allow httpd_t var_run_t:sock_file write;

#============= postfix_pipe_t ==============
allow postfix_pipe_t initrc_t:unix_stream_socket connectto;
allow postfix_pipe_t var_run_t:sock_file write;

#============= postfix_postdrop_t ==============
allow postfix_postdrop_t initrc_t:fifo_file { write getattr };

# yum install checkpolicy policycoreutils-python
# checkmodule -M -m -o kopano.mod kopano.te
# semodule_package -o kopano.pp -m kopano.mod
# cp kopano.pp /etc/selinux/targeted/modules/active/modules/
# semodule -vi /etc/selinux/targeted/modules/active/modules/kopano.pp
# semodule -l

# cp /usr/share/doc/kopano/example-config/server.cfg /etc/kopano/server.cfg
# vi /etc/kopano/server.cfg
disabled_features = pop3As we want to use IMAP for Z-Push, "imap" was removed from "disabled_features".

# systemctl start kopano-server
# systemctl enable kopano-server

# systemctl start kopano-gatewayThis service is started for IMAP.
# systemctl enable kopano-gateway

Create a test account.
# kopano-admin -c ukus -p HogeHoge -e ukus@ukuniversalsupport.com -f "UK Universal Support Limited"
# kopano-admin -l


==== Kopano-ical ========================
As we wanted to use CalDav for Z-Push, start the Kopano-ical service.
# cp /usr/share/doc/kopano/example-config/ical.cfg /etc/kopano/ical.cfg
# vi /etc/kopano/ical.cfg
ical_listen = *:8080
# systemctl start kopano-ical
# systemctl enable kopano-ical

The URL for CalDav: "http://kopano.ukuniversalsupport.com:8080/caldav/ukus/Calendar/"


==== Kopano-webapp ========================
# cd /tmp/
# wget https://download.kopano.io/community/webapp:/webapp-3.5.8.2366%2B1328-RHEL_7_EPEL_7-noarch.tar.gz
# tar xvf webapp-3.5.8.2366+1328-RHEL_7_EPEL_7-noarch.tar.gz
# createrepo /tmp/webapp-3.5.8.2366+1328-RHEL_7_EPEL_7-noarch/
# vi /etc/yum.repos.d/kopano.repo
[Kopano-webapp]
name=Kopano core
type=rpm-md
baseurl=file:///tmp/webapp-3.5.8.2366+1328-RHEL_7_EPEL_7-noarch/
gpgcheck=0
enabled=1

# yum update
# yum install kopano-webapp
# vi /etc/httpd/conf.d/kopano-webapp.conf
# systemctl restart httpd

The URL for a web browser is https://kopano.ukuniversalsupport.com/webapp/