#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
###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!
[email protected] / nufaza123
###Setup User XMPP Login to http://118.98.166.66:9090/
admin / nufaza123
- Login to
http://118.98.166.66:9090/
- Server => Server Settings => HTTP Binding
- Enable
http-bind
make sure the port is7070
and7443
- Enable
Script Syntax
- Enable
Provides support for CORS (Cross-Origin Resource Sharing)
- Group Chat => Room Administration => Create new room
- Just input the setting.
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