How To Install Rocketchat On Centos7.8
- 00:42 rpm -q centos-release
- 01:05 cat << EOF | sudo tee -a /etc/yum.repos.d/mongodb-org-4.0.repo
- 01:46 curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
- 02:08 yum install -y epel-release
- 02:33 yum install -y gcc-c++ make mongodb-org nodejs
- 03:24 yum install GraphicsMagick -y
- 03:53 sed -i "s/^#replication:/replication:\n replSetName: rs01/" /etc/mongod.conf
- 04:13 systemctl start mongod
- 04:21 systemctl enable mongod
- 04:33 mongo --eval "printjson(rs.initiate())"
- 05:05 node -v
- 05:15 npm install -g inherits n && sudo n 12.18.3
- 05:52 curl -L https://releases.rocket.chat/latest/download -o /opt/rocket.chat.tgz
- 06:34 cd /opt
- 06:39 tar -xvf rocket.chat.tgz
- 06:54 mv bundle rocketchat
- 07:07 cd rocketchat/programs/server/
- 07:16 npm install
- 07:41 cd ../..
- 07:51 export ROOT_URL=http://192.168.7.228:3000
- 08:17 export MONGO_URL=mongodb://localhost:27017/rocketchat
- 08:41 export PORT=3000
- 08:56 exportMONGO_OPLOG_URL=mongodb://localhost:27017/local?replSet=rs01
- 09:32 node main.js
Installation Of Rocketchat On Centos7.8
Rocket Chat is an open source communication hub. It is used by different kinds of such as banks, and government agencies for setting up their own chat tool. Users can customize Rocket.Chat, choose their users, and securely manage data. It cab be set up both on cloud and also with own servers on-premises. This Tutorial covers the installation of Rocket.Chat on CentOS 7.8
Installation process.
Before you begin, check the CentOS version by using the following command
[root@linuxhelp ~]# rpm -q centos-release
centos-release-7-8.2003.0.el7.centos.x86_64
Run the following command to paste the mongodb repo on the following location
[root@linuxhelp ~]# cat << EOF | sudo tee -a /etc/yum.repos.d/mongodb-org-4.0.repo
> [mongodb-org-4.0]
> name=MongoDB Repository
> baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/
> gpgcheck=1
> enabled=1
> gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
> EOF
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
Now add the nodejs version 12 repo by using the following command
[root@linuxhelp ~]# curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
## Installing the NodeSource Node.js 12.x repo...
## Inspecting system...
+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release
+ uname -m
.
.
.
## Run `sudo yum install -y nodejs` to install Node.js 12.x and npm.
## You may also need development tools to build native addons:
sudo yum install gcc-c++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn
Install the epel-release by using the following command
[root@linuxhelp ~]# yum install -y epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
mongodb-org-4.0 | 2.5 kB 00:00:00
nodesource | 2.5 kB 00:00:00
(1/2): mongodb-org-4.0/primary_db | 83 kB 00:00:00
.
.
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : epel-release-7-11.noarch 1/1
Verifying : epel-release-7-11.noarch 1/1
Installed:
epel-release.noarch 0:7-11
Complete!
Install the requirements for Rocket.Chat by using the following command
[root@linuxhelp ~]# yum install -y gcc-c++ make mongodb-org nodejs
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 4.3 kB 00:00:00
* base: centos.excellmedia.net
* epel: fedora.ipserverone.com
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
epel | 4.7 kB 00:00:00
(1/3): epel/x86_64/group_gz | 95 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 1.0 MB 00:00:04
(3/3): epel/x86_64/primary_db | 6.9 MB 00:00:17
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
.
.
.
Installed:
gcc-c++.x86_64 0:4.8.5-39.el7 mongodb-org.x86_64 0:4.0.19-1.el7
nodejs.x86_64 2:12.18.3-1nodesource
Dependency Installed:
cpp.x86_64 0:4.8.5-39.el7 gcc.x86_64 0:4.8.5-39.el7
glibc-devel.x86_64 0:2.17-307.el7.1 glibc-headers.x86_64 0:2.17-307.el7.1
kernel-headers.x86_64 0:3.10.0-1127.13.1.el7 libstdc++-devel.x86_64 0:4.8.5-39.el7
mongodb-org-mongos.x86_64 0:4.0.19-1.el7 mongodb-org-server.x86_64 0:4.0.19-1.el7
mongodb-org-shell.x86_64 0:4.0.19-1.el7 mongodb-org-tools.x86_64 0:4.0.19-1.el7
Complete!
Install the graphicsmagick by using the following command
[root@linuxhelp ~]# yum install GraphicsMagick -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: fedora.ipserverone.com
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Resolving Dependencies
--> Running transaction check
---> Package GraphicsMagick.x86_64 0:1.3.34-1.el7 will be installed
.
.
Installing : libwmf-lite-0.2.8.4-41.el7_1.x86_64 1/2
Installing : GraphicsMagick-1.3.34-1.el7.x86_64 2/2
Verifying : GraphicsMagick-1.3.34-1.el7.x86_64 1/2
Verifying : libwmf-lite-0.2.8.4-41.el7_1.x86_64 2/2
Installed:
GraphicsMagick.x86_64 0:1.3.34-1.el7
Dependency Installed:
libwmf-lite.x86_64 0:0.2.8.4-41.el7_1
Complete!
Setup replication for monodb by using the following command
[root@linuxhelp ~]# sed -i "s/^#replication:/replication:\n replSetName: rs01/" /etc/mongod.conf
Now start and enable the mongodb service
[root@linuxhelp ~]# systemctl start mongod
[root@linuxhelp ~]# systemctl enable mongod
Once it is done, check the replication by using the following command
[root@linuxhelp ~]# mongo --eval "printjson(rs.initiate())"
MongoDB shell version v4.0.19
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("6cc27489-498d-4f3c-9b1b-379fc0c5bd65") }
MongoDB server version: 4.0.19
{
"info2" : "no configuration specified. Using a default configuration for the set",
"me" : "127.0.0.1:27017",
"ok" : 1,
"operationTime" : Timestamp(1595479358, 1),
"$clusterTime" : {
"clusterTime" : Timestamp(1595479358, 1),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
}
}
And then, check the node version by using the following command
[root@linuxhelp ~]# node -v
v12.18.3
Run the npm inherits and node version required for rocketchat
[root@linuxhelp ~]# npm install -g inherits n && sudo n 12.18.3
/usr/bin/n -> /usr/lib/node_modules/n/bin/n
+ [email protected]
+ [email protected]
added 2 packages from 4 contributors in 0.395s
installing : node-v12.18.3
mkdir : /usr/local/n/versions/node/12.18.3
fetch : https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.xz
installed : v12.18.3 to /usr/local/bin/node
active : v12.18.3 at /bin/node
Download the latest version of rocket chat
[root@linuxhelp ~]# curl -L https://releases.rocket.chat/latest/download -o /opt/rocket.chat.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 132 100 132 0 0 80 0 0:00:01 0:00:01 --:--:-- 80
100 154M 100 154M 0 0 1092k 0 0:02:24 0:02:24 --:--:-- 1129k
Enter into the /opt directory
[root@linuxhelp ~]# cd /opt/
Extract the downloaded file by using the tar command
[root@linuxhelp opt]# tar -xvf rocket.chat.tgz
bundle/
bundle/programs/
bundle/programs/web.browser.legacy/
bundle/programs/web.browser.legacy/head.html
bundle/programs/web.browser.legacy/program.json
bundle/programs/web.browser.legacy/dynamic/
bundle/programs/web.browser.legacy/dynamic/node_modules/
bundle/programs/web.browser.legacy/dynamic/node_modules/raf/
bundle/programs/web.browser.legacy/dynamic/node_modules/raf/package.json
.
.
.
bundle/programs/web.browser/packages/emojione/travel-sprites.png
bundle/programs/web.browser/325e89158f684bf2880b7902f410ef266f2cddb9.stats.json
bundle/programs/web.browser/86c67b6a478fff5f5001d6fefedcc7771fad7cab.css
bundle/main.js
bundle/server/
bundle/server/.bundle_version.txt
bundle/.node_version.txt
bundle/star.json
bundle/README
Rename the bundle to rocketchat
[root@linuxhelp opt]# mv bundle rocketchat
Enter into the following location and run npm install
[root@linuxhelp opt]# cd rocketchat/programs/server/
[root@linuxhelp server]# npm install
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
> [email protected] install /opt/rocketchat/programs/server/node_modules/fibers
> node build.js || nodejs build.js
`linux-x64-72-glibc` exists; testing
Problem with the binary; manual build incoming
make: Entering directory `/opt/rocketchat/programs/server/node_modules/fibers/build'
CXX(target) Release/obj.target/fibers/src/fibers.o
CXX(target) Release/obj.target/fibers/src/coroutine.o
CC(target) Release/obj.target/fibers/src/libcoro/coro.o
SOLINK_MODULE(target) Release/obj.target/fibers.node
COPY Release/fibers.node
make: Leaving directory `/opt/rocketchat/programs/server/node_modules/fibers/build'
Installed in `/opt/rocketchat/programs/server/node_modules/fibers/bin/linux-x64-72-glibc/fibers.node`
npm WARN lifecycle meteor-dev-bundle@~install: cannot run in wd meteor-dev-bundle@ node npm-rebuild.js (wd=/opt/rocketchat/programs/server)
added 146 packages from 122 contributors and audited 147 packages in 13.074s
2 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Come back to rocketchat directory
[root@linuxhelp server]# cd ../..
Export the root url by using the following command
[root@linuxhelp rocketchat]# export ROOT_URL=http://192.168.7.228:3000
Also, export the mongodb URL by using the following command
[root@linuxhelp rocketchat]# export MONGO_URL=mongodb://localhost:27017/rocketchat
And then, export the port number
[root@linuxhelp rocketchat]# export PORT=3000
Export the mongodb oplog URL by using the following command
[root@linuxhelp rocketchat]# exportMONGO_OPLOG_URL=mongodb://localhost:27017/local?replSet=rs01
Run the following command to start Rocket.Chat
[root@linuxhelp rocketchat]# node main.js
LocalStore: store created at
LocalStore: store created at
LocalStore: store created at
Setting default file store to GridFS
ufs: temp directory created at "/tmp/ufs"
Loaded the Apps Framework and loaded a total of 0 Apps!
Updating process.env.MAIL_URL
Using GridFS for custom sounds storage
Using GridFS for custom emoji storage
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
(node:57578) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
➔ System ➔ startup
➔ +--------------------------------------------------+
➔ | SERVER RUNNING |
➔ +--------------------------------------------------+
➔ | |
➔ | Rocket.Chat Version: 3.4.2 |
➔ | NodeJS Version: 12.18.3 - x64 |
➔ | MongoDB Version: 4.0.19 |
➔ | MongoDB Engine: wiredTiger |
➔ | Platform: linux |
➔ | Process Port: 3000 |
➔ | Site URL: http://192.168.7.228:3000 |
➔ | ReplicaSet OpLog: Enabled |
➔ | Commit Hash: e5f93d3f5e |
➔ | Commit Branch: HEAD |
➔ | |
➔ +--------------------------------------------------+
Once all the above process is completed, go to the browser and enter the ip address and port number Configure the admin credentials And then select your organization information You can set up server info of Rocket.Chat Register the server The dashboard of Rocket.Chat
With this the installation of Rocket.Chat on CentOS 7.6 comes to end
Comments ( 0 )
No comments available