Skip to content

Instantly share code, notes, and snippets.

@clasense4
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clasense4/c4c5e67ed6ce974fe694 to your computer and use it in GitHub Desktop.
Save clasense4/c4c5e67ed6ce974fe694 to your computer and use it in GitHub Desktop.
Install Candy (Realtime Chat)

#Tutorial Install Candy

##1. Java

Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

(12-05-2014)

Choose the latest linux 64 bit rpm then download using wget

    cd /opt/
    wget http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.rpm?AuthParam=1399900329_80d12b89487af785862cd62f9dfd0a3c
    # `AuthParam` can be expired
    mv jdk-8u5-linux-x64.rpm?AuthParam=1399900329_80d12b89487af785862cd62f9dfd0a3c jdk-8u5-linux-x64.rpm
    rpm -Uvh jdk-8u5-linux-x64.rpm


    alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
    alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
    alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 200000
    alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 200000

    java -version
    java version "1.8.0_05"
    Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

    javac -version
    javac 1.8.0_05

    vim ~/.bash_profile
    # add this line
    export JAVA_HOME="/usr/java/latest"

##2. Openfire

###Download http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/install-guide.html

mkdir /home/candy && cd /home/candy
wget http://download.igniterealtime.org/openfire/openfire-3.9.3-1.i386.rpm
rpm -ivh openfire-3.9.3-1.i386.rpm
service openfire start

if openfire won't running, try to install yum install libldb.i686 and check /opt/openfire/logs

###Database http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/database.html#mysql

mysql -u root -p
> create database candy
> exit
cd /opt/openfire/resources/database
cat openfire_mysql.sql | mysql -u root -p candy
cd /opt/openfire/conf/

###Setup Web Server Open http://118.98.166.66:9090/

Just follow the setting

Encryption Key : dapodikdas 123!
root / dapodikdas 123!
fajri@nufaza.co.id / nufaza123

###Setup User XMPP Login to http://118.98.166.66:9090/

admin / nufaza123

Set http-bind

  1. Login to http://118.98.166.66:9090/
  2. Server => Server Settings => HTTP Binding
  3. Enable http-bind make sure the port is 7070 and 7443
  4. Enable Script Syntax
  5. Enable Provides support for CORS (Cross-Origin Resource Sharing)

Create Room

  1. Group Chat => Room Administration => Create new room
  2. Just input the setting.

Enable Plugin

Plugins => Available Plugins

Plugin Description
Broadcast Broadcasts messages to users.
Client Control Controls clients allowed to connect and available features
Content Filter Scans message packets for defined patterns
Load Statistic Logs load statistics to a file
MUC Service MUC administration over REST Interface
Monitoring Service Monitors conversations and statistics of the server.
MotD (Message of the Day) Allows admins to have a message sent to users each time they log in.
Presence Service Exposes presence information through HTTP.
Registration Performs various actions whenever a new user account is created.
User Creation Creates users and populates rosters.
User Import Export Enables import and export of user data
User Service Allows administration of users via HTTP requests.

Follow this guide https://github.com/candy-chat/candy/wiki/Installing-a-XMPP-server

##3. Candy

git clone https://github.com/candy-chat/candy.git
cd candy/
cp example/index.html .

change the setting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment