Installation

Install JiveIM is really simple :).

Requiresites

  • Database
    • MySQL +5.1.
    • Scripts:
      • Database Schema: LiveChat.sql.
      • Data: Data.sql.
  • Java
    • JDK/JRE +1.8

Setup JiveIM

There are many parameters you should change before start JiveIM.

  • Public ports webserver.port and socketio.port for services in file app.properties.
  • Data path file.dir in file kin-common.properties.
  • SMTP Server parameters mail.host, mail.port, mail.username, mail.password, mail.sender, mail.displayname in file kin-common.properties.
# ---------------------- MAIL ---------------------
mail.host=email-smtp.us-east-1.amazonaws.com
mail.port=587
mail.username=34t30OI#Nt938tj3oijoij9832tr32
mail.password=349t8jaSKIJG(WHT32oti32jt09t3j3t3t3r32r/pofjf
mail.sender=no-reply@jiveim.com
mail.displayname=JiveIM Live Chat
mail.starttls=true
mail.protocol=smtp
  • Template dir template.dir for mails, templates... in file kin-common.properties.
  • Update Database setting in file kin-persistence.properties.
persistence.jdbcUrl=jdbc:mysql://localhost/jiveim?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8
persistence.username=jiveim
persistence.password=jiveIM12345
  • Update JRE/JDK param JAVA_HOME in file start.sh

export JAVA_HOME=/usr/lib/jvm/oracle_jdk8


I. Database on Ubuntu

1. Install MySQL

Skip these steps if you installed MySQL before. And Go next step 2. Create Database

To install MySQL, open terminal and type in these commands:

sudo apt-get install mysql-server

During the installation, MySQL will ask you to set a root password. If you miss the chance to set the password while the program is installing, it is very easy to set the password later from within the MySQL shell.

Once you have installed MySQL, we should activate it with this command:

sudo mysql_install_db

Finish up by running the MySQL set up script:

sudo /usr/bin/mysql_secure_installation

The prompt will ask you for your current root password.

Type it in.

Enter current password for root (enter for none): '123456' <=== Enter Password here

OK, successfully used password, moving on...

Then the prompt will ask you if you want to change the root password. Go ahead and choose N and move on to the next steps. It’s easiest just to say Yes to all the options. At the end, MySQL will reload and implement the new changes.

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] 'y' <=== Enter Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] 'y' <=== Enter Y
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] 'y' <=== Enter Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] 'y' <=== Enter Y
 ... Success!

Cleaning up...

Try to login to MySQL as root account with this command:

mysql -uroot -p123456

Check databases. Type it in show databases;.

...
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| livechat           |
| mysql              |
| performance_schema |
| test               |
+--------------------+
9 rows in set (0.00 sec)

mysql> 

2. Create Database

We have root's passowrd is 123456. Login to MySQL

mysql -uroot -p123456

While connect to MySQL. Create database jiveim,

  • mysql> CREATE DATABASE jiveim;
  • mysql> ALTER DATABASE jiveim CHARSET=utf8;
  • mysql> ALTER DATABASE jiveim DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Create username jiveim with password jiveim12345 and assign permission login to database jiveim.

  • mysql> GRANT ALL PRIVILEGES on jiveim.* to jiveim@localhost identified by "jiveim123456";
  • mysql> FLUSH PRIVILEGES;

Grant Privileges for a IP 8.8.4.4 to user jiveim

  • mysql> GRANT ALL PRIVILEGES on jiveim.* to jiveim@8.8.4.4 identified by "jiveim123456";
  • mysql> FLUSH PRIVILEGES;

Try login to MySQL as username jiveim was created above.

mysql -ujiveim -pjiveim12345

Show all databases show databases:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| jiveim             |
+--------------------+
9 rows in set (0.01 sec)

Notes:

You can use other tools to create Database.

3. Import Schema/Data

Assume you created database jiveim and account jiveim have permission on it. Try login to MySQL as username jiveim was created above.

mysql -ujiveim -pjiveim12345

Switch to data jiveim.

mysql> use jiveim;

Import database LiveChat.sql and Data data.sql at path /home/jiveim/JiveIM-1.0/data/

  • mysql> source /home/jiveim/JiveIM-1.0/data/LiveChat.sql;
  • mysql> source /home/jiveim/JiveIM-1.0/data/data.sql;

II. JiveIM on Ubuntu

1. Install JDK/JRE

1.1 Use PPA

You can use WebUpd8 PPA (this will download the required files from Oracle and install JDK 8):

  • sudo apt-add-repository ppa:webupd8team/java
  • sudo apt-get update
  • sudo apt-get install oracle-java8-installer

Also ensure your JAVA_HOME variable has been set to:

/usr/lib/jvm/java-8-oracle

1.2 Manual install

The tar.gz provided by Oracle don't have an actual installation process. You just extract those files to a location you want and add them to your path. So the process is the following:

  • Download a .tar.gz from JDK 1.8 (here I will be using jdk-8u65-linux-x64.tar.gz). Or JRE 1.8
  • Extract it to somewhere
  • Move the extracted folder to /usr/lib/jvm. This is not required but it is the place where Java runtime software is installed

sudo mv /path/to/jdk1.8.0_20 /usr/lib/jvm/oracle_jdk8

Create a file /etc/profile.d/oraclejdk.sh with the following content (adapt the paths to reflect the path where you stored your JDK):

export JAVA_HOME=/usr/lib/jvm/oracle_jdk8
export JRE_HOME=/usr/lib/jvm/oracle_jdk8/jre
export PATH=$PATH:$JAVA_HOME/bin

Done! Those paths will only be recognized after you logout or restart, so if you want to use them right away run:

source /etc/profile.d/oraclejdk.sh

Notes:

We recommend you use JRE instead of JDK if you are not a Developer.

2. Run JiveIM

Go to root folder JiveIM and run command start.sh. Don't forget change JAVA_HOME /usr/lib/jvm/oracle_jdk8 in start.sh.

cd JiveIM
./start.sh

III. Database on CentOS

1. Install MySQL

Skip these steps if you installed MySQL before. And Go next step 2. Create Database

If you want to install the latest MySQL version. Download the rpm package, which will create a yum repo file for MySQL Server installation. You can review all options at link Download MySQL Yum Repository

Let start:

rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

Again, use yum to install database:

yum install mysql-server

Start and enable service:

  • systemctl start mysqld
  • systemctl status mysqld
  • systemctl enable mysqld

Setup Password for MySQL the first time:

/usr/bin/mysql_secure_installation

To make sure MySQL Service is running:

systemctl list-unit-files | grep mysqld.service

If you want to use MariaDB. Just do the same above steps to install MariaDB

  • yum install mariadb-server mariadb
  • systemctl start mariadb
  • systemctl enable mariadb
  • /usr/bin/mysql_secure_installation
  • systemctl list-unit-files | grep mariadb.service

If you install Database and JiveIM on diffirent servers. You must open port MySQL of Server Datbase to external connect to.

Install and run Firewall

  • yum install firewalld
  • service firewalld start
  • service firewalld status
  • systemctl enable firewalld
  • systemctl restart firewalld
  • systemctl reload firewalld
  • systemctl status firewalld

  • Check opening Ports netstat -tuplen

  • Use this command to find your active zone(s): firewall-cmd --get-active-zones

  • Add port 3306 firewall-cmd --zone=public --add-port=3306/tcp --permanent

  • Reload firewall for changes to take effect firewall-cmd --reload

Notes:

- Make sure you perform above actions as super admin.

1.1 CentOS 6

1.2 CentOS 5

2. Create Database

  • Refer to I. Database on Ubuntu > 2. Create Database.

3. Import Schema/Data

  • Refer to I. Database on Ubuntu > 3. Import Schema/Data.

IV. JiveIM on CentOS

1. Install JDK/JRE

  • Refer to II. JiveIM on Ubuntu > 1.2 Manual install.

2. Run JiveIM

  • Refer to II. JiveIM on Ubuntu > 2. Run JiveIM.

3. On Youtube:

Part 1 how to install and use JiveIM on CentOS 7

  • Create VPS on Vultr
  • Setup JRE 1.8
  • Setup MySQL/MariaDB
  • Setup Firewall
  • Setup JiveIM

Setup JiveIM on CentOS 7

Part 2 Production Environment

  • Setup JiveIM on Production Environment
  • Public at subdomain main.jiveim.net, im.jiveim.net

Setup JiveIM on CentOS 7 - II


V. Database on Mac OS

1. Install MySQL

Skip these steps if you installed MySQL before. And Go next step 2. Create Database

We recommend you download the latest version at Download MySQL Community Server

Just click mysql-5.7.9-osx10.10-x86_64.dmg to tnstall it :).

2. Create Database

  • Refer to I. Database on Ubuntu > 2. Create Database.

3. Import Schema/Data

  • Refer to I. Database on Ubuntu > 3. Import Schema/Data.

VI. JiveIM on Mac OS

1. Install JDK/JRE

Download a .dmg from JDK 1.8 (here I will be using jdk-8u65-macosx-x64.dmg)

Just click jdk-8u65-macosx-x64.dmg to tnstall it :).

Check your JDK path /Library/Java/JavaVirtualMachines

And update file start.sh /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home.

2. Run JiveIM

  • Refer to II. JiveIM on Ubuntu > 2. Run JiveIM.

VII. Database on Windows

1. Install MySQL

a. We recommend you download the latest version at Download MySQL Community Server. Select a MSI file

Download MySQL - Step 1

b. Don't care about Oracle account. Just click No thanks, just start my download at bottom download section.

Download MySQL - Step 2

c. Check file was downloaded

Download MySQL - Step 3

d. Install MySQL

Install MySQL - Step 1

Check License Agreement

Install MySQL - Step 2

Choose Setup type "Server only"

Install MySQL - Step 3

Just click "Next" to install

Install MySQL - Step 4

Configuration step

Install MySQL - Step 5

Choose Config Type "Development Machine". Leave port as default 3306 or You can change it.

Install MySQL - Step 6

You can skip this step. We can create database and user later.

Install MySQL - Step 7

Add password for "root" account

Install MySQL - Step 8

Allow start MySQL as service

Install MySQL - Step 9

Click "Next" to complete Installation

Install MySQL - Step 10

e. Check MySQL

Use Windows search type "MySQL"

Check MySQL - Step 1

Enter root's password

Check MySQL - Step 2

Check databases in MySQL

Check MySQL - Step 3

Use MySQL Client from CMD. Go to folder C:\Program Files\MySQL\MySQL Server 5.7\bin

Check MySQL - Step 4

And then type mysql -ujiveim -pjiveim123456 to login as username jiveim. And check databases which user jiveim has permission on.

Check MySQL - Step 5

f. Set PATH for MySQL Client Tool

In future, you should use MySQL Client Tool to process database. So, we will set MySQL path to System PATH.

Right click on Computer > Properties

System PATH - Step 1

Click Advanced System Settings at left panel

System PATH - Step 2

Click Advanced in box System Properties

System PATH - Step 3

Select group User variables or System variables. We will add/update on System variables

System PATH - Step 4

Copy full directory of MySQL C:\Program Files\MySQL\MySQL Server 5.7

MySQL Home - Step 1

Create new System variable MySQL is C:\Program Files\MySQL\MySQL Server 5.7

MySQL Home - Step 1

Declare new variable MySQL to Path. Click on variable Path to edit it. Append ;%MySQL%\bin at end of line and Save it.

MySQL Home - Step 1

You must restart Windows.

2. Create Database

Login to MySQL with root account and check databases in MySQL.

mysql -uroot -p123456

Create Database - Step 1

Run below commands to create database jiveim & user jiveim with password jiveim123456

Create Database - Step 2

  • mysql> CREATE DATABASE jiveim;
  • mysql> ALTER DATABASE jiveim CHARSET=utf8;
  • mysql> ALTER DATABASE jiveim DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Create username jiveim with password jiveim12345 and assign permission login to database jiveim.

  • mysql> GRANT ALL PRIVILEGES on jiveim.* to jiveim@localhost identified by "jiveim123456";
  • mysql> FLUSH PRIVILEGES;

Try login to MySQL as username jiveim was created above.

mysql -ujiveim -pjiveim12345

Show all databases show databases:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| jiveim             |
+--------------------+
9 rows in set (0.01 sec)

3. Import Schema/Data

  • Refer to I. Database on Ubuntu > 3. Import Schema/Data.

Run 2 commands

  • mysql> source C:\Users\IEUser\Downloads\jiveim-livechat\data\LiveChat.sql;
  • mysql> source C:\Users\IEUser\Downloads\jiveim-livechat\data\data.sql;

JAVA HOME - Step 3

Check created tables.

JAVA HOME - Step 3

Check imported data.

JAVA HOME - Step 3


VIII. JiveIM on Windows

1. Install JDK/JRE

a. We recommend you download the latest version at Java SE Development Kit 8 Downloads. If you are not a Developer. Just download JRE 1.8 file jre-8u65-windows-i586.exe

Download JDK - Step 1

b. Check file was downloaded

Download MySQL - Step 3

c. Install JRE/JDK

Click on jre-8u65-windows-i586.exe to install

Install Java - Step 1

Click Install>

Install Java - Step 2

Click Close

Install Java - Step 3

d. Check JRE/JDK

Open cmd from Windows search

Check Java - Step 1

Type java -version

Check Java - Step 2

e. Set PATH for JAVA_HOME

Copy full directory of JDK/JRE C:\Program Files\Java\jre1.8.0_65

JAVA HOME - Step 1

Create variable JAVA_HOME is C:\Program Files\Java\jre1.8.0_65

JAVA HOME - Step 2

Declare new variable JAVA_HOME to Path. Click on variable Path to edit it. Append ;%JAVA_HOME%\bin at end of line and Save it.

JAVA HOME - Step 3

2. Run JiveIM

2.1 Configuration

After extract file jiveim-livechat.zip

Command View

JAVA HOME - Step 3

Folder View

JAVA HOME - Step 3

Update file.dir and template.dir in file kin-common.properties

  • file.dir=C:\\Users\\IEUser\\Downloads\\jiveim-livechat\\data
  • template.dir=C:\\Users\\IEUser\\Downloads\\jiveim-livechat\\templates

JAVA HOME - Step 3

Update database information in file kin-persistence.properties

JAVA HOME - Step 3

Update JDK PATH in file start.bat

set JAVA_HOME=C:\Program Files\Java\jre1.8.0_65

2.2 Start/Stop

JAVA HOME - Step 3

Go to root folder JiveIM and run command start.sh.

cd JiveIM
./start.sh

JAVA HOME - Step 3

Stop App Ctrl + C + Y

JAVA HOME - Step 3