centos7安装npm和nodejs
来源:互联网 发布:26周四维彩超数据标准 编辑:程序博客网 时间:2024/05/07 21:21
https://github.com/kazuhisya/nodejs-rpm
$ sudo curl -sL -o /etc/yum.repos.d/khara-nodejs.repo https://copr.fedoraproject.org/coprs/khara/nodejs/repo/epel-7/khara-nodejs-epel-7.repo$ sudo yum install -y nodejs nodejs-npm
node.js RPM spec
Blanch Status RPM master
(v7, Current)v6.x
(v6, LTS)v4.x
(v4, LTS)
- node.js rpm spec : https://github.com/kazuhisya/nodejs-rpm
- node.js source : https://nodejs.org/dist/
Compiled Package
- You can find prebuilt rpm binary from here(el7 and fc23, 24)
- Stable Release: FedoraCopr khara/nodejs Copr
- LTS Release: FedoraCopr khara/nodejs-lts Copr
el7:
$ sudo curl -sL -o /etc/yum.repos.d/khara-nodejs.repo https://copr.fedoraproject.org/coprs/khara/nodejs/repo/epel-7/khara-nodejs-epel-7.repo$ sudo yum install -y nodejs nodejs-npm
fc23, 24:
$ sudo dnf copr enable khara/nodejs$ sudo dnf install -y nodejs nodejs-npm
Building the RPM
Distro support
Tested
- RHEL/CentOS 7 x86_64
- Fedora23, 24 x86_64
Probably it works
RHEL/CentOS/SL/OL 6 x86_64
- when you try to build on el6, can use
devtoolset-3
andSCL
repository- RHEL6.x: Red Hat Developer Toolset 3 and Red Hat Software Collections
- CentOS6.x: install
centos-release-scl-rh
package.
devtoolset-3-gcc-c++
,devtoolset-3-binutils
,python27
- when you try to build on el6, can use
RHEL/CentOS/SL/OL 5 x86_64
- when you try to build on el5, you can use
devtoolset-2
andpython27
- Developer Toolset 2
- RHEL5.x: Red Hat Developer Toolset 2
- CentOS5.x: devtools-2
- Python 2.7
- IUS Community Project
- Developer Toolset 2
devtoolset-2-gcc-c++
,devtoolset-2-binutils
,python27
- when you try to build on el5, you can use
Prerequisites:
- Python 2.7
gcc
andg++
4.8 or newer
Docker (el7, el6, el5)
Docker environment for building nodejs rpm. It will help to build and debug.
- See also: docker/README.md
- You can also try this: Docker Hub kazuhisya/nodejs-rpm (el7 only)
Build (el7, el6)
setting up:
$ sudo yum install -y yum-utils rpmdevtools make
git clone and make:
$ git clone https://github.com/kazuhisya/nodejs-rpm.git# If you want to use other version, You can clone to specify the branch name.# example: git clone -b v4.x https://github.com/kazuhisya/nodejs-rpm.git$ cd nodejs-rpm$ sudo yum-builddep ./nodejs.spec
el7:
$ make rpm
el6 : with Software Collections and Devtoolset
$ scl enable python27 devtoolset-3 'make rpm'
install package:
$ cd ./dist/RPMS/x86_64/$ sudo yum install ./nodejs-X.X.X-X.el6.x86_64.rpm ./nodejs-npm-X.X.X-X.el6.x86_64.rpm --nogpgcheck
Build (el5)
el5 : with Devtoolset and python27
$ sudo yum install -y epel-release ius-release$ sudo yum install -y yum-utils rpmdevtools buildsys-macros redhat-rpm-config tar make openssl-devel libstdc++-devel zlib-devel gzip $ sudo yum install -y devtoolset-2-gcc-c++ devtoolset-2-binutils python27$ git clone https://github.com/kazuhisya/nodejs-rpm.git$ cd nodejs-rpm$ rpmdev-setuptree$ curl -OLk https://nodejs.org/dist/vX.X.X/node-vX.X.X.tar.gz$ cp *.patch ~/rpmbuild/SOURCES/ ; cp *.md ~/rpmbuild/SOURCES/ ; cp *.tar.gz ~/rpmbuild/SOURCES/ $ scl enable devtoolset-2 'rpmbuild -ba ./nodejs.spec'
0 0
- centos7安装npm和nodejs
- centos7安装npm和nodejs
- 安装nodejs和npm
- nodejs和npm安装
- centos 安装nodejs 和npm
- Linux安装nodejs和npm
- Linux Centos7.2下安装nodejs&npm配置全局路径
- 在centos7中安装nodejs(npm )8.1.4
- 在windows 下安装nodejs 和npm
- ubuntu Nodejs和npm的安装
- ubuntu Nodejs和npm的安装
- ubuntu 14.10 安装 nodejs 和 npm
- centos6.3中安装nodejs和npm
- ubuntu Nodejs和npm的安装
- ubuntu 下nodejs 和 npm安装
- CentOS 通过yum安装nodejs和npm
- ubuntu下 Nodejs和npm的安装
- 简易安装nodejs和npm的方法
- [POJ 3713] Transferring Sylla (枚举删点+Tarjan求割点)
- LCA_最近公共祖先(离线)入门——POJ
- spring之aop使用总结
- 【九度OJ】题目1191:矩阵最大值 解题报告
- mybatis实战之路,疯狂的数据库操作框架、动态sql实现CRUD及带条件的增CRUD
- centos7安装npm和nodejs
- 我对并查集的了解及模板
- Android 详细分析AppBarLayout的五种ScrollFlags
- zookeeper的安装与JavaAPI的使用
- 对于javascript MDN 中let 和var范例的认识
- IE/Firefox/Chrome等浏览器保存Cookie的位置
- 准备校招实习,从今天开始写博客
- C-递归的函数
- 论文阅读笔记--Selective Search for Object Recognition