We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
编译时间有点长,不喜则直接用别人编好的二进制文件
# 下载解压 wget https://nodejs.org/dist/v0.10.5/node-v0.12.7.tar.gz tar -zvxf node-v0.12.7.tar.gz # 配置编译环境,安装到 /opt/node/v0.12.7 ./configure --prefix=/opt/node/v0.12.7 # 编译及安装 make && make install # 配置环境变量 # 在/etc/profile.d目录下建立node.sh脚本文件并输入如下 #set for nodejs export NODE_HOME=/opt/node/v0.12.7 export PATH=$NODE_HOME/bin:$PATH export NODE_PATH=$NODE_HOME/lib/node_modules:$PATH # 测试验证 node -v
# 下载解压二进制文件 wget https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz tar -zvxf node-v0.12.7-linux-x64.tar.gz # 测试验证二进制文件 ./node-v0.12.7-linux-x64/bin/node -v # 让 nodejs 能在命令行全局执行(有两种方式) 1. 配置环境变量 pwd # 获取到当前目录的绝对路径,例如是 /Users/weekeight/node-v0.12.7-linux-x64/bin vim /etc/profile 修改 PATH ,将上面的路径添加到末尾,冒号隔开 source /etc/profile 2. 创建软连接 ln -s /Users/weekeight/node-v0.12.7-linux-x64/bin/node /usr/local/bin/node ln -s /Users/weekeight/node-v0.12.7-linux-x64/bin/npm /usr/local/bin/npm # 完成测试验证 node -v
The text was updated successfully, but these errors were encountered:
No branches or pull requests
源码安装
二进制文件安装
The text was updated successfully, but these errors were encountered: