Rocket.Chat on CentOS 7 updated installation instructions
-
@scottalanmiller has a guide , but it not longer works.
Ref: https://tecadmin.net/install-latest-nodejs-and-npm-on-centos/#
Ref: https://www.vultr.com/docs/how-to-install-rocket-chat-on-centos-7# Install the current mongodb repository cat > /etc/yum.repos.d/mongodb-org-3.5.repo <<EOF [mongodb-org-3.5] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.5/x86_64/ gpgcheck=0 enabled=1 EOF # Install dependencies yum install -y epel-release GraphicsMagick gcc-c++ make mongodb mongodb-server policycoreutils-python nodejs # Update selinux config semanage port -a -t mongod_port_t -p tcp 27017 # Start mongod and set it to start at boot systemctl start mongod systemctl enable mongod # Open the port you want to use (pick any port, just be sure to change all references to port 80 here) firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --reload # Download and install npm and node.js curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash source ~/.bash_profile # I like using n to manage node versions, was very good for this where finding the correct version took a bit of doing npm install -g inherits n # The current (as of 5/1/2017) version of Rocket.Chat needs node 4.8.2 n 4.8.2 # Download, unzip, and configure RocketChat cd /opt curl -L https://rocket.chat/releases/latest/download -o rocket.chat.tgz tar zxvf rocket.chat.tgz mv bundle Rocket.Chat cd Rocket.Chat/programs/server npm install inherits npm install cd ../.. npm install forever # This shouldn't be needed when using the systemctl service file, but my install wanted to use this instead echo "export ROOT_URL=http://rocket.lab.ntg.co/" >> ~/.bashrc echo "export MONGO_URL=mongodb://localhost:27017/rocketchat" >> ~/.bashrc echo "export PORT=80" >> ~/.bashrc source ~/.bashrc # I used the systemctl file to run Rocket.Chat instead of forever as forever doesn't always start the service after a boot #/opt/Rocket.Chat/node_modules/forever/bin/forever start /opt/Rocket.Chat/main.js # Create the systemctl service file cat > /usr/lib/systemd/system/rocketchat.service <<EOF [Unit] Description=The Rocket.Chat server After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target [Service] ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js StandardOutput=syslog StandardError=syslog SyslogIdentifier=rocketchat User=root Environment=MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL=http://www.example.com/ PORT=80 [Install] WantedBy=multi-user.target EOF # Start and enable run at boot systemctl start rocketchat.service systemctl enable rocketchat.service
That should be it. Don't forget to create a user account right away.
If you want, this should be able to be run as a script. -
That's because that's the old guide. I have a more recent one that works great. Rocket.Chat is available from snaps and is self maintaining.
-
@scottalanmiller said in Rocket.Chat on CentOS 7 updated installation instructions:
That's because that's the old guide. I have a more recent one that works great. Rocket.Chat is available from snaps and is self maintaining.
Google failed me this afternoon then, doh!
-
@scottalanmiller said in Rocket.Chat on CentOS 7 updated installation instructions:
That's because that's the old guide. I have a more recent one that works great. Rocket.Chat is available from snaps and is self maintaining.
While Rocketchat may be available in a snapd package, snapd itself is not a native part of RHEL 7, CentOS 7, or Fedora 25.
For CentOS 7,
snapd
is not available fromyum
[root@nginxproxy ~]# yum install snapd Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.trouble-free.net * epel: mirror.compevo.com * extras: mirror.keystealth.org * updates: mirror.team-cymru.org No package snapd available. Error: Nothing to do
[root@nginxproxy ~]# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.raystedman.net * epel: mirror.compevo.com * extras: mirror.keystealth.org * updates: mirror.raystedman.net repo id repo name status base/7/x86_64 CentOS-7 - Base 9,363 epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 11,573 extras/7/x86_64 CentOS-7 - Extras 337 updates/7/x86_64 CentOS-7 - Updates 1,575 repolist: 22,848
For Fedora 25, it is in the built in updates repository and can be installed with
dnf install snapd
But none of this negates the fact that, yes your previous instructions are broken. Nor does any of that negate his instructions here.
-
Even better.... @scottalanmiller, it is flat not supported on CentOS 7.
https://snapcraft.io/docs/core/install
-
That's why we switched to running it on Ubuntu with Snaps. Runs great.