Linux under Zeromq.js installation

Source: Internet
Author: User

This article mainly elaborates the method and the step that installs the Zeromq.js in the offline environment. Zeromq.js:

Https://www.npmjs.com/package/zeromq or

Https://github.com/zeromq/zeromq.js
Due to LAN network limitations, plus the installation instructions on GitHub are too simple, it can only be installed after the successful installation of the networked machine and then uploading the node_mudules to the LAN server.
Prerequisites: Node has been installed, g++ more than 4.8, PYTHON2.7,ZEROMQ 4.1.6 has been installed, networking environment and LAN environment best consistent, otherwise there will be unexpected errors.

The following two steps are mainly divided into:

#联网情况下:
Using the system installed ZMQ installation, pre-set two variables, that is, specify the system's original ZMQ installation path (Zeromqdir for the actual ZEROMQ installation path) header files and dynamic library path, etc.:
Export cxxflags= "-I $ (readlink-f zeromqdir/include)"
Export ldflags= "-L $ (readlink-f zeromqdir/.libs)-wl,-rpath=$ (readlink-f zeromqdir/.libs)"
Execute command: NPM install--zmq-external, will print the appropriate information after successful installation.
Package The node_mudules after the execution is finished. Tar zcvf node_modules.tar.gz node_mudules/
#移植到内部网
Prerequisites: Node has been installed, g++ more than 4.8, Python2.7.
Upload and unzip the node_modules.tar.gz, modify the relevant files, and then compile the Zmq.node dynamic library, you need to modify the relevant files:
Enter the Node_modules/zeromq/build directory, edit the makefile, modify the original wrong node path, edit the zmq.target.mk, and modify the same
Node's include path, otherwise it will error. Modify the Nodedir item in the Config.gypi file as the actual path and delete all files under the original release directory.
Using the system installed ZMQ installation, pre-set two variables, that is, specify the original ZMQ installation path of the system header file and the path of the dynamic library, etc.:
Export cxxflags= "-I $ (readlink-f zeromqdir/include)"
Export ldflags= "-L $ (readlink-f zeromqdir/.libs)-wl,-rpath=$ (readlink-f zeromqdir/.libs)"
Then execute the make command in the build directory, and the installation succeeds, and you can see that the Zmq.node file is generated in the release directory, which is a dynamic library and can be seen by the LDD command linked to
ZMQ Dynamic Library of the system.

Linux under Zeromq.js installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.