Centos 7 install guide


#1

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

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
./contrib/download_prerequisites --disable-multilib
mkdir objdir
cd objdir
…/configure --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


#2

Was there any indicator which package required the manual compiling of gcc?


#3

fibers wants GLIBCXX_3.4.20 to be a higher version than cantos is able to provide. I tried both npm install as both root and regular user(also creates problems with sharp) same error. this was just the way i found past it.