Linux CentOS6 system installs the latest version of Node.js environment and related file configurations

888u

Last update at :2024-06-23,Edit by888u

Node.js, a Javascript running environment that is currently widely used, is written in C++. It is currently used more in WEB applications and its execution efficiency is still very high. Although Snail is not engaged in program development, sometimes When playing VPS, you will still encounter the basics of using the Node.JS environment. For example, in the past few days, the construction of the HEXO light blog program has used the Nodejs environment configuration, which is not suitable for recording the configuration based on the CentOS6 system.

Because the Nodejs source version that comes with our commonly used default CentOS system is relatively low and sometimes not very compatible. Therefore, when we install and configure the Node.js environment, we still directly install the latest official version manually.

First, install dependency packages

yum install gcc-c++ openssl-devel

Generally, the gcc compiler has been installed in CentOS6 to execute the C++ environment dependency package, but to ensure that there are no problems, we install it again.

After completion, we enter gcc -v to check whether a version number appears. If so, it means there is no problem.

Second, check and verify the Python version

The Node.js environment requires Python 2.6 or above. We need to check. If not, we need to install and upgrade the latest version of Python.

python –version

After executing, check the version. My version is Python 2.6.6, so there is no problem and there is no need to upgrade.

Third, install the latest version of Node.js

cd /usr/local/srcwget http://nodejs.org/dist/node-latest.tar.gztar -zxvf node-latest.tar.gz

We download and decompress the latest official version of Nodejs installation package, then look at the current version folder and enter the current folder to compile.

We can see that the latest version is node-v0.12.7, and then we enter the current version to compile.

cd node-v0.12.7./configuremake && make install

Let the system execute the installation and compilation process, we can just wait, rest, rest, and drink tea.

Fourth, check the Node.js installation

After the execution is completed, we enter node -v to see if we see the version.

In summary, through the above steps, we can deploy the Node.js framework in our own Linux CentOS system environment, and then start deploying our required projects.

Recommended site searches: registration query, free personal homepage space, free domain name, US website space, asp website space, free cloud computer host permanent use, IP segment query, Ministry of Industry and Information Technology website registration query, server proxy ip, registered domain name, < /p>

Linux CentOS6 system installs the latest version of Node.js environment and related file configurations

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码