Cài đặt OBM trên CentOS 5

# Cấu hình kho lưu trữ yum để cài đặt OBM 2.4.x

## postgresSQL 8.3

#### *Không cần thiết với CentOS 5.5, 5.6 gần đây*

Chúng tôi sử dụng postgesSQL 8.3, bạn có thể tìm thêm thông tin cấu hình này trên [http://yum.pgsqlrpms.org/howtoyum.php](http://yum.pgsqlrpms.org/howtoyum.php).

Sử dụng gói này để cài tự động kho lưu trữ pg:[http://yum.pgsqlrpms.org/reporpms/repoview/letter_p.group.html](http://yum.pgsqlrpms.org/reporpms/repoview/letter_p.group.html)

rpm -Uvh http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-7.noarch.rpm

Trên CentOS sử dụng gói sau đây cho Red Hat

rpm -Uvh http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-redhat-8.3-7.noarch.rpm

:!: Thêm dòng sau đây vào file cấu hình (/ etc/yum.repos.d/pgdg-83-centos.repo) để không sử dụng các module perl cho repo này.

exclude=libevent perl*

## EPEL

OBM cần kho lưu trữ EPEL: [http://fedoraproject.org/wiki/EPEL](http://fedoraproject.org/wiki/EPEL)

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

hoặc

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

cho một cài đặt 64bit

## OBM

Kho lưu trữ OBM

Tạo một tập tin / etc / yum.repos.d / obm.repo với nội dung sau :

[obm]
name=obm
baseurl=http://rpm.obm.org/24
enabled=1
gpgcheck=0

Sau đó sử dụng các lệnh này :

yum remove sendmail
yum install obm-PostgreSQL obm obm-funambol obm-solr obm-sync minig-backend minig minig-storage opush

Tiếp theo, bạn cần phải cấu hình OBM với kịch bản OBM-admin. Nếu bạn đã làm sai chỉ cần bắt đầu kịch bản bạn (obm-ui, obm-postfix ...)

================= Cấu hình chính OBM ==================

o Please enter external url (IP): obm.example.com
o Plese enter LDAP server name : 127.0.0.1
o Enable module LDAP, (y)es (n)o : y
o Enable module MAIL, (y)es (n)o : y
o Enable module SAMBA, (y)es (n)o : n
o Enable module WEB, (y)es (n)o : n

=============== Cấu hình OBM DataBase ================

o Please enter the DataBase hostname: localhost
o Please enter the DataBase type (MYSQL/PGSQL): PGSQL
o Enter the DataBase name: obm
o Enter the DataBase user: obm
o Enter the DataBase user password:

======================= Kết thúc file =======================

=============== Cấu hình chính OBM-CORE================
Set doucment_root (OBM) setting
Set default_pat

===============HOÀN THÀNH OBM-CORE ===============
=============== Cài đặt OBM DataBase ================
Initilise postgres
Initializing database: [ OK ]
Checking permission on Postgres
Fix permission on Postgres
Checking permission on Postgres
Fix permission on Postgres
Stopping postgresql service: [FAILED]
Starting postgresql service: [ OK ]
Vérification de la base de données obm
Installing OBM DB

*** Parameters used
database type = pgsql
database = obm
database user = obm
database password = obm
install lang = fr

*** Document repository creation
Delete old database
dropdb: database removal failed: ERROR: database "obm" does not exist
dropuser: removal of role "obm" failed: ERROR: role "obm" does not exist
Creating role 'obm' (pw: obm) & db 'obm' (lang: fr)...
ALTER ROLE
Create new database
CREATE LANGUAGE
ALTER DATABASE
Dictionnary data insertion
Company Naf Code data insertion
Default preferences data insertion
DONE.

=========== Kết thúc cài đặt OBM DataBase ============
================= Cấu hình người dùng hệ thống OBM ==================

o Enter root ldap password [mdp3PaAl]

o Enter admin cyrus password [cyrus]

o Do you want add syncrepl user? (y)es,(n)o [n]

Insertion des utilisateurs en BD

================= Kết thúc cấu hình người dùng hệ thống OBM ==================

=============== Cấu hình OBM cert ================

Generate Certificate for this host (obm.example.com)
Generating a 2048 bit RSA private key
....+++
.........................................................................................+++
writing new private key to '/etc/obm/certs/obm.example.com_pk.pem'
-----
Using configuration from /var/lib/obm-ca/ca_nocn.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'FR'
stateOrProvinceName :PRINTABLE:'France'
organizationName :PRINTABLE:'Groupe LINAGORA'
organizationalUnitName:PRINTABLE:'Aliasource'
commonName :PRINTABLE:'obm.example.com'
Certificate is to be certified until Oct 31 09:53:48 2019 GMT (3650 days)

Write out database with 1 new entries
Data Base Updated
============ Kết thúc cấu hình OBM cert ============
================= Cấu hình OBM UI ==================

Chose type of authentication: (database/ldap) [database]
The /etc/httpd/conf.d/obm.conf file already exist
Do you want replace it? (y)es,(n)o ?y
Activation Tomcat proxy
what is ip adress of OBM-TOMCAT server (obm-sync, funambol) ?127.0.0.1
Activation opush proxy
what is ip adress of OPUSH server ?127.0.0.1
Stopping httpd: [FAILED]
Starting httpd: [ OK ]

================= Kết thúc cấu hình OBM UI==================

================= Cấu hình OBM LDAP ==================

The slapd.conf fil alradey exist

Do you want replace it? (y)es, (n)o [n] y
o Do you want active syncrepl for this LDAP? (y)es, (n)o: [n] n
o Do you want active SSL/TLS in LDAP ? (y)es,(n)o [n]
Shutting down kernel logger: [ OK ]
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
find: "/var/lib: No such file or directory
Checking configuration files for slapd: /etc/openldap/slapd.conf: line 184: rootdn is always granted unlimited privileges.
/etc/openldap/slapd.conf: line 197: rootdn is always granted unlimited privileges.
/etc/openldap/slapd.conf: line 210: rootdn is always granted unlimited privileges.
/etc/openldap/slapd.conf: line 216: rootdn is always granted unlimited privileges.
config file testing succeeded
[ OK ]
Starting slapd: [ OK ]

================= Kết thúc cấu hình OBM LDAP ==================

publish /etc/obm-tomcat/applis/funambol.xml into OBM tomcat server...
publish /etc/obm-tomcat/applis/minig.xml into OBM tomcat server...
publish /etc/obm-tomcat/applis/solr.xml into OBM tomcat server...
Waiting for OBM Tomcat shutdown...
Using CATALINA_BASE: /usr/share/tomcat
Using CATALINA_HOME: /usr/share/tomcat
Using CATALINA_TMPDIR: /usr/share/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-openjdk
Execution du script /usr/bin/obm-funambol-storage
postgres already initialized
Checking permission on Postgres
Fix permission on Postgres
Checking permission on Postgres
Fix permission on Postgres
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
check funambol in PostgreSQL
user: funambol doesn't exist in postgres
create funambol in postgres database
password for this user
ALTER ROLE
check database funambol
Create funambol DB...
Insert SQL file into funambol DB...
Reinstall funambol DB...
========= end of Funambol DataBase initialisation ==========
Execution du script /usr/bin/obm-sync
publish /etc/obm-tomcat/applis/funambol.xml into OBM tomcat server...
publish /etc/obm-tomcat/applis/minig.xml into OBM tomcat server...
publish /etc/obm-tomcat/applis/obm-sync.xml into OBM tomcat server...
publish /etc/obm-tomcat/applis/solr.xml into OBM tomcat server...
Waiting for OBM Tomcat shutdown...
Using CATALINA_BASE: /usr/share/tomcat
Using CATALINA_HOME: /usr/share/tomcat
Using CATALINA_TMPDIR: /usr/share/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-openjdk
================= Cấu hình OBM Cyrus ==================

o Do you want replace configuration ? (y)es,(n)o y
Importing cyrus-imapd databases: [ OK ]
Starting cyrus-imapd: [ OK ]
Starting saslauthd: [ OK ]

================= Kết thúc cấu hình OBM Cyrus==================

================= Cấu hình OBM postfix ==================

file /etc/postfix/main.cf already exist
do you want replace this file? (y)es,(n)o ? [n] y
o Please enter your relay host if you have it

smtp.tlse.lng
o Please enter your 'mynetwork' (default empty)

create initital postfix maps

================= Kết thúc cấu hình OBM postfix==================

Starting obm-Satellite : hoàn thành.

======================= Kết thúc cấu hình obm-satellite =======================

================ Cấu hình Minig database ============

o Please enter ip adress or hostname of minig Databse server

127.0.0.1
o Please enter password of user minig of database minig

minig

================ Cấu hình Minig ============

o Please enter ip adress or hostname of IMAP server

127.0.0.1
o Please enter ip adress or hostname of SMTP server

127.0.0.1
o Please enter ip adress or hostname of OBM SYNC server

127.0.0.1
postgres already initialized
Checking permission on Postgres
Fix permission on Postgres
Checking permission on Postgres
Fix permission on Postgres
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
check minig in PostgreSQL
user: minig doesn't exist in postgres
create minig in postgres database
password for this user
ALTER ROLE
check database minig
Create minig DB...
Insert SQL file into minig DB...
Reinstall minig DB...
========= Kết thúc cài đặt minig DataBase ==========

Sau đó, khởi động lại một số dịch vụ java :

[root@rh54 ~]# /etc/init.d/obm-tomcat restart
Waiting for OBM Tomcat shutdown...
Using CATALINA_BASE: /usr/share/tomcat
Using CATALINA_HOME: /usr/share/tomcat
Using CATALINA_TMPDIR: /usr/share/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/java-openjdk
[root@rh54 ~]# /etc/init.d/minig-backend restart
Waiting for OBM Minig Backend Server shutdown.
OBM Minig Backend Server started: 4623
[root@rh54 ~]# /etc/init.d/obm-locator restart
Waiting for OBM Locator Server shutdown..
OBM Locator Server started: 4703
[root@rh54 ~]# /etc/init.d/postfix restart
Stopping Postfix Mail Transport Agent: postfix.
Starting Postfix Mail Transport Agent: postfix.
[root@rh54 ~]# /etc/init.d/opush restart
Waiting for OBM Opush Server shutdown..
OBM Opush Server started: 7727



Bây giờ **cài đặt của bạn đã xong**, hãy xem nhanh trang web [Getting Started](/wiki/getting-started) của chúng tôi !Nike Business