<\/span><\/h2>\n\n\n\nFirst, log in to your CentOS 8 server via SSH as the root user:<\/p>\n\n\n\n
ssh root@IP_Address -p Port_number<\/pre>\n\n\n\nYou will need to replace \u2018IP_Address\u2018 and \u2018Port_number\u2018 with your server\u2019s respective IP address and SSH port number. Additionally, replace \u2018root\u2019 with the username of the admin account if necessary.<\/p>\n\n\n\n
Before starting, you have to make sure that all CentOS packages installed on the server are up to date. You can do this by running the following commands:<\/p>\n\n\n\n
dnf update -y<\/pre>\n\n\n\n<\/span>Step 2: Install Required Dependencies<\/span><\/h2>\n\n\n\nBefore starting, you will need to install the EPEL repository and some required dependencies in your server.<\/p>\n\n\n\n
First, install EPEL repo with the following command:<\/p>\n\n\n\n
dnf install epel-release -y<\/pre>\n\n\n\nAfter installing, EPEL repo, install Nginx web server and development tools with the following command:<\/p>\n\n\n\n
dnf install nginx curl git unzip -y\ndnf groupinstall 'Development Tools'<\/pre>\n\n\n\nOnce all the packages are installed, start the Nginx service and enable it to start at system reboot:<\/p>\n\n\n\n
systemctl start nginx\nsystemctl enable nginx<\/pre>\n\n\n\n<\/span>Step 3: Install Node.js and Redis<\/span><\/h2>\n\n\n\nBy default, the latest version of Node.js is not available in the CentOS 8 default repository. So you will need to enable the Node.js repo to your system.<\/p>\n\n\n\n
You can enable the Node.js repo with the following command:<\/p>\n\n\n\n
dnf module enable nodejs:12<\/pre>\n\n\n\nNext, install the Node.js with the following command:<\/p>\n\n\n\n
dnf install nodejs -y<\/pre>\n\n\n\nAfter installing Node.js, verify the installed version of Node.js with the following command:<\/p>\n\n\n\n
node --version<\/pre>\n\n\n\nYou should get the following output:<\/p>\n\n\n\n
v12.18.4\n<\/pre>\n\n\n\nNext, install the Redis server with the following command:<\/p>\n\n\n\n
dnf install redis<\/pre>\n\n\n\nOnce installed, start Redis service and enable it to start at system reboot with the following command:<\/p>\n\n\n\n
systemctl start redis\nsystemctl enable redis<\/pre>\n\n\n\n<\/span>Step 4: Install EtherCalc<\/span><\/h2>\n\n\n\nYou can install the EtherCalc easily using the ‘npm’ command:<\/p>\n\n\n\n
npm install -g ethercalc<\/pre>\n\n\n\nOnce installed, start the EtherCalc with the following command:<\/p>\n\n\n\n
ethercalc<\/pre>\n\n\n\nYou should get the following output:<\/p>\n\n\n\n
Please connect to: http:\/\/centos8:8000\/\nStarting backend using webworker-threads\nFalling back to vm.CreateContext backend\nExpress server listening on port 8000 in development mode\nZappa 0.5.0 \"You can't do that on stage anymore\" orchestrating the show\nConnected to Redis Server: localhost:6379\n<\/pre>\n\n\n\nAs you can see, EtherCalc is started and listening on port 8000. Now, press CTRL+C to stop the EtherCalc.<\/p>\n\n\n\n
<\/span>Step 5: Create a Systemd Service File for EtherCalc<\/span><\/h2>\n\n\n\nNext, you will need to create a systemd service file to manage the EtherCalc service. First, create a new user for EtherCalc with the following command:<\/p>\n\n\n\n
adduser ethercalc<\/pre>\n\n\n\nNext, add the EtherCalc user to the Nginx group with the following command:<\/p>\n\n\n\n
usermod -a -G ethercalc nginx<\/pre>\n\n\n\nNext, create a systemd service file for EtherCalc:<\/p>\n\n\n\n
nano \/etc\/systemd\/system\/ethercalc.service<\/pre>\n\n\n\nAdd the following lines:<\/p>\n\n\n\n
[Unit]\nDescription=Run Ethercalc, the collaborative spreadsheet editor.\nAfter=syslog.target network.target\n\n[Service]\nType=simple\nUser=ethercalc\nExecStart=\/usr\/local\/bin\/ethercalc --port 8000 --cors --expire 31104000\n#RuntimeMaxSec=86400\n#Restart=always\n\n[Install]\nWantedBy=multi-user.target\n<\/pre>\n\n\n\nSave and close the file then reload the systemd daemon with the following command:<\/p>\n\n\n\n
systemctl daemon-reload<\/pre>\n\n\n\nNext, start the EtherCalc service and enable it to start at system reboot with the following command:<\/p>\n\n\n\n
systemctl start ethercalc\nsystemctl enable ethercalc<\/pre>\n\n\n\nYou can also verify the status of the EtherCalc with the following command:<\/p>\n\n\n\n
systemctl status ethercalc<\/pre>\n\n\n\nYou should get the following output:<\/p>\n\n\n\n
\u25cf ethercalc.service - Run Ethercalc, the collaborative spreadsheet editor.\n Loaded: loaded (\/etc\/systemd\/system\/ethercalc.service; enabled; vendor preset: disabled)\n Active: active (running) since Sun 2020-11-15 03:08:03 EST; 5s ago\n Main PID: 24370 (node)\n Tasks: 11 (limit: 12523)\n Memory: 65.6M\n CGroup: \/system.slice\/ethercalc.service\n \u2514\u250024370 node \/usr\/local\/bin\/ethercalc --port 8000 --cors --expire 31104000\n\nNov 15 03:08:03 centos8 systemd[1]: Started Run Ethercalc, the collaborative spreadsheet editor..\nNov 15 03:08:03 centos8 ethercalc[24370]: Please connect to: http:\/\/centos8:8000\/\nNov 15 03:08:04 centos8 ethercalc[24370]: Starting backend using webworker-threads\nNov 15 03:08:04 centos8 ethercalc[24370]: Falling back to vm.CreateContext backend\nNov 15 03:08:04 centos8 ethercalc[24370]: Cross-Origin Resource Sharing (CORS) enabled.\nNov 15 03:08:04 centos8 ethercalc[24370]: Express server listening on port 8000 in development mode\nNov 15 03:08:04 centos8 ethercalc[24370]: Zappa 0.5.0 \"You can't do that on stage anymore\" orchestrating the show\nNov 15 03:08:04 centos8 ethercalc[24370]: Connected to Redis Server: localhost:6379\n<\/pre>\n\n\n\nAt this point, EtherCalc is started and listening on port 8000. You can check it with the following command:<\/p>\n\n\n\n
ss -antlp | grep 8000<\/pre>\n\n\n\nYou should see the following output:<\/p>\n\n\n\n
LISTEN 0 128 0.0.0.0:8000 0.0.0.0:* users:((\"node\",pid=24370,fd=18)) \n<\/pre>\n\n\n\n