forked from anishnath/open-xchange
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-open-xchange-centos7
174 lines (147 loc) · 7.45 KB
/
install-open-xchange-centos7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
yum -y install mariadb-server open-xchange open-xchange-authentication-database open-xchange-grizzly \
open-xchange-admin open-xchange-appsuite \
open-xchange-appsuite-backend open-xchange-appsuite-manifest
systemctl status mariadb
systemctl start mariadb
systemctl status mariadb
export ADMIN_MASTER_PASSWORD=admin
export ADMIN_PASSWORD=admin
export LANG_DEFAULT=${LANG_DEFAULT:-en_US}
export [email protected]
export FILESTORE_SIZE=${FILESTORE_SIZE:-1000000}
export MAX_MEMORY_FOR_JAVAVM=1024
export DB_PASSWORD=root
echo PATH=$PATH:/opt/open-xchange/sbin/ >> ~/.bashrc && . ~/.bashrc
/opt/open-xchange/sbin/initconfigdb --configdb-pass=$DB_PASSWORD -a
/opt/open-xchange/sbin/oxinstaller --no-license --servername=oxserver --configdb-pass=$DB_PASSWORD --master-pass=$ADMIN_MASTER_PASSWORD --network-listener-host=localhost --servermemory $MAX_MEMORY_FOR_JAVAVM
systemctl start open-xchange
systemctl stop firewalld
mkdir -p /data/filestore
chown open-xchange:open-xchange /data/filestore
/opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P $ADMIN_MASTER_PASSWORD
/opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P $ADMIN_MASTER_PASSWORD -t file:/data/filestore -s $FILESTORE_SIZE
/opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P $ADMIN_MASTER_PASSWORD -n oxdatabase -p $DB_PASSWORD -m true
/opt/open-xchange/sbin/createcontext -A oxadminmaster -P $ADMIN_MASTER_PASSWORD -c 1 -u oxadmin -d "Context Admin" -g Admin -s User -p $ADMIN_PASSWORD -L defaultcontext -e $ADMIN_EMAIL -q 1024 --access-combination-name=groupware_standard
/opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P $ADMIN_PASSWORD -u testuser -d "Test User" -g Test -s User -p secret -l $LANG_DEFAULT -e [email protected] --imaplogin testuser --imapserver 127.0.0.1 --smtpserver 127.0.0.1
rm /etc/httpd/conf.d/welcome.conf
vim /etc/httpd/conf.d/proxy_http.conf
LoadModule proxy_http_module modules/mod_proxy_http.so
<IfModule mod_proxy_http.c>
ProxyRequests Off
ProxyStatus On
# When enabled, this option will pass the Host: line from the incoming request to the proxied host.
ProxyPreserveHost On
# Please note that the servlet path to the soap API has changed:
<Location /webservices>
# restrict access to the soap provisioning API
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
# you might add more ip addresses / networks here
# Allow from 192.168 10 172.16
</Location>
# The old path is kept for compatibility reasons
<Location /servlet/axis2/services>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Location>
# Enable the balancer manager mentioned in
# http://oxpedia.org/wiki/index.php?title=AppSuite:Running_a_cluster#Updating_a_Cluster
<IfModule mod_status.c>
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Location>
</IfModule>
<Proxy balancer://oxcluster>
Order deny,allow
Allow from all
# multiple server setups need to have the hostname inserted instead localhost
BalancerMember http://localhost:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=APP1
# Enable and maybe add additional hosts running OX here
# BalancerMember http://oxhost2:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=APP2
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
SetEnv proxy-initial-not-pooled
SetEnv proxy-sendchunked
</Proxy>
# The standalone documentconverter(s) within your setup (if installed)
# Make sure to restrict access to backends only
# See: http://httpd.apache.org/docs/$YOUR_VERSION/mod/mod_authz_host.html#allow for more infos
#<Proxy balancer://oxcluster_docs>
# Order Deny,Allow
# Deny from all
# Allow from backend1IP
# BalancerMember http://converter_host:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 keepalive=On route=APP3
# ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
# SetEnv proxy-initial-not-pooled
# SetEnv proxy-sendchunked
#</Proxy>
# Define another Proxy Container with different timeout for the sync clients. Microsoft recommends a minimum value of 15 minutes.
# Setting the value lower than the one defined as com.openexchange.usm.eas.ping.max_heartbeat in eas.properties will lead to connection
# timeouts for clients. See http://support.microsoft.com/?kbid=905013 for additional information.
#
# NOTE for Apache versions < 2.4:
# When using a single node system or using BalancerMembers that are assigned to other balancers please add a second hostname for that
# BalancerMember's IP so Apache can treat it as additional BalancerMember with a different timeout.
#
# Example from /etc/hosts: 127.0.0.1 localhost localhost_sync
#
# Alternatively select one or more hosts of your cluster to be restricted to handle only eas/usm requests
<Proxy balancer://eas_oxcluster>
Order deny,allow
Allow from all
# multiple server setups need to have the hostname inserted instead localhost
BalancerMember http://localhost_sync:8009 timeout=1900 smax=0 ttl=60 retry=60 loadfactor=50 route=APP1
# Enable and maybe add additional hosts running OX here
# BalancerMember http://oxhost2:8009 timeout=1900 smax=0 ttl=60 retry=60 loadfactor=50 route=APP2
ProxySet stickysession=JSESSIONID|jsessionid scolonpathdelim=On
SetEnv proxy-initial-not-pooled
SetEnv proxy-sendchunked
</Proxy>
# When specifying additional mappings via the ProxyPass directive be aware that the first matching rule wins. Overlapping urls of
# mappings have to be ordered from longest URL to shortest URL.
#
# Example:
# ProxyPass /ajax balancer://oxcluster_with_100s_timeout/ajax
# ProxyPass /ajax/test balancer://oxcluster_with_200s_timeout/ajax/test
#
# Requests to /ajax/test would have a timeout of 100s instead of 200s
#
# See:
# - http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass Ordering ProxyPass Directives
# - http://httpd.apache.org/docs/current/mod/mod_proxy.html#workers Worker Sharing
ProxyPass /ajax balancer://oxcluster/ajax
ProxyPass /appsuite/api balancer://oxcluster/ajax
ProxyPass /drive balancer://oxcluster/drive
ProxyPass /infostore balancer://oxcluster/infostore
ProxyPass /publications balancer://oxcluster/publications
ProxyPass /realtime balancer://oxcluster/realtime
ProxyPass /servlet balancer://oxcluster/servlet
ProxyPass /webservices balancer://oxcluster/webservices
#ProxyPass /documentconverterws balancer://oxcluster_docs/documentconverterws
ProxyPass /usm-json balancer://eas_oxcluster/usm-json
ProxyPass /Microsoft-Server-ActiveSync balancer://eas_oxcluster/Microsoft-Server-ActiveSync
</IfModule>
vim /etc/httpd/conf.d/ox.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
RedirectMatch ^/$ /appsuite/
</Directory>
<Directory /var/www/html/appsuite>
Options None +SymLinksIfOwnerMatch
AllowOverride Indexes FileInfo
</Directory>
</VirtualHost>
systemctl start httpd
systemctl enable mariadb
systemctl enable httpd
systemctl enable open-xchange