Eric Guo's blog.cloud-mes.com

Hoping writing JS, Ruby & Rails and Go article, but fallback to DevOps note

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

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

Install locale

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

Create the deployer user

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

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

Secure the ssh by turn off root and password
PermitRootLogin no
PasswordAuthentication no

Install node.js 14 & yarn

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

TencentOS

Comments