Install Nodejs from RedHat's Software Collections

178 views
Skip to first unread message

C. L. Martinez

unread,
Apr 6, 2018, 5:43:41 AM4/6/18
to wa...@googlegroups.com
Hi all,

 Question is: are Redhat's software collections tested with wazuh's api? In RHSCL we can choose between the following nodejs releases:

rh-nodejs4 (v4.6.2)
rh-nodejs6 (v6.11)
rh-nodejs8 (v8.9.4)

 Is it possible to use one of these?

Thanks.

C. L. Martinez

unread,
Apr 8, 2018, 5:17:01 AM4/8/18
to wa...@googlegroups.com
It doesn't seems to be possible:

root@stonehaven:~# yum install wazuh-api
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package wazuh-api.x86_64 0:3.2.1-1 will be installed
--> Processing Dependency: nodejs >= 4.6 for package: wazuh-api-3.2.1-1.x86_64
--> Finished Dependency Resolution
Error: Package: wazuh-api-3.2.1-1.x86_64 (wazuh)
Requires: nodejs >= 4.6
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************

Error: Package: wazuh-api-3.2.1-1.x86_64 (wazuh)
Requires: nodejs >= 4.6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

NOdeJS is installed:

rh-nodejs8-nodejs-8.9.4-2.el7.x86_64
rh-nodejs8-runtime-3.0-3.el7.x86_64
rh-nodejs8-npm-5.6.0-8.9.4.2.el7.x86_64

On the other side, trying to install from source it doesn't works also:

### Wazuh API ###
cat: ./package.json: No such file or directory

Installing Wazuh API from current directory.

Installing API ['/var/ossec/api'].
Error executing command: 'cp --parents -r app.js configuration controllers examples helpers models package.json scripts /var/ossec/api'.

What does it mean this error?

Thanks.

jua...@wazuh.com

unread,
Apr 9, 2018, 5:07:55 AM4/9/18
to Wazuh mailing list
Hello C. L. Martinez,

The wazuh-api package requires the nodejs dependency, available through the official Node.js repositories. We do this to achieve the maximum compatibility between different Operating Systems, so we can provide an easier installation process with the same Node.js binaries.

You can use the following commands on your machine to install the official Node.js 6.x repo for RPM-based distributions:
curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -
sudo yum
-y install nodejs

Alternatively, Wazuh API is compatible with Node.js 8, so you can use the 8.x repository:
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo yum
-y install nodejs

There's another option that you can use, the installation from sources. You can read more about it inour documentation: https://documentation.wazuh.com/current/installation-guide/installing-wazuh-server/sources_installation.html#installing-wazuh-api

This installation method doesn't check your current Node.js version, so you can also try to install the RedHat packages and later, the Wazuh API from sources.

In addition to this, I will talk with the Wazuh development team to research about the possibility to add the RedHat Node.js packages to our compatible, required dependencies, so thanks for your report and feedback, it's always really appreciated!

If you still have more questions, don't hesitate to open a new thread.

Regards,
Juanjo

C. L. Martinez

unread,
Apr 9, 2018, 5:21:45 AM4/9/18
to jua...@wazuh.com, Wazuh mailing list
Thanks Juanjo, but trying to install from source code returns the following error:


### Wazuh API ###
cat: ./package.json: No such file or directory

Installing Wazuh API from current directory.

Installing API ['/var/ossec/api'].
Error executing command: 'cp --parents -r app.js configuration controllers examples helpers models package.json scripts /var/ossec/api'.

--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/8313cdcc-70bd-4ff3-8602-2566c201a673%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jua...@wazuh.com

unread,
Apr 10, 2018, 4:17:05 AM4/10/18
to Wazuh mailing list
Hello again C. L. Martinez,

Let's try to install the API from sources in a different way. In our documentation, we provide steps to only download the installation script and execute it with a specific parameter, but we can also clone the entire repository:

(The following commands need to be executed as superuser)

1. Clone the Wazuh API repository and change to the latest release tag:
git clone https://github.com/wazuh/wazuh-api.git
cd wazuh
-api/
git checkout v3
.2.1

2. Grant execution permissions to the installation script:
chmod +x install_api.sh

3. Start the installation process:
./install_api.sh

Now you can try if the install went well:
curl -u foo:bar localhost:55000/?pretty

Please let me know about the results. Thanks for your patience.

Regards,
Juanjo
Reply all
Reply to author
Forward
0 new messages