Linux installation Jabberd2 Server whole process

Source: Internet
Author: User
Tags mysql client sqlite

First, installation
1. Download the required tools and unpack all the files
Mysql-advanced-5.6.23-linux-glibc2.5-x86_64.tar.gz
(It is best to use the officially provided compiled binary package, the file name contains glibc)
Expat-2.1.0.tar.gz
Libidn-1.30.tar.gz
Udns-0.4.tar.gz
Openssl-1.0.2a.tar.gz
Cyrus-sasl-2.1.26.tar.gz
Zlib-1.2.8.tar.gz
Libgsasl-1.8.0.tar.gz
Jabberd-2.3.2.tar.gz


LS *.tar.gz | Xargs-n1 Tar XF


2. Install MySQL Database
Copy the extracted MySQL directory to the Software installation directory
Add system MySQL Group and MySQL User:
Execute command: Groupadd MySQL and useradd-r-g MySQL MySQL
Go to install MySQL software catalog
Modify the MySQL directory owner for MySQL User: Execute command chown-r mysql:mysql.
Install database: Executes the command./scripts/mysql_install_db--user=mysql
Modify the current directory owner as root User: Execute command chown-r root:root.
Modify the current data directory owner for MySQL User: Execute command chown-r mysql:mysql data
To this database installation is complete


Add the Bin directory to the system's PATH variable: Export path= $PATH: ${home}/usr/mysql/bin


Modify the My.cnf file to specify the path to run as MySQL and log, PID, sock files.


Run Mysqld_safe file run MySQL server side, available Ps-aux | grep MySQL | Grep-v the "grep" command to see if it is running. You can also specify parameters for the server at run time: sudo./mysqld_safe--basedir=/home/shibo/usr/local/mysql_5.6.23--datadir=/home/shibo/usr/local/ Mysql_5.6.23/data--user=mysql


Possible error: [ERROR] Native table ' Performance_schema '
Workaround: sudo bin/mysql_upgrade-u root-p


Run MySQL to start the database client.


Execute the following command to specify the password for the Administrator account:
Grant Select,insert,delete,update on * to ' root ' @ '% ' identified by ' 123456 ';
Grant Select,insert,delete,update on * to ' root ' @ ' localhost ' identified by ' 123456 ';


The command runs any client that connects to the server.


Method of shutting down MySQL server: mysqladmin-u root-p shutdown


3, installation Expat
CD expat-2.1.0/
mkdir Debug
CD Debug
.. /configure--prefix=/opt/wacos/server/xmpp/app
Make
Make install


Cd.. /..


4, Installation Libidn
CD libidn-1.30/
mkdir Debug
CD Debug
.. /configure--prefix=/opt/wacos/server/xmpp/app
Make
Make install


Cd.. /..


5, Installation Udns
CD udns-0.4/
.. /configure
Make
CP Udns.h/opt/wacos/server/xmpp/app/include
CP Libudns.a/opt/wacos/server/xmpp/app/lib


Cd.. /


6. Installing OpenSSL
CD openssl-1.0.2a/
./config-fpic--prefix=/opt/wacos/server/xmpp/app No-gost no-shared no-zlib
Make depend
Make install


Cd.. /


7, installation Cyrus
CD cyrus-sasl-2.1.26/
mkdir Debug
CD Debug
We need to make a change here first.
Vim.. /plugins/digestmd5.c
62 Lines #ifdef With_ssl_des commented out
There are 80 lines corresponding to the #endid


Vim.. /saslauthd/auth_getpwent.c
57 lines: Change # include <des.h> to # include <openssl/des.h>
Then, in configure, install
.. /configure--prefix=/opt/wacos/server/xmpp/app--with-openssl=/opt/wacos/server/xmpp/app CPPFLAGS= "-I/opt/wacos/ Server/xmpp/app/include "ldflags="-l/opt/wacos/server/xmpp/app/lib "


Cd.. /


8, installation Zlib
CD zlib-1.2.8/
./configure--prefix=/opt/wacos/server/xmpp/app
Make
Make install


Cd.. /


9, installation LIBGSASL
CD libgsasl-1.8.0
mkdir Debug
CD Debug
.. /configure--prefix=/opt/wacos/server/xmpp/app
Make
Make install


Cd.. /.. /


10, installation Jabberd
CD JABBERD-2.3.2/
./configure--prefix=/opt/wacos/server/xmpp/jabberd2 \
--enable-debug--enable-pgsql--enable-ssl--enable-mio=epoll--enable-mysql=/usr/bin/\
Cflags= "-ddebug-i/opt/wacos/server/xmpp/app/include-i/opt/wacos/server/xmpp/app/include/openssl-i/opt/wacos/ SERVER/XMPP/APP/INCLUDE/SASL "\
ldflags= "-l/opt/wacos/server/xmpp/app/lib-wl,-r/opt/wacos/server/xmpp/app/lib" \
--with-extra-include-path=/opt/wacos/server/xmpp/app/include:/usr/local/include/mysql \
--with-extra-library-path=/opt/wacos/server/xmpp/app/lib:/usr/local/lib/mysql
Make
Make install


Second, the configuration
1. Import jabberd database into MySQL database
Find the location of the Db-setup.mysql file in the Jabberd installation package
Running the MySQL client
Execute: \. Db-setup.mysql


2, set the Jabberd database administrator account
Grant Select,insert,delete,update on jabberd2.* to ' jabberd2 ' @ ' percent ' identified by ' 123456 ';
Grant Select,insert,delete,update on jabberd2.* to ' jabberd2 ' @ ' localhost ' identified by ' 123456 ';


This sets the Jabberd user name: Jabberd2, Password: 123456


3. Modify the Sm.xml, C2s.xml, S2s.xml, router.xml files in the ETC directory of the Jabberd installation directory
Modify the <module>sqlite</module> in C2s.xml to <module>mysql</module>
<driver>sqlite</driver> in Sm.xml <driver>mysql</driver>


To modify the database connection password:
<mysql>
<user>jabberd2</user>
<pass>123456</pass>
</mysql>


4. Set the MySQL dynamic library variable
Export Ld_library_path= $LD _library_path:/home/shibo/usr/local/mysql_5.6.23/lib


5. Running Jabberd2
./jabberd2-d

Linux installation Jabberd2 Server whole process

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.