Changes

Jump to navigation Jump to search
3,541 bytes removed ,  16:35, 27 July 2023
no edit summary
Line 3: Line 3:  
[[File:Rocket-dot-chat-logo.png|200px]]
 
[[File:Rocket-dot-chat-logo.png|200px]]
 
</blockquote>
 
</blockquote>
 +
{{Warning box| Due to the changes in Rockets requirements noted below please see the [[Rocket_Chat:Contrib|Rocket Chat Contrib]] This will run Rocket in a docker container}}
 +
{{Warning box| Most of the following is obsolete but here for posterity and reference}}
   −
===Maintainers===
+
===Maintainer===
'''Manual install''' [mailto:RequestedDeletion@gmail.com[[User:RequestedDeletion|RequestedDeletion]]]
+
'''Maintainer:''' [mailto:RequestedDeletion@gmail.com[[User:RequestedDeletion|RequestedDeletion]]]
 
  −
'''Contrib''': [mailto:jcrisp@safeandsound.co.uk[[User:reetp|John Crisp]]]
      
==About==
 
==About==
Line 26: Line 26:  
In short, a [https://slack.com/ Slack], [https://www.hipchat.com/ HipChat], Jabber (XMMP), IRC or even a [https://skype.com Skype] alternative, completely and '''securely self hosted and controlled'''. Great for closed (company/family/friends/community) teams.
 
In short, a [https://slack.com/ Slack], [https://www.hipchat.com/ HipChat], Jabber (XMMP), IRC or even a [https://skype.com Skype] alternative, completely and '''securely self hosted and controlled'''. Great for closed (company/family/friends/community) teams.
   −
{{Note box|Rocket.Chat is a young project and therefore under very active development. Very regularly they release new (minor) versions. Your milage may vary! Please see their [https://github.com/RocketChat/Rocket.Chat development] on [https://github.com/RocketChat/Rocket.Chat GitHub] for the activities and Rocket.Chat developments.}}
+
{{Note box|Rocket.Chat is a young project and therefore under very active development. Very regularly they release new (minor) versions. Your mileage may vary! Please see their [https://github.com/RocketChat/Rocket.Chat development] on [https://github.com/RocketChat/Rocket.Chat GitHub] for the activities and Rocket.Chat developments.}}
   −
This how-to can be discussed on the forums [https://forums.contribs.org/index.php/topic,52405.0.html '''here''']
+
==Obsolete Notes==
   −
RocketChat for '''SME Server 9.x 64-bit only!'''<br>
  −
Latest Rocket.Chat version tested: '''0.36.0''' (please see the change log [https://github.com/RocketChat/Rocket.Chat/releases here]).
     −
==Installation SCL environment==
+
This how-to can be discussed on the forums [https://forums.contribs.org/index.php/topic,52405.0.html '''here''']
===Add the epel repository===
+
Latest Rocket.Chat version tested: '''0.39''' (please see the change log [https://github.com/RocketChat/Rocket.Chat/releases here]).
/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
     −
===Add scl and centos-sclo-rh repositories===
+
==Requirements==
/sbin/e-smith/db yum_repositories set scl \
+
{{Warning box|Please be aware that for now only Rocket.Chat up to version '''0.39''' can be installed due to dependencies on the Nodejs version available via software collections.}}
repository Name 'Software collections' \
+
Rocket.Chat requires several higher versions of applications and frameworks than provided by Koozali SME Server by default. Therefore we need to install some '''[[Software Collections]]''' Packages and enable some addition repo's.
BaseURL 'http://mirror.centos.org/centos/$releasever/SCL/$basearch/' \
  −
EnableGroups no Visible yes status disabled
     −
/sbin/e-smith/db yum_repositories set centos-sclo-rh \
+
# You must have '''SME Server 9.x 64-bit'''
repository Name 'Centos-RH Software collections' \
+
# You must install the '''[[epel]]''' repository
BaseURL 'http://mirror.centos.org/centos/$releasever/sclo/$basearch/rh/' \
+
# You must install the '''[[centos-sclo-rh]]''' repository
EnableGroups no Visible yes status disabled
+
# You must install the '''[[Software Collections]]''' tool
Expand new repo’s
  −
signal-event yum-modify
     −
===Install Software Collections applications===
+
After having installed the above repo's and installing Software Collections, you can install the required collections by:
Before you can install any of the Software Collections applications, you must install the Software Collections tools first. Please see '''[[Software Collections]]''' how to install and enable '''[[Software Collections]]'''.
+
yum install rh-python34-python rh-mongodb32-mongodb rh-mongodb32-mongodb-server nodejs010 GraphicsMagick --enablerepo=centos-sclo-rh,epel
   −
  yum install rh-python34-python rh-mongodb26-mongodb rh-mongodb26-mongodb-server \
+
After installing the Software Collections we need to update some packages using NodeJS package manager NPM:
  nodejs010 GraphicsMagick --enablerepo=centos-sclo-rh,epel
+
  scl enable nodejs010 'npm install -g npm ws inherits n forever forever-service'
 +
  scl enable nodejs010 'n 0.10.40'
   −
using NodeJS package manager NPM to install/update (additional) NodeJS packages:
+
== Installation of Rocket.Chat==
scl enable nodejs010 bash
+
First we need to create the SME Server services:
npm install -g inherits
  −
npm install -g n
  −
n 0.10.40
  −
exit
     −
===Create the SME Server MongoDB service===
+
For Rocket.Chat:
(please note the usage of mongod and NOT mongodb)
+
  ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S99rocketchat
  ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S99rh-mongodb26-mongod
+
  config set rocketchat service status enabled TCPPort 3000 access public
  config set rh-mongodb26-mongod service
  −
config setprop rh-mongodb26-mongod status enabled
  −
config setprop rh-mongodb26-mongod access private
  −
config setprop rh-mongodb26-mongod TCPPort 27017
  −
signal-event remoteaccess-update
  −
 
  −
===Create boot scripts for the Software Collections applications===
  −
nano -w /etc/profile.d/scls-rh-mongodb26.sh
  −
#!/bin/sh
  −
source /opt/rh/rh-mongodb26/enable
  −
export X_SCLS="`scl enable rh-mongodb26 'echo $X_SCLS'`"
  −
 
  −
nano -w /etc/profile.d/scls-rh-python34.sh
  −
#!/bin/sh
  −
source /opt/rh/rh-python34/enable
  −
export X_SCLS="`scl enable rh-python34 'echo $X_SCLS'`"
  −
 
  −
nano -w /etc/profile.d/scls-rh-java-common.sh
  −
#!/bin/sh
  −
source /opt/rh/rh-java-common/enable
  −
export X_SCLS="`scl enable rh-java-common 'echo $X_SCLS'`"
  −
 
  −
nano -w /etc/profile.d/scls-nodejs010.sh
  −
#!/bin/sh
  −
source /opt/rh/nodejs010/enable
  −
export X_SCLS="`scl enable nodejs010 'echo $X_SCLS'`"
     −
A reboot at this point is required to load all of the Software Collections profile/config files.
+
For MongoDB (please note the usage of mongod and NOT mongod'''b'''):
  signal-event reboot
+
ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S99rh-mongodb32-mongod
 +
  config set rh-mongodb32-mongod service status enabled access private TCPPort 27017
   −
== Installation of Rocket.Chat==
+
And to update the ports:
===Create the SME Server Rocket.Chat service===
  −
config set rocketchat service
  −
config setprop rocketchat status enabled
  −
config setprop rocketchat TCPPort 3000
  −
config setprop rocketchat access public
   
  signal-event remoteaccess-update
 
  signal-event remoteaccess-update
   −
===Get Rocket.Chat from their [https://rocket.chat/releases/ downloads] repository===
+
Now we can download and install the latest Rocket.Chat version from their [https://rocket.chat/releases/ downloads] repository:
 
  cd /root
 
  cd /root
  curl -L https://rocket.chat/releases/latest/download -o rocket.chat.tgz
+
  curl -L https://rocket.chat/releases/0.39.0/download -o rocket.chat.tgz
 
  tar zxvf rocket.chat.tgz
 
  tar zxvf rocket.chat.tgz
 
  mv bundle /opt/Rocket.Chat
 
  mv bundle /opt/Rocket.Chat
   −
===Install NodeJS dependencies for Rocket.Chat===
+
Once Rocket.Chat has been downloaded and unpacked, we need to 'register' Rocket.Chat with NodeJS with NPM:
 
  cd /opt/Rocket.Chat/programs/server
 
  cd /opt/Rocket.Chat/programs/server
  npm install
+
  scl enable nodejs010 'npm install'
 +
 
 +
Rocket.Chat has now been installed and you can test-drive you installation.
   −
===Set environment variables for Rocket.Chat===
+
First we need to set some environment variables manually (Please use your own correct settings):
 
  export ROOT_URL=http://yourserver.com/
 
  export ROOT_URL=http://yourserver.com/
 
  export MONGO_URL=mongodb://localhost:27017/rocketchat
 
  export MONGO_URL=mongodb://localhost:27017/rocketchat
 
  export PORT=3000
 
  export PORT=3000
 +
export MAIL_URL=smtp://localhost:25
   −
===Start Rocket.Chat for the first time===
+
and then we can start Rocket.Chat manually (with CTL-C you can quit Rocket.Chat):
 
  cd /opt/Rocket.Chat
 
  cd /opt/Rocket.Chat
  node main.js &
+
  node main.js
    
Browse to http://yourserver:3000 and create the first admin user.
 
Browse to http://yourserver:3000 and create the first admin user.
  −
The Rocket.Chat log files are at /var/log/rocketchat.log
  −
      
{{Note box|This FIRST user will be the 'master administrator' even if you use [[Rocket_Chat#LDAP_Authentication|'''LDAP authentication''']] for your users. So if even if you use LDAP, this user will still be able to login and grant Rocket.Chat admin rights to [[Rocket_Chat#LDAP_Authentication|LDAP]] accounts.}}
 
{{Note box|This FIRST user will be the 'master administrator' even if you use [[Rocket_Chat#LDAP_Authentication|'''LDAP authentication''']] for your users. So if even if you use LDAP, this user will still be able to login and grant Rocket.Chat admin rights to [[Rocket_Chat#LDAP_Authentication|LDAP]] accounts.}}
  −
==Make Rocket.Chat available on a sub domain==
  −
Install the '''[[Webapps-common]]''' contrib.
  −
  −
To create your sub domain (e.g. https://chat.yourserver.com)
  −
db domains set chat.mycompany.local domain Description "RocketChat" Nameservers internet \
  −
TemplatePath WebAppVirtualHost RequireSSL enabled ProxyPassTarget http://localhost:3000/
  −
The 'ProxyPassTarget' property could also point to another host (IP) that has Rocket.Chat installed, e.g. a virtual SME Server on the same LAN. In that case, also LDAP and open/close ports have to be taken into consideration.
  −
To expand and activate:
  −
signal-event webapps-update
  −
  −
To disable the default access on port 3000, for we now access our chat platform via the subdomain, and for security we close the default access method.
  −
config setprop rocketchat access private
  −
signal-event remoteaccess-update
  −
  −
You can now visit Rocket.Chat at https://chat.yourserver.com. Rocket.Chat will notice that the URL that is being used to access Rocket.Chat has been changed, and will propose to change it to the new URL.
      
==Auto start Rocket.Chat at boot==
 
==Auto start Rocket.Chat at boot==
To be able to auto start Rocket.Chat one could use the /etc/rc.d/rc.local file, but using the init system is cleaner and much more controlled. Nodejs has small utilities (modules) that can create the correct init script based on your specific Rocket.Chat setup.
+
Since SME Server has put it's name in /etc/system-release, the (NodeJS) forever utility will not be able to detect the main distribution name (e.g. CentOS) and will exit with an error. To add 'SME Server' to the list of recognised distributions so that the forever-service tool will run properly, is to execute the following command (don't be disturbed by the Oracle mentioning, it's just to locate the correct position):
 
  −
To install these Nodejs modules issue:
  −
npm install -g forever
  −
npm install -g forever-service
  −
Since SME Server has put it's name in /etc/system-release, the forever utility will not be able to detect the main distribution name (e.g. CentOS) and will exit with an error. To add 'SME Server' to the list of recognised distributions so that the forever-service tool will run properly, is to execute the following command (don't be disturbed by the Oracle mentioning, it's just to locate the correct position):
   
  sed -i -e 's/(Oracle Linux)/(Oracle Linux)|(SME Server)/' \
 
  sed -i -e 's/(Oracle Linux)/(Oracle Linux)|(SME Server)/' \
 
  /opt/rh/nodejs010/root/usr/lib/node_modules/forever-service/templates/sysvinit/installer.js
 
  /opt/rh/nodejs010/root/usr/lib/node_modules/forever-service/templates/sysvinit/installer.js
   −
====Generate the Rocket.Chat init script====
   
Generate the init script 'rocketchat' that will automatically be placed into /etc/rc.d/init.d:
 
Generate the init script 'rocketchat' that will automatically be placed into /etc/rc.d/init.d:
 
  cd /opt/Rocket.Chat
 
  cd /opt/Rocket.Chat
Line 173: Line 102:  
Please use the correct values in the command above from your specific setup.
 
Please use the correct values in the command above from your specific setup.
   −
The created init script '/etc/rc.d/init.d/rocketchat' is not aware that we use [[Software Collections]], so we have to add a directive to the init script that we do:
+
The created init script '/etc/rc.d/init.d/rocketchat' is not aware that we use [[Software Collections]], so we have to add directives to the init script that we do:
  sed -i '26 a source /etc/profile.d/scls-nodejs010.sh' /etc/rc.d/init.d/rocketchat
+
  sed -i '26 a source /opt/rh/nodejs010/enable' /etc/rc.d/init.d/rocketchat
 +
sed -i '27 a source /opt/rh/rh-mongodb26/enable' /etc/rc.d/init.d/rocketchat
 +
sed -i '28 a source /opt/rh/rh-python34/enable' /etc/rc.d/init.d/rocketchat
 +
sed -i '29 a source /opt/rh/rh-java-common/enable' /etc/rc.d/init.d/rocketchat
 +
 
 +
 
 
{{Note box|Please note that if you change anything on your Rocket.Chat environment such as URL's, subdomain name(s), ports or mail server, you have to run the above again to reflect your new environment. If so, please remove /etc/rc.d/init.d/rocketchat first. (rm /etc/rc.d/init.d/rocketchat).}}
 
{{Note box|Please note that if you change anything on your Rocket.Chat environment such as URL's, subdomain name(s), ports or mail server, you have to run the above again to reflect your new environment. If so, please remove /etc/rc.d/init.d/rocketchat first. (rm /etc/rc.d/init.d/rocketchat).}}
   −
====Create SME Server service link====
+
Rocket.Chat will now start at boot time or manually:
Now we can create a link to the SME Server way of starting services automatically at boot time or manually:
+
service rocketchat start|stop|status|restart
  ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S99rocketchat
+
 
 +
 
 +
Please note that it may take a little while, up to a minute, for Rocket.Chat to become available. In the mean time you can be shown a HTTP error 503. Please try again in a minute or a bit longer. Why this is? No Idea for now, other that it may be related to MongoDB processes.
 +
 
 +
==Make Rocket.Chat available on a sub domain==
 +
Install the '''[[Webapps-common]]''' contrib.
 +
 
 +
To create your sub domain (e.g. https://chat.yourserver.com)
 +
db domains set chat.yourserver.local domain Description "RocketChat" Nameservers internet \
 +
  TemplatePath WebAppVirtualHost RequireSSL enabled ProxyPassTarget http://localhost:3000/ ProxyPreserveHost yes
 +
The 'ProxyPassTarget' property could also point to another host (IP) that has Rocket.Chat installed, e.g. a virtual SME Server on the same LAN. In that case, also LDAP and open/close ports have to be taken into consideration.
 +
To expand and activate:
 +
signal-event webapps-update
 +
 
 +
If your servers' default FQDN is already chat.yourserver.com, there is no need to create a new subdomain. Instead of the above command, you can enter the following:
 +
db domains setprop chat.yourserver.com TemplatePath WebAppVirtualHost RequireSSL enabled ProxyPassTarget http://localhost:3000/ ProxyPreserveHost yes
   −
and you can start/stop/status your rocketchat service e.g.:
+
To disable the default access on port 3000, for we now access our chat platform via the subdomain, and for security we change the default access method from public to private.
  service rocketchat status
+
  config setprop rocketchat access private
  service rocketchat start
+
  signal-event remoteaccess-update
service rocketchat stop
  −
service rocketchat restart
     −
Please note that it may take a little while, up to a minute, for rocketchat to become available. In the mean time you can be shown a HTTP error 503. Please try again in a minute or a bit longer. Why this is? No Idea for now, other that it may be related to MongoDB processes.
+
You can now visit Rocket.Chat at https://chat.yourserver.com. Rocket.Chat will notice that the URL that is being used to access Rocket.Chat has been changed, and will propose to change it to the new URL.
    
==WebRTC configuration==
 
==WebRTC configuration==
{{Note box|Please note that WebRTC connections '''require''' secure connections (http'''s'''). Normal http connections will be refused. Please see the '''[[letsencrypt]]''' wiki page for more info on how to obtain a valid certificate for your server(s) and domains.}}
+
{{Note box|Please note that WebRTC connections on the chromium engines based browsers '''require''' secure connections (http'''s'''). Normal http connections will be refused. Please see the '''[[letsencrypt]]''' wiki page for more info on how to obtain a valid certificate for your Koozali SME Server(s) and domains. Please see [https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins '''this'''] article on why. How other browsers such as Firefox and IE manage this is not known, if you do, please add a note.}}
 
Rocket.Chat uses WebRTC to make voice/video calls. This requires the additional Apache module proxy_wstunnel. This is available from the '''[[fws]]''' repository.
 
Rocket.Chat uses WebRTC to make voice/video calls. This requires the additional Apache module proxy_wstunnel. This is available from the '''[[fws]]''' repository.
 
  yum install mod_proxy_wstunnel --enablerepo=fws
 
  yum install mod_proxy_wstunnel --enablerepo=fws
Line 208: Line 155:     
To show if the module is correctly loaded:
 
To show if the module is correctly loaded:
  apachectl -M
+
  apachectl -M |grep wstunnel
 
it should be listed as '''proxy_wstunnel_module (shared)'''
 
it should be listed as '''proxy_wstunnel_module (shared)'''
 +
 +
To be able to redirect websocket requets to the Rocket.Chat engine, the following must be present in httpd.conf under the virtualhost sub-domain:
 +
ProxyPass /.well-known/acme-challenge/ !
 +
ProxyPreserveHost On
 +
ProxyPassMatch ^/sockjs/(.*)/websocket ws://localhost:3000/sockjs/$1/websocket
 +
ProxyPass / http://localhost:3000/
 +
ProxyPassReverse / http://localhost:3000/
    
==LDAP Authentication==
 
==LDAP Authentication==
Line 222: Line 176:  
  Sync data: True
 
  Sync data: True
 
  Default domain: chat.yourserver.com (as per the subdomain)
 
  Default domain: chat.yourserver.com (as per the subdomain)
Save the settings and use the test button to test the connection to the LDAP directory. Then 'Sync users'. For more specific details on Rocket.Chat and LDAP user authentication please see [https://rocket.chat/docs/master/admin-guides/ldap/ '''their documentation'''].
+
Save the settings and use the test button to test the connection to the LDAP directory. Then 'Sync users'. For more specific details on Rocket.Chat and LDAP user authentication please see [https://rocket.chat/docs/administrator-guides/authentication/ldap '''their documentation'''].
   −
==Upgrade Rocket.Chat==
+
==Maintenance==
 +
====Upgrade Rocket.Chat====
 
Interestingly there is not much information on upgrading your Rocket.Chat version. It does not help either that the Rocket.Chat team closed their wiki and took it off-line in favour of a new doc system which is not populated with info as much.
 
Interestingly there is not much information on upgrading your Rocket.Chat version. It does not help either that the Rocket.Chat team closed their wiki and took it off-line in favour of a new doc system which is not populated with info as much.
   Line 230: Line 185:  
  service rocketchat stop
 
  service rocketchat stop
 
  rm -rf /opt/Rocket.Chat
 
  rm -rf /opt/Rocket.Chat
and then repeat the download, unpack and move [[Rocket_Chat#Get_Rocket.Chat_from_downloads|'''get Rocket.Chat procedure above''']]. Then start Rocket.Chat:
+
and then repeat the download, unpack and move as descibed above. Then start Rocket.Chat:
 
  service rocketchat start
 
  service rocketchat start
 
Please note it can take a bit for the Rocket.Chat service to become available for the MongoDB structure version is being checked and automatically updated according to the Rocket.Chat version.
 
Please note it can take a bit for the Rocket.Chat service to become available for the MongoDB structure version is being checked and automatically updated according to the Rocket.Chat version.
   −
==Backup Rocket.Chat==
+
====Backup Rocket.Chat====
 
{{Note box|Please note that this section is experimental. Somebody with more extensive knowledge of MongoDB may help here. This section is not finished yet, so please do NOT use on production servers, just test VM's. The default storage location of MongoDB is '/var/opt/rh/rh-mongodb26/lib/mongodb' (as set in '/etc/opt/rh/rh-mongodb26/mongod.conf'.) We might want to change this to /home/e-smith/files/mongodb' or '/var/lib/mongodb' and run a script to be included in the pre-backup event, just like MySQL, to hold transactions and make a backup.}}
 
{{Note box|Please note that this section is experimental. Somebody with more extensive knowledge of MongoDB may help here. This section is not finished yet, so please do NOT use on production servers, just test VM's. The default storage location of MongoDB is '/var/opt/rh/rh-mongodb26/lib/mongodb' (as set in '/etc/opt/rh/rh-mongodb26/mongod.conf'.) We might want to change this to /home/e-smith/files/mongodb' or '/var/lib/mongodb' and run a script to be included in the pre-backup event, just like MySQL, to hold transactions and make a backup.}}
   Line 247: Line 202:  
You may want to automate the execution of the above mongodump command by means of a cron job. For easy management of this, you could use the excellent [[Crontab_Manager|'''Crontab Manager''']] contrib.
 
You may want to automate the execution of the above mongodump command by means of a cron job. For easy management of this, you could use the excellent [[Crontab_Manager|'''Crontab Manager''']] contrib.
   −
==Remove Rocket.Chat==
+
====Remove Rocket.Chat====
 
TBA
 
TBA
   −
==Desktop clients==
+
==Rocket.Chat clients==
Next to your browser, you can use Rocket.Chat desktop clients for Linux, Windows and Mac.
+
Next to your browser, you can use Rocket.Chat desktop clients for Linux, Windows and Mac. Please see https://github.com/RocketChat/Rocket.Chat.Electron/releases
   −
Please see:
  −
https://github.com/RocketChat/Rocket.Chat.Electron/releases
  −
  −
==Mobile clients==
   
Obviously there are mobile clients for both Android and iOS. Please search for 'Rocket chat' in either app store.
 
Obviously there are mobile clients for both Android and iOS. Please search for 'Rocket chat' in either app store.
  −
==Security==
  −
* https://imagetragick.com/
      
==TO DO==
 
==TO DO==
* <s>Auto start Rocket.Chat</s>
   
* Backup and how to manage Rocket.Chat data (e.g. mongodb and FS options)
 
* Backup and how to manage Rocket.Chat data (e.g. mongodb and FS options)
 
* Include the push server config for both Android and iOS
 
* Include the push server config for both Android and iOS
* <s>Fine tune various things (e.g. Security)</s>
  −
* <s>Enable LDAP authentication</s>
  −
* <s>Create subdomain e.g. https://chat.yourdomain.com using the webapps-common contrib</s>
  −
* <s>Activiation/Notification emails are not sent, despite test success</s>
  −
* <s>Upgrade Rocket.Chat</s>
   
* Remove Rocket.Chat
 
* Remove Rocket.Chat
<br>
   
* Watch developments such as using PostgreSQL/MariaDB opposed to MongoDB
 
* Watch developments such as using PostgreSQL/MariaDB opposed to MongoDB
 
* Test, test, test
 
* Test, test, test
* Create a contrib
   
* Showcase SME Server, contribs and software collections.
 
* Showcase SME Server, contribs and software collections.
   Line 284: Line 224:  
[[Category:Howto]]
 
[[Category:Howto]]
 
[[Category: Webapps]]
 
[[Category: Webapps]]
  −
  −
==smeserver-rocketchat contrib==
  −
  −
This contrib aims to reduce some of the setup for rocketchat and add some flexibility with settings
  −
  −
Add repos:
  −
  −
* [[epel]]
  −
* centos-sclo-rh
  −
* [[User:ReetP|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