When installing the ELK environment, the prompt: "bash: npm: command not found", which requires the installation of nodejs and npm environment, the following describes the installation through yum:
Need to add epel and remi sources in centos
Add epel source (if other epel is installed in advance-release-7-11.noarch, you need to uninstall it first, otherwise it will conflict with the following)
64 Bit:[root@elk-node02 mnt]# rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
===========================================================================================32 Bit:[root@elk-node02 mnt]# rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
===========================================================================================
Import key:[root@elk-node02 mnt]# rpm --import/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Add remi source
[ root@elk-node02 mnt]# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
[ root@elk-node02 mnt]# rpm --import/etc/pki/rpm-gpg/RPM-GPG-KEY-remi
After installation,carried out
[ root@elk-node02 mnt]# curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -[root@elk-node02 mnt]# yum -y install nodejs
[ root@elk-node02 mnt]# npm -v
3.8.6
Recommended Posts