forked from subutux/sogosync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
210 lines (152 loc) · 7.97 KB
/
INSTALL
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
Installing Z-Push
======================
Requirements
------------
Z-Push 2 runs only on PHP 5.1 or later
A PEAR dependency as in previous versions does not exist in Z-Push 2.
The PHP version requirement is met in these distributions and versions (or later).
Debian 4.0 (etch)
Ubuntu 8.04 (hardy heron)
RHEL/CentOS 5.5
Fedora 5 (bordeaux)
OpenSuse 10.1
Slackware 12.0
Gentoo 2006.1
FreeBSD 6.1
OpenBSD 4.0
Mandriva 2007
If your distribution is not listed here, you can check which PHP version
is default for it at http://distrowatch.com/.
Additional informations can be found in the Zarafa Administrator Manual:
http://doc.zarafa.com/trunk/Administrator_Manual/en-US/html/_zpush.html
Additioal php packages
----------------------
To use the full featureset of Z-Push 2 and the z-push-top command line utility,
additional php packages are required. These provide SOAP support, access to
process control and shared memory.
These packages vary in names between the distributions.
- Generally install the package: php-soap
- On Suse (SLES & OpenSuse) install the packages: php5-pcntl php5-sysvshm php5-sysvsem
- On RHEL based systems install the package: php-process
To install this package you need to add an extra channel subscription from the
RHEL Server Optional channel.
How to install
--------------
To install Z-Push, simply untar the z-push archive, e.g. with:
tar -xzvf z-push-[version]-{buildnr}.tar.gz
The tar contains a folder which has the following structure:
z-push-[version]-{buildnr}
The contents of this folder should be copied to /usr/share/z-push.
In a case that /usr/share/z-push does not exist yet, create it with:
mkdir -p /usr/share/z-push
cp -R z-push-[version]-{buildnr}/* /usr/share/z-push/
Edit the config.php file in the Z-Push directory to fit your needs.
If you intend to use Z-Push with Zarafa backend and Zarafa is installed
on the same server, it should work out of the box without changing anything.
Please also set your timezone in the config.php file.
The parameters and their roles are also explained in the config.php file.
By default the state directory is /var/lib/z-push, the log directory /var/log/z-push.
Make sure that these directories exist and are writeable for your webserver
process, so either change the owner of these directories to the UID of
your apache process or make the directories world writeable:
chmod 777 /var/lib/z-push
chmod 777 /var/log/z-push
For the default webserver user please refer to your distribution's manual.
Now, you must configure Apache to redirect the URL
'Microsoft-Server-ActiveSync' to the index.php file in the Z-Push
directory. This can be done by adding the line:
Alias /Microsoft-Server-ActiveSync /usr/share/z-push/index.php
to your httpd.conf file. Make sure that you are adding the line to the
correct part of your Apache configuration, taking care of virtual hosts and
other Apache configurations.
Another possibility is to add this line to z-push.conf file inside the directory
which contents are automatically processed during the webserver start (by
default it is conf.d inside the /etc/apache2 or /etc/httpd depending on your
distribution).
You have to reload your webserver after making these configurations.
*WARNING* You CANNOT simply rename the z-push directory to
Microsoft-Server-ActiveSync. This will cause Apache to send redirects to the
mobile device, which will definitely break your mobile device synchronisation.
Lastly, make sure that PHP has the following settings:
php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag magic_quotes_runtime off
php_flag short_open_tag on
You can set this in the httpd.conf, in php.ini or in an .htaccess file in
the root of z-push.
If you have several php applications on the same system, you could specify the
z-push directory so these settings are considered only there.
<Directory /usr/share/z-push>
php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag magic_quotes_runtime off
php_flag short_open_tag on
</Directory>
If you don't set this up correctly, you will not be
able to login correctly via z-push.
Please also set a memory_limit for php to 128M in php.ini.
Z-Push writes files to your file system like logs or data from the
FileStateMachine (which is default). In order to make this possible,
you either need to disable the php-safe-mode in php.ini or .htaccess with
php_admin_flag safe_mode off
or configure it accordingly, so Z-Push is allowed to write to the
log and state directories.
After doing this, you should be able to synchronize with your mobile device.
To use the command line tools, access the installation directory
(usually /usr/share/z-push) and execute:
./z-push-top.php and/or
./z-push-admin.php
To facilitate the access symbolic links can be created, by executing:
ln -s /usr/share/z-push/z-push-admin.php /usr/sbin/z-push-admin
ln -s /usr/share/z-push/z-push-top.php /usr/sbin/z-push-top
With these symlinks in place the cli tools can be accessed from any
directory and without the php file extension.
Upgrading from Z-Push 1.X versions
------------------------------------
The easiest way to upgrade is to follow the steps for a new installation. The states
of Z-Push 1.X are not compatible and there is no upgrade path, but as this version
implements a fully automatic resynchronisation of devices it should not affect the
users and work without the user interaction.
Update to newer Z-Push versions
-------------------------------
Upgrading to a newer Z-Push version follows the same path as the initial
installation.
Please observe the published release notes of the new Z-Push version.
For some releases it is necessary to e.g. resynchronize the mobile.
Setting up your mobile device
-----------------------------
This is simply a case of adding an 'exchange server' to your activesync
server list, specifying the IP address of the Z-Push's apache server,
disabling SSL, unless you have already setup SSL on your Apache server,
setting the correct username and password (the domain is ignored, you can
simply specify 'domain' or some other random string), and then going through
the standard activesync settings.
Once you have done this, you should be able to synchronise your mobile
simply by clicking the 'Sync' button in ActiveSync on your mobile.
*NOTE* using the synchronisation without SSL is not recommended because
your private data is transmitted in clear text over the net. Configuring
SSL on Apache is beyond of the scope of this document. Please refer to
Apache documention available at http://httpd.apache.org/docs/
Troubleshooting
---------------
Most problems will be caused by incorrect Apache settings. To test whether
your Apache setup is working correctly, you can simply type the Z-Push URL
in your browser, to see if apache is correctly redirecting your request to
z-push. You can simply use:
http://<serverip>/Microsoft-Server-ActiveSync
If correctly configured, you should see a username/password request and
when you specify a valid username and password, you should see a Z-Push
information page, saying that this kind of requests is not supported.
Without authentication credentials Z-Push displays general information.
If not then check your PHP and Apache settings and Apache error logs.
If you have other synchronisation problems, you can increase the LOGLEVEL
parameter in the config e.g. to LOGLEVEL_DEBUG or LOGLEVEL_WBXML.
The z-push.log file will then collect detailed debug information from your
synchronisation.
*NOTE* This setting will set Z-Push to log the detailed information for
*every* user on the system. You can set a different log level for particular
users by adding them comma separated to $specialLogUsers in the config.php
e.g. $specialLogUsers = array("user1", "user2", "user3");
*NOTE* Be aware that if you are using LOGLEVEL_DEBUG and LOGLEVEL_WBXML
Z-Push will be quite talkative, so it is advisable to use log-rotate
on the log file.