Changes

From SME Server
Jump to navigationJump to search
2,830 bytes added ,  17:30, 15 August 2016
Line 264: Line 264:  
[[Category:Howto]]
 
[[Category:Howto]]
 
[[Category: Webapps]]
 
[[Category: Webapps]]
 +
 +
 +
==smeserver-rocketchat==
 +
 +
This contrib aims to reduce some of the setup for rocketchat and add some flexibility with settings
 +
 +
Add repos:
 +
 +
* epel
 +
* scl
 +
* centos-sclo-sh
 +
* reetp (https://wiki.contribs.org/User:ReetP)
 +
 +
yum install rh-python34-python rh-mongodb26-mongodb rh-mongodb26-mongodb-server \
 +
nodejs010 GraphicsMagick --enablerepo=centos-sclo-rh,epel
 +
 +
scl enable nodejs010 bash
 +
npm install -g inherits
 +
npm install -g n
 +
n 0.10.40
 +
exit
 +
 +
cd /root
 +
curl -L https://rocket.chat/releases/latest/download -o rocket.chat.tgz
 +
tar zxvf rocket.chat.tgz
 +
mv bundle /opt/Rocket.Chat
 +
 +
cd /opt/Rocket.Chat/programs/server
 +
npm install
 +
npm install -g forever
 +
 +
patch mailcomposer.js to add From header. You can use this from wherever the patch file is (where should it be ?):
 +
patch -p0 -i mailcomposer.patch
 +
 +
Install rocket chat contrib:
 +
 +
yum enablerepo=reetp install smeserver-rocketchat
 +
 +
db setprop rocketchat status enabled
 +
 +
signal-event post-upgrade;signal-event reboot
 +
 +
DB settings
 +
 +
rocketchat=service
 +
    TCPPort=3000
 +
    access=public
 +
    mailPort=25
 +
    mailURL=localhost
 +
    status=enabled
 +
 +
rh-mongodb26-mongod=service
 +
    TCPPort=27017
 +
    access=private
 +
    mongoURL=localhost
 +
    status=enabled
 +
 +
BEFORE we login for the first time we need to set up mail settings correctly:
 +
 +
From bash:
 +
 +
mongo rocketchat --eval 'db.rocketchat_settings.update({"_id" : "SMTP_Host"}, {$set: {"value":"localhost"}});'
 +
mongo rocketchat --eval 'db.rocketchat_settings.update({"_id" : "From_Email"}, {$set: {"value":"admin@yourdomain.com"}});'
 +
 +
We can check the individual values set like this:
 +
 +
mongo rocketchat --eval 'db.rocketchat_settings.find({"_id":"From_Email"}, {_id:0, value:1}).shellPrint();'
 +
mongo rocketchat --eval 'db.rocketchat_settings.find({"_id":"SMTP_Host"}, {_id:0, value: 1}).shellPrint();'
 +
 +
All values per _id:
 +
mongo rocketchat --eval 'db.rocketchat_settings.find({"_id" : "SMTP_Host"}).shellPrint();'
 +
mongo rocketchat --eval 'db.rocketchat_settings.find({"_id" : "From_Email"}).shellPrint();'
 +
 +
 +
Now restart rocketchat to reread the DB settings:
 +
 +
service rocketchat restart
 +
 +
Login at http://yourdomain:3000
 +
 +
It will first get you to create an admin user.
 +
 +
If you have an issue with no email sent/received then login using the email address and password you just set
 +
 +
 +
 +
Look for bugs :-)
 +
 +
SSL - to do
 +
 +
 +
Example using mongo itself:
 +
 +
mongo
 +
 +
use rocketchat
 +
 +
db.rocketchat_settings.find({"_id" : "SMTP_Host"})
 +
db.rocketchat_settings.find({"_id" : "From_Email"})
 +
 +
db.rocketchat_settings.findOne({_id : "From_Email"}, {_id:0, value: 1})
 +
db.rocketchat_settings.findOne({_id : "SMTP_Host"}, {_id:0, value: 1})
 +
 +
 +
db.rocketchat_settings.update({"_id" : "From_Email"}, {$set: {"value":"admin@reetspetit.info"}})
 +
db.rocketchat_settings.update({"_id" : "SMTP_Host"}, {$set: {"value":"mail.reetspetit.info"}})

Navigation menu