centos7安装npm和nodejs
2017-03-19 15:09
429 查看
https://github.com/kazuhisya/nodejs-rpm
node.js rpm spec : https://github.com/kazuhisya/nodejs-rpmnode.js source : https://nodejs.org/dist/
$ 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 |
---|---|---|
[code]master (v7,Current) | ||
v6.x(v6,LTS) | ||
v4.x(v4,LTS) |
Compiled Package
You can find prebuilt rpm binary from here(el7 and fc23, 24)Stable Release: FedoraCopr khara/nodejs CoprLTS Release: FedoraCopr khara/nodejs-lts Coprel7:$ 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[/code]fc23, 24:$ sudo dnf copr enable khara/nodejs$ sudo dnf install -y nodejs nodejs-npmBuilding the RPM
Distro support
Tested
RHEL/CentOS 7 x86_64Fedora23, 24 x86_64Probably it works
RHEL/CentOS/SL/OL 6 x86_64when you try to build on el6, can usedevtoolset-3andSCLrepositoryRHEL6.x: Red Hat Developer Toolset 3 and Red Hat Software CollectionsCentOS6.x: installcentos-release-scl-rhpackage.devtoolset-3-gcc-c++,devtoolset-3-binutils,python27RHEL/CentOS/SL/OL 5 x86_64when you try to build on el5, you can usedevtoolset-2andpython27Developer Toolset 2RHEL5.x: Red Hat Developer Toolset 2CentOS5.x: devtools-2Python 2.7IUS Community Projectdevtoolset-2-gcc-c++,devtoolset-2-binutils,python27Prerequisites:
Python 2.7gccandg++4.8 or newerDocker (el7, el6, el5)
Docker environment for building nodejs rpm. It will help to build and debug.See also: docker/README.mdYou can also try this: Docker Hub kazuhisya/nodejs-rpm (el7 only)Build (el7, el6)
setting up:$ sudo yum install -y yum-utils rpmdevtools makegit 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.specel7:$ make rpmel6 : 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 --nogpgcheckBuild (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'
相关文章推荐
- 在centos7中安装nodejs(npm )8.1.4
- centos7下安装nodejs和npm方法
- centos7安装npm和nodejs
- 在centos7中安装nodejs(npm )
- 在centos7中安装nodejs(npm )
- Linux下配置Nodejs和npm及安装pemolo
- nodejs,npm,cloud9在 ubuntu下安装指南
- 使用npmf解决npm安装nodejs类库失败的问题
- npm安装nodejs-mysql模块
- Node.js 笔记(一) nodejs、npm、express安装
- nodejs的npm安装模块时候报错:npm ERR! Error: CERT_NOT_YET_VALID的解决方法 - 包子博客 _ 关注互联网前端、开发、SEO、移动互联网应用技术
- Angularjs学习---angularjs环境搭建,ubuntu 12.04下安装nodejs、npm和karma
- 在windows 下安装nodejs 和npm
- NodeJS、NPM安装配置步骤(windows版本)
- Node.js 笔记(一) nodejs、npm、express安装
- Nodejs npm安装socket.io报错解决办法
- MacOSX10.7 安装nodejs npm mongodb redis
- nodejs npm安装expressjs
- myweb的nodejs框架通过npm安装方式
- npm安装nodejs模块时,有些模块因为墙的原因无法安装,可以使用指定代理来解决。