Eric Guo's blog.cloud-mes.com

in HTML5, JavaScript, Ruby & Rails, Python, and Cloud MES!

Install Node.js 16 Stack in TencentOS Server 3.1

Permalink

TencentOS Server is Tencent’s copy cat version of RHEL 8. Compare with Ali’s OpenAnolis, TencentOS seems more open, at least the kernel can be found at Github, but same as many China big internet company, the source code is open source once a year. I try to install my familiar Rails web framework on it and here is the log.

Install htop

yum update -y && yum install htop && reboot

Install locale

yum install langpacks-en glibc-all-langpacks -y
localectl set-locale LANG=en_US.UTF-8

Create the deployer user

adduser deployer
sudo su - deployer
mkdir .ssh
chmod 700 .ssh
vi .ssh/authorized_keys # and paste your public key
chmod 600 .ssh/authorized_keys

Enable deployer as sudo

sudo su -
cd /etc/sudoers.d/
echo "deployer ALL=(ALL) NOPASSWD:ALL" > 20-deployer-user

Secure the ssh by turn off root and password

sudo tail /etc/ssh/sshd_config

PermitRootLogin no
PasswordAuthentication no

Install node.js 14 & yarn

sudo dnf module install nodejs:14
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn

Comments