| # To add New User | |||||
| # sudo useradd {{newuser}} | |||||
| # sudo passwd {{newuser}} | |||||
| # Add the User to the sudoers File | |||||
| # sudo visudo | |||||
| # In the file opened add to the bottom and saveit | |||||
| # {{newuser}} ALL=(ALL) ALL | |||||
| # usermod -aG wheel {{newuser}} | |||||
| # Switch to the new user | |||||
| # su - {{newuser}} | |||||
| # SHORTCUTS # | |||||
| # To get task manager run htop | |||||
| # To check no of CPU's -> nproc or lscpu --all --extended | |||||
| # To check disk space df -h | |||||
| # TO CHECK UP Link speed | |||||
| # nmcli -t -f NAME c show --active | |||||
| # sudo ethtool {devicename} | |||||
| # To Fix the mirrorlist issue in CentOS, make the following changes in the three .repo files | # To Fix the mirrorlist issue in CentOS, make the following changes in the three .repo files | ||||
| # (CentOS-AppStream.repo, CentOS-Base.repo, CentOS-Extras.repo) in the directory /etc/yum.repos.d/ | |||||
| # Open these files with sudo | |||||
| # comment out mirrorlist line | |||||
| # change baseurl like to: | |||||
| # baseurl=http://vault.centos.org/$contentdir/$releasever/extras/$basearch/os/ | |||||
| # change current directory to /etc/yum.repos.d/ | |||||
| # Open these three (CentOS-AppStream.repo, CentOS-Base.repo, CentOS-Extras.repo) files in nano with sudo and make the below two changes. | |||||
| # comment out mirrorlist line, mirrorlist=http:/{{}} | |||||
| # Uncomment the baseurl line and change http://mirror.centos.org{{}} to http://vault.centos.org{{}} | |||||
| # Download steps | # Download steps | ||||
| sudo yum install npm | sudo yum install npm | ||||
| sudo firewall-cmd --zone=public --add-port=9209/tcp --permanent # FOR pm2 metrics | |||||
| sudo firewall-cmd --zone=public --add-port=8081/tcp --permanent | sudo firewall-cmd --zone=public --add-port=8081/tcp --permanent | ||||
| # have to add all the ports to firewall. in pm2 when we run ecosystem file, that prints these commands | # have to add all the ports to firewall. in pm2 when we run ecosystem file, that prints these commands | ||||
| sudo firewall-cmd --reload | sudo firewall-cmd --reload | ||||
| sudo npm install -g pm2 | sudo npm install -g pm2 | ||||
| npm install -g ember-cli | npm install -g ember-cli | ||||
| npm install -g loopback-cli | npm install -g loopback-cli | ||||
| pm2 install pm2-metrics | |||||
| #production A SETUP | #production A SETUP | ||||
| mkdir chess | mkdir chess | ||||
| cd chess | cd chess |