Monday 5 November 2018

Install OpenFire 3.8.1 on CentOS 6.4 x86_64

Install OpenFire 3.8.1 on CentOS 6.4 x86_64

 

Install Centos 6.4 x86_64
  • Be sure to only do the “minimal” install — use the minimal ISO from here
Login to the server as root
This installs the dependencies:
yum -y install wget java glibc.i686 Change to the /tmp directory
cd /tmp Download the RPM from this page -or- use this direct link for the RPM.
wget http://download.igniterealtime.org/openfire/openfire-3.8.1-1.i386.rpm Run and install the RPM
yum -y install ./openfire*rpm Once the RPM has been installed, start the openfire service
service openfire start Ensure that openfire will boot with your server
chkconfig –level 235 openfire on For this instance, you’ll want to make sure iptables is not running, you can configure the iptables rules how you need them later.
service iptables stop Install mysql server
yum -y install mysql-server Start mysql server
/sbin/service mysqld start Ensure mysql starts when the server does
/sbin/chkconfig mysqld on Start the basic mysql secure install
/usr/bin/mysql_secure_installation hit “enter” to give no password
generate and save a new root password
hit “enter” aka “Y” on the rest of the questions
Restart mysql server
/sbin/service mysqld restart Login to mysql as root (use the new root password you just entered)
/usr/bin/mysql -u root -p Create database
CREATE DATABASE openfire; Create user (update *username* and *securepassword* below)
INSERT INTO mysql.user (User,Host,Password) VALUES(‘username’,’127.0.0.1′,PASSWORD(‘securepassword’)); Save your changes
FLUSH PRIVILEGES; Give the user access to the database
GRANT ALL PRIVILEGES ON openfire.* to openfire@127.0.0.1; Save your changes
FLUSH PRIVILEGES; Exit mysql
exit Navigate in your browser to
http://yourdomain.com:9090 Follow the steps, enter in the mysql information that you created when prompted for a database. You are now good to go! Don’t forget to update your iptables, learn more

 

Openfire 4.2.3 installation and config at centos 6

Openfire 4.2.3 installation and config at centos 6.X


my server is centos 6.10 32 bit
rpm is  openfire-4.2.3-1.i686.rpm RPM (32bit JRE bundled) for Red Hat Linux 
openfire-4.2.3-1.x86_64.rpm RPM (64bit JRE bundled) for Red Hat Linux

client system is windows or centos
client software is
https://pidgin.im/download/windows/
https://pidgin.im/download/linux/

steps:
Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It is also known as Jabber. It uses the only widely adopted open protocol for instant messaging, XMPP. The full name of XMPP is Extensible Messaging and Presence Protocol. It is a real-time communication protocol (which includes chat) based on XML. Installation and the management of Openfire is pretty simple.
It should be noted that with Openfire, no chat is possible yet. A client is needed: Openfire cannot be used alone, just like web servers need a browser.
In this tutorial we will see, how to install Openfire in a clean minimal installation of CentOS 7.
First of all we need to install some important tools like vim, wget.
yum install -y vim wget

Download and install Openfire

We have to download the rpm directly to /home from Ignite Real time website. 
wget http://download.igniterealtime.org/openfire/openfire-4.2.3-1.i686.rpm 
 
this one is lower version so before download kindly check latest version 

https://www.igniterealtime.org/downloads/


Install it using yum command
yum install -y /home/openfire-4.2.3-1.i686.rpm 
Install libraries
yum install -y glibc.i686
Start service after every reboot
chkconfig openfire on
And start the openfire service
systemctl start openfire.service
Update IPtables
firewall-cmd --permanent --zone=public --add-port=9090/tcp
firewall-cmd --permanent --zone=public --add-port=9091/tcp

firewall-cmd --reload
 
other wise flush the filrewall
iptables -F
 

Install PostgreSQL database

For running XMPP we have to setup a Database, We choose postgreSQL which is comes in CentOS 7 by default.
Shoot the following command to install PostgreSQL
yum install -y postgresql postgresql-server postgresql-devel postgresql-libs
Enable PostgreSQL to start after each reboot
systemctl enable postgresql.service
Initialize directory structure and postgres system database
postgresql-setup initdb
Start the service.
systemctl start postgresql.service
PostgreSQl is now running. Now we need to create a database and a dedicated database user for Openfire.
For full administration access, switch to postgres user.
su postgres
Now we are on postgres shell and we will proceed with database and user creation and will setup the password for the user.
For create new database for openfire, Run the following command
createdb openfire
Run the following command to create the database user for openfire
createuser -P openfire
The ‘-P’ parameter ensures that the shell will explicitly ask for user’s password and you will need to type it in.
Now the user openfire is secured with a password.
We can setup password for administration postgres user by the following command
psql -U postgres -d postgres -c "ALTER USER postgres WITH PASSWORD 'OUR-CHOSEN-PGSQL-PASSWORD';"
Next, Open /var/lib/pgsql/data/pg_hba.conf in your favorite editor.
vim /var/lib/pgsql/data/pg_hba.conf
Scroll down to the bottom of the file and replace all peer and ident strings with md5 string.
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only

local   all         all                               md5

# IPv4 local connections:

host    all         all         127.0.0.1/32          md5

# IPv6 local connections:

host    all         all         ::1/128               md5
Save the file. Press CTRL+Z to go back from postgres shell.
Restart PostgreSQL service
systemctl restart postgresql.service
Now we have finished backend configuration for openfire.

GUI setup

You can access the GUI of Openfire by pointing your browser to the following URL,  http://<YOUR-SERVER-IP>:9090
This is the screen that will welcome you. We can choose preferable language and hit continue.
Capture
In the next screen you can enter your domain which will be the part of your XMPP id. hit continue.
Capture1
Fill in database settings according to our previous steps when we created openfire user. hit continue.
Capture2
In the next screen, We will choose “Default” option to store users and groups in the server database. hit continue.
Capture3
Next screen allows Fill in your email address and set preferred password. hit continue.
Capture4
All the steps have been completed successfully. Now we can login with new credentials. (admin / your password)
JJ



how to increase java memory:

vim /etc/sysconfig/openfire  
OPENFIRE_OPTS="-Xmx2024m"
 
restart openfire,
thats all