Changes

From SME Server
Jump to navigationJump to search
4,698 bytes added ,  14:24, 23 November 2016
no edit summary
Line 1: Line 1:  
'''[[Rocket_Chat#smeserver-rocketchat_contrib|Contrib]]''': [mailto:jcrisp@safeandsound.co.uk[[User:ReetP|John Crisp]]]
 
'''[[Rocket_Chat#smeserver-rocketchat_contrib|Contrib]]''': [mailto:jcrisp@safeandsound.co.uk[[User:ReetP|John Crisp]]]
{{Note box|Please note that there is also a howto on installing Rcoket.Chat manually [[Rocket_Chat|'''here''']]}}
+
{{Note box|Please note that there is also a howto on installing Rocket.Chat manually [[Rocket_Chat|'''here''']]}}
 
==smeserver-rocketchat contrib==
 
==smeserver-rocketchat contrib==
 
{{WIP box}}
 
{{WIP box}}
 
This contrib aims to reduce some of the setup for rocketchat and add some flexibility with settings
 
This contrib aims to reduce some of the setup for rocketchat and add some flexibility with settings
   −
{{Note box | This will ONLY work up to Rocket Chat version 0.39 as they changed the required node version after that. I am working on an update to the contrib}}
+
{{Note box | This will ONLY work up to Rocket Chat version 0.39 as they changed the required node version after that. I am working on an update to the contrib - see the end for notes}}
    
Add repos:
 
Add repos:
Line 184: Line 184:  
  db.rocketchat_settings.update({"_id" : "From_Email"}, {$set: {"value":"admin@reetspetit.info"}})
 
  db.rocketchat_settings.update({"_id" : "From_Email"}, {$set: {"value":"admin@reetspetit.info"}})
 
  db.rocketchat_settings.update({"_id" : "SMTP_Host"}, {$set: {"value":"mail.reetspetit.info"}})
 
  db.rocketchat_settings.update({"_id" : "SMTP_Host"}, {$set: {"value":"mail.reetspetit.info"}})
 +
 +
==Rocketchat 0.40+==
 +
 +
From Rocketchat 0.40 onwards you require a higher version of node than the one in the EPEL repos.
 +
 +
Add the following repos:
 +
 +
/sbin/e-smith/db yum_repositories set epel repository \
 +
Name 'Epel - EL6' \
 +
BaseURL 'http://download.fedoraproject.org/pub/epel/6/$basearch' \
 +
MirrorList 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch' \
 +
EnableGroups no \
 +
GPGCheck yes \
 +
GPGKey http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL \
 +
Exclude perl-Razor-Agent \
 +
Visible no \
 +
status disabled
 +
 +
/sbin/e-smith/db yum_repositories set reetp repository \
 +
BaseURL http://www.reetspetit.com/smeserver/\$releasever \
 +
EnableGroups no \
 +
GPGCheck no \
 +
Name "ReetP Repo" \
 +
GPGKey http://www.reetspetit.com/RPM-GPG-KEY \
 +
Visible yes status disabled
 +
 +
/sbin/e-smith/db yum_repositories set centos-sclo-rh \
 +
repository Name 'Centos-RH Software collections' \
 +
BaseURL 'http://mirror.centos.org/centos/$releasever/sclo/$basearch/rh/' \
 +
EnableGroups no Visible yes status disabled
 +
 +
/sbin/e-smith/db yum_repositories set nodejs \
 +
repository Name 'Node JS 4' \
 +
BaseURL https://rpm.nodesource.com/pub_4.x/el/6/x86_64 \
 +
EnableGroups no GPGCheck no Visible yes status disabled
 +
 +
signal-event yum-modify
 +
 +
yum --enablerepo=nodejs install nodejs nodejs-devel
 +
 +
yum --enablerepo=centos-sclo-rh,epel install scl-utils rh-python34-python rh-mongodb26-mongodb rh-mongodb26-mongodb-server \
 +
GraphicsMagick
 +
 +
You should be able to install the smeserver-rocketchat RPM now
 +
 +
yum --enablerepo=reetp install smeserver-rocketchat
 +
 +
config set rocketchat service TCPPort 3000 mailPort 25 mailURL localhost access public status enabled
 +
config set rh-mongodb26-mongod service TCPPort 27017 mongoURL localhost access private status enabled
 +
 +
signal-event post-upgrade;signal-event reboot
 +
 +
 +
RocketChat itself
 +
 +
Check /var/log/rocketchat.log
 +
 +
➔ System ➔ startup
 +
➔ +--------------------------------------------------+
 +
➔ |                  SERVER RUNNING                  |
 +
➔ +--------------------------------------------------+
 +
➔ |                                                  |
 +
➔ |      Version: 0.xx.x                            |
 +
➔ |  Process Port: 3000                              |
 +
➔ |      Site URL: http://rocketchat.local.net:3000  |
 +
➔ |        OpLog: Disabled                          |
 +
➔ |                                                  |
 +
➔ +--------------------------------------------------+
 +
 +
If you have issues make sure you stop the rocket chat service
 +
 +
service rocketchat stop
 +
 +
Check your node versions:
 +
 +
[root@test Rocket.Chat]# node -v
 +
v4.5.0
 +
[root@test Rocket.Chat]# npm -v
 +
3.10.8
 +
 +
Modify with
 +
 +
n 0.4.6
 +
 +
Try running main.js
 +
/opt/Rocket.Chat
 +
node main.js
 +
 +
 +
 +
===========================================================
 +
Manual config:
 +
expand-template /etc/rc.d/init.d/rocketchat
 +
expand-template /etc/profile.d/scls-rh-mongodb26.sh
 +
expand-template /etc/profile.d/scls-rh-python34.sh
 +
expand-template /etc/profile.d/scls-rh-java-common.sh
 +
expand-template /etc/opt/rh/rh-mongodb26/mongod.conf
 +
 +
/etc/rc.d/init.d/rocketchat start
 +
/etc/rc.d/init.d/rh-mongodb26-mongos start
 +
===========================================================
 +
 +
 +
Proxy Pass - the contrib will sort out the templates. You just need some settings as follows:
 +
 +
[root@test e-smith]# db domains show
 +
chat.reetspetit.info=domain
 +
    Description=RocketChat
 +
    Nameservers=internet
 +
    ProxyPassTarget=http://127.0.0.1:3000/
 +
    TemplatePath=ProxyPassVirtualRocketchat
 +
    letsencryptSSLcert=enabled
 +
 +
 +
SSL
 +
Note:
 +
This is still experimental and there may be issues with SSL only for the Primary iBay and Letsencrypt. You will need a minimum version of smeserver-rocketchat-0.1-5
 +
 +
 +
It is recommended to add Letsencrypt support as detailed below.
 +
We need some extra settings to enable SSL with ProxyPass.
 +
 +
First install proxy pass rpm:
 +
yum --enablerepo=fws install mod_proxy_wstunnel
 +
 +
Regenerate httpd.conf
 +
signal-event remoteaccess-update
 +
 +
Now we need to setup our subdomain
 +
 +
db domains set chat.mycompany.local domain Description RocketChat Nameservers internet \
 +
TemplatePath ProxyPassVirtualRocketchat ProxyPassTarget http://localhost:3000/
 +
 +
It should look like this:
 +
chat.mycompany.local=domain
 +
  Nameservers=internet
 +
  ProxyPassTarget=http://127.0.0.1:3000/
 +
  TemplatePath=ProxyPassVirtualRocketchat
 +
 +
We need to set Rocket.Chat to listen on localhost now:
 +
 +
config setprop rocketchat rootURL localhost
 +
signal-event remoteaccess-update
 +
service rocketchat restart
 +
 +
If you can now successfully get to Rocketchat on your subdomain https://chat.mycompany.local you can disable default access on port 3000:
 +
 +
config setprop rocketchat access private
 +
signal-event remoteaccess-update

Navigation menu