How to Upgrade Node.js via NPM Rumi, August 23, 2017 Steps to Upgrade Node.Js Use the following steps to install or upgrade node.js to latest available version. Current NodeJs Version – First check current nodejs version on your system using following command. In my case it is v0.10.37.rahul@tecadmin:~$ node -v v0.10.37 Clean Cache Forcefully – Now clean all npm cache from your system forcefully. rahul@tecadmin:~$ sudo npm cache clean -f npm WARN using –force I sure hope you know what you are doing. Install n Module – After cleaning all cache from your system, now install n modules using npm command. rahul@tecadmin:~$ sudo npm install -g n /usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n n@2.0.2 /usr/local/lib/node_modules/n Install Nodejs – Let’s install or update latest nodejs version on your system using n module. rahul@tecadmin:~$ sudo n stable install : node-v6.0.0 mkdir : /usr/local/n/versions/node/6.0.0 fetch : https://nodejs.org/dist/v6.0.0/node-v6.0.0-linux-x64.tar.gz ############################################################ 100.0% installed : v6.0.0 Setup Binary Link – Now link your node binary with latest nodejs installed binary file using following command. rahul@tecadmin:~$ sudo ln -sf /usr/local/n/versions/node/6.0.0/bin/node /usr/bin/node Check Nodejs Version – Finally recheck your nodejs version. You will find that it showing latest version on your system. rahul@tecadmin:~$ node -v v6.0.0 Src: https://tecadmin.net/upgrade-nodejs-via-npm/ Related Administrations Configurations (Linux) Node.js
Upgrading PHP 7.2 to 7.4 for WHMCS on CentOS 7 October 30, 2023October 30, 2023 Lately I needed an update of PHP (7.2 to 7.4) on my WHMCS CentOS 7 built box- here’re the process that I followed. But before that, I’m sharing my original post on setting up WHMCS on CentOS 7 Since I used remi repository to install version 7.2, I’ll be doing… Read More
Learning watch command with examples! January 18, 2017 watch date watch -d date watch -n 10 df -h watch -t date watch echo “‘”‘$$'”‘” watch echo $$ watch -n 0.5 echo $$ watch -n 1 ‘ps -e -o pid,uname,cmd,pmem,pcpu –sort=-pmem,-pcpu | head -15’ watch -d -n 1 ifconfig watch -n 1 tail /var/log/messages watch -d=cumulative date watch “du… Read More
Set Time Zone on CentOS 7 January 14, 2020 Checking the Current Timezone In CentOS and other modern Linux distros, you can use the timedatectl command to display and set the current system’s time and timezone. timedatectl The output below shows that the system’s timezone is set to UTC: Local time: Wed 2019-02-06 22:43:42 UTC Universal time: Wed 2019-02-06… Read More