Changes

From SME Server
Jump to navigationJump to search
202 bytes added ,  16:35, 14 November 2021
Line 466: Line 466:     
Make sure you add replicaset support in Mongo
 
Make sure you add replicaset support in Mongo
https://docs.rocket.chat/installation/manual-installation/centos
      
I'll add more later, and try and make a full contrib in due course
 
I'll add more later, and try and make a full contrib in due course
   −
===CentOS 7 notes===
+
===Apache===
   −
Setup storage engine and replication for MongoDB (mandatory for versions > 1), and enable and start MongoDB and Rocket.Chat:
+
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/RocketVirtualHost
   −
They still recommend mmapv1 but it is probably better to stick with the default WiredTiger. Here's how to change if required:
+
nano /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/RocketVirtualHost/50Content
   −
sed -i "s/^#  engine:/  engine: mmapv1/"  /etc/mongod.conf
+
Paste this:
   −
You MUST initialise a replicaset so we must add this to the conf file:
+
    ProxyPreserveHost on
 +
    SetEnv proxy-nokeepalive 1
 +
    ProxyPass /.well-known/acme-challenge/ !
 +
 +
    DocumentRoot /home/e-smith/files/ibays/Primary/html
 +
 +
    <IfModule mod_proxy_wstunnel.c>
 +
      ProxyPassMatch ^/sockjs/(.*)/websocket ws://localhost:3000/sockjs/$1/websocket
 +
      ProxyPass /websocket ws://localhost:3000/websocket
 +
    </IfModule>
 +
 +
    ProxyPass / http://localhost:3000/
 +
    ProxyPassReverse / http://localhost:3000/
 +
 +
    <Location />
 +
        Order deny,allow
 +
        Deny from all
 +
        Allow from all
 +
    </Location>
 +
 +
    <Location /.well-known/acme-challenge/>
 +
        Allow from all
 +
    </Location>
   −
sed -i "s/^#replication:/replication:\n  replSetName: rs01/" /etc/mongod.conf
+
Save, and then run
   −
Start Mongo
+
  signal-event webapps-update
 
  −
  systemctl enable mongod && sudo systemctl start mongod
  −
 
  −
Initiate the set:
  −
 
  −
mongo --eval "printjson(rs.initiate())"
 

Navigation menu