spent several hours trying to upgrade rocket.chat on centos 7. thought i would save a few others from banging their heads against a wall trying to get past the /lib64/libstdc++.so.6: versionGLIBCXX_3.4.20’ not found issue i had.
I hope this helps, if i forgot anything or you get stuck along the way let me know I wrote this from memory.
sudo su
yum -y install epel-release nano && yum -y update
nano /etc/yum.repos.d/mongodb.repo
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
CTRL+X y Enter
yum group install “Development Tools”
yum install -y nodejs curl GraphicsMagick npm mongodb-org-server mongodb-org gcc-c++ bison libmpc-devel mpfr-devel gmp-devel
npm install -g inherits n
n 8.11.3
cd /opt
curl -L https://releases.rocket.chat/latest/download -o rocket.chat.tar.gz
tar zxvf rocket.chat.tar.gz
mv bundle Rocket.Chat
mkdir rocket
mv Rocket.Chat rocket
cd /root
yum install wget
###Grab A Beer, take a nap, or find something else to do. this step took 6 hours for me. compiling gcc also takes up a fair bit of space.
wget ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-8.1.0/gcc-8.1.0.tar.gz
tar -xvzf gcc-8.1.0.tar.gz
cd gcc-8.1.0
./configure --disable-multilib --prefix=/opt/gcc-8.1.0
make
make install
cd /opt/rocket/Rocket.Chat/programs/server/
npm install
nano /usr/lib/systemd/system/rocketchat.service
[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/Rocket.Chat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=root
EnvironmentFile=/etc/systemd/system/rocketenv.conf
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL=http://your-host-name.com-as-accessed-from-internet:3000/ PORT=3000
[Install]
WantedBy=multi-user.target
CTRL+X y Enter
nano /etc/systemd/system/rocketenv.conf
LD_PRELOAD=/opt/gcc-8.1.0/lib64/libstdc++.so
CTRL+X y Enter
systemctl enable rocketchat.service
systemctl start rocketchat.service