|
||||||||
|
||||||||
|
|
Công Cụ | Xếp Bài |
27-08-2009, 02:51 PM | #1 |
Guest
Trả Lời: n/a
|
Hướng dẫn cài đặt Open - Xchange trên Centos 5
Open-Xchange Server 6 on CentOS5 Linux
Các bước cài đặt
Open-Xchange maintains public available software repositories for different platforms, such as CentOS. This repository should be added to the CentOS installation to enable simple installation and updates. Start a console and create a software repository file for Open-Xchange: $ vim /etc/yum.repos.d/ox.repo [ox] name=Open-Xchange baseurl=http://software.open-xchange.com/OX6/stable/RHEL5/ enabled=1 gpgcheck=0 Updating repositories and installing packages Reload the package index. This will download the package descriptions available at the software repositories: $ yum update The following command starts the download and installation process of all required package for Open-Xchange deployment: $ yum install mysql-server open-xchange open-xchange-authentication-database \ open-xchange-admin-client open-xchange-admin-lib \ open-xchange-admin-plugin-hosting open-xchange-admin-plugin-hosting-client \ open-xchange-admin-plugin-hosting-lib open-xchange-configjump-generic \ open-xchange-configjump-generic-gui open-xchange-contactcollector \ open-xchange-conversion open-xchange-conversion-engine \ open-xchange-conversion-servlet open-xchange-crypto \ open-xchange-data-conversion-ical4j open-xchange-dataretention \ open-xchange-dataretention-csv open-xchange-genconf open-xchange-genconf-mysql \ open-xchange-gui open-xchange-imap open-xchange-mailfilter \ open-xchange-management open-xchange-monitoring \ open-xchange-passwordchange-database open-xchange-passwordchange-servlet \ open-xchange-pop3 open-xchange-publish open-xchange-publish-basic \ open-xchange-publish-infostore-online open-xchange-publish-json \ open-xchange-publish-microformats open-xchange-push-udp \ open-xchange-resource-managerequest open-xchange-server \ open-xchange-settings-extensions open-xchange-smtp \ open-xchange-spamhandler-default open-xchange-sql open-xchange-subscribe \ open-xchange-xerces-sun open-xchange-subscribe-json \ open-xchange-subscribe-microformats open-xchange-subscribe-crawler \ open-xchange-subscribe-xing open-xchange-subscribe-linkedin \ open-xchange-templating open-xchange-timer open-xchange-unifiedinbox \ open-xchange-online-help-de open-xchange-online-help-en \ open-xchange-online-help-fr open-xchange-admin-doc \ open-xchange-admin-plugin-hosting-doc open-xchange-charset \ open-xchange-contacts-ldap open-xchange-control open-xchange-easylogin \ open-xchange-group-managerequest open-xchange-i18n open-xchange-jcharset \ open-xchange-sessiond Unlike Redhat5, CentOS5 does not include one critical dependency, Sun's Java 1.5 JDK in it's repositories. Therefore the command above will fail with this message: Error: Missing Dependency: java-1.5.0-sun is needed by package open-xchange-server Error: Missing Dependency: java-1.5.0-sun is needed by package open-xchange-admin The JDK RPM packages you get from Sun's site won't work, either, as they are not called java-1.5.0-sun. Luckily you can download a package here: [1] To install this package do tar xjvf java-1.5.0-sun.tar.bz2 cd java-1.5.0-sun yum --nogpgcheck localinstall java-1.5.0-sun-1.5.0.15-1jpp.i586.rpm Doing this by hand check these URLs: During package creating make sure that the *.srpm and *.bin files are using exactly same Java version (e.g. JDK 1.5 update 15). Otherwise the rpmbuild command will fail. Open-Xchange configuration To avoid confusion right at the start notice that Open-Xchange uses multiple administration levels and requires different credentials at some stages at the installation and server management. Note that the passwords chosen at this guide are weak and should be replaced by stronger passwords.
$ /etc/init.d/mysqld start a good idea is to add the Open-Xchange binaries to PATH: $ echo PATH=$PATH:/opt/open-xchange/sbin/ >> ~/.bashrc && . ~/.bashrc Now we have to initialize the Open-Xchange configdb database. This can all be done by executing the initconfigdb script. $ /opt/open-xchange/sbin/initconfigdb --configdb-pass=db_password -a Add the -i option if you want to remove an already existing open-xchange configdb. Before starting any service, all basic configuration files need to be set up correctly. The --configdb-pass option indicates the password of the openexchange database user previously created, the --master-pass options specifies the password of the Open-Xchange adminmaster user that will be created when executing the oxinstaller script. $ /opt/open-xchange/sbin/oxinstaller --servername=oxserver --configdb-pass=db_password \ --master-pass=admin_master_password --ajp-bind-port=localhost Note: In a clustered setup, --ajp-bind-port must be set to * After initializing the configuration, start the Open-Xchange Administration service by executing: $ /etc/init.d/open-xchange-admin start Note: sasl must also be configured and started in order for registerserver to work: change the value of MECH from pam to shadow in /etc/sysconfig/saslauthd and run $ /etc/init.d/saslauthd start Next we have to register the local server at the Open-Xchange configdb database: $ /opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P admin_master_password Now we have to create a local directory that should be used as Open-Xchange filestore. This directory will contain all Infostore content and files attached to groupware objects. To maintain access by the Open-Xchange Groupware service, it is required to grant permissions to the open-xchange system user. $ mkdir /var/opt/filestore $ chown open-xchange:open-xchange /var/opt/filestore Now register the directory as a filestore at the Open-Xchange server: $ /opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P admin_master_password \ -t file:///var/opt/filestore Finally register the groupware database, this is a separated database where all groupware specific data is stored: $ /opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P admin_master_password \ -n oxdatabase -p db_password -m true Configure services Now as the Open-Xchange Server has been set up and the database is running, we have to configure the Apache webserver and the mod_proxy_ajp module to access the groupware frontend. To gain better GUI performance, the usage of mod_expires and mod_deflate is strongly recommended. Those modules will limit the amount of client requests and compress the delivered content. The default installation of the Apache webserver on CentOS provides a welcome screen which is not necessary for server operation, it can be removed by deleting the corresponding configuration file: $ rm /etc/httpd/conf.d/welcome.conf Configure the mod_proxy_ajp module by creating a new Apache configuration file. $ vim /etc/httpd/conf.d/proxy_ajp.conf LoadModule proxy_ajp_module modules/mod_proxy_ajp.so <Proxy *> Order deny,allow allow from all </Proxy> ProxyPass /axis2 ajp://127.0.0.1:8009/axis2 smax=0 ttl=60 retry=5 ProxyPass /ajax ajp://127.0.0.1:8009/ajax smax=0 ttl=60 retry=5 ProxyPass /servlet ajp://127.0.0.1:8009/servlet smax=0 ttl=60 retry=5 ProxyPass /infostore ajp://127.0.0.1:8009/infostore smax=0 ttl=60 retry=5 ProxyPass /publications ajp://127.0.0.1:8009/publications smax=0 ttl=60 retry=5 Modify the default website settings to display the Open-Xchange GUI $ vim /etc/httpd/conf.d/ox.conf NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /var/www/html> AllowOverride None Order allow,deny allow from all RedirectMatch ^/$ /ox6/ </Directory> ExpiresActive On ExpiresByType image/gif "access plus 23 hours" ExpiresByType image/png "access plus 23 hours" ExpiresByType image/jpg "access plus 23 hours" ExpiresByType image/jpeg "access plus 23 hours" ExpiresByType text/javascript "access plus 23 hours" ExpiresByType text/css "access plus 23 hours" ExpiresByType text/html "access plus 23 hours" ExpiresByType application/x-javascript "access plus 23 hours" <Files ~ "\.(js|css|gif|jpe?g|png)$"> Header append Cache-Control "public" </Files> DeflateFilterNote ratio AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/javascript BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html Header append Vary User-Agent env=!dont-vary </VirtualHost> After the configuration is done, restart the Apache webserver $ /etc/init.d/httpd restart Finally start the Open-Xchange Groupware service $ /etc/init.d/open-xchange-groupware start Adding services to runlevels The new services are now installed and configured, but to make them start up on a server boot, they need to be added to some runlevels: $ chkconfig --level 345 mysqld on $ chkconfig --level 345 httpd on $ chkconfig --level 345 open-xchange-groupware on $ chkconfig --level 345 open-xchange-admin on Creating contexts and users Now as the whole setup is complete and you already should get a login screen when accessing the server with a webbrowser, we have to setup a context and a default user as the last step of this tutorial. The mapping defaultcontext will allow you to set this context as the default one of the entire system so that users which will be created within this context can login into Open-Xchange Server without specifying their domain at the login screen. Only one context can be specified as defaultcontext. The oxadmin user that will be created by this command is the default admin of the created context. This account will gather additional functions that are also described in the administration manual. The context id parameter must to be unique and numeric, otherwise the server will complain when you try to create a context. New contexts must be created by the oxadminmaster user, user accounts inside a context are created with the credentials of the contexts oxadmin account. The access-combination-name property defines the set of available modules and functions for users of the context. $ /opt/open-xchange/sbin/createcontext -A oxadminmaster -P admin_master_password -c 1 \ -u oxadmin -d "Context Admin" -g Admin -s User -p secret -L defaultcontext \ -e oxadmin@example.com -q 1024 --access-combination-name=all Create a user for testing purposes: $ /opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P secret -u testuser \ -d "Test User" -g Test -s User -p secret -e testuser@example.com \ --imaplogin testuser --imapserver 127.0.0.1 --smtpserver 127.0.0.1 Now connect to the server with a webbrowser and login using the credentials testuser / secret. Log files and issue tracking Whenever unexpected or erroneous behavior takes place, it will be logged depending on the configured loglevel. All logfiles are stored at the operating systems default location. Events triggered by the Open-Xchange Groupware services are logged to a rotating file open-xchange.log, events triggered by the Open-Xchange Administration service are logged to open-xchange-admin.log. Those files are the very first place to monitor. $ tail -f -n200 /var/log/open-xchange/open-xchange.log.0 $ tail -f -n200 /var/log/open-xchange/open-xchange-admin.log.0 Sau khi cài đặt và tạo user test thành công các bạn truy cap vao OX bằng cách http://ipserverox Chúc các bạn thành công Theo: open - xchange AdminPhuong |
|
|