2017-04-23 15:06:22 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2017-06-22 11:06:05 +08:00
|
|
|
<!ENTITY nodejs-download-http "https://nodejs.org/dist/v&nodejs-version;/node-v&nodejs-version;.tar.gz">
|
2017-04-23 15:06:22 +08:00
|
|
|
<!ENTITY nodejs-download-ftp " ">
|
2017-07-31 00:16:18 +08:00
|
|
|
<!ENTITY nodejs-md5sum "0da0b59a6afb0e14bad05d6198dcd64a">
|
|
|
|
<!ENTITY nodejs-size "18 MB">
|
|
|
|
<!ENTITY nodejs-buildsize "339 MB">
|
|
|
|
<!ENTITY nodejs-time "7.4 SBU">
|
2017-04-23 15:06:22 +08:00
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
|
|
|
|
<?dbhtml filename="nodejs.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
2017-07-04 12:41:37 +08:00
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
2017-04-23 15:06:22 +08:00
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>Node.js-&nodejs-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="nodejs">
|
|
|
|
<primary sortas="a-nodejs">nodejs</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to Node.js</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<application>Node.js</application> is a
|
|
|
|
<application>JavaScript</application> runtime built on
|
|
|
|
<application>Chrome's</application> V8 JavaScript engine.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
&lfs80_checked;
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&nodejs-download-http;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&nodejs-download-ftp;"/>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download MD5 sum: &nodejs-md5sum;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Download size: &nodejs-size;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Estimated disk space required: &nodejs-buildsize;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Estimated build time: &nodejs-time;
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
|
|
<para role="required">
|
|
|
|
<xref linkend="python2"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
|
|
<para role="recommended">
|
2017-05-06 14:29:54 +08:00
|
|
|
<xref linkend="c-ares"/>,
|
|
|
|
<xref linkend="icu"/>, and
|
2017-06-04 06:32:28 +08:00
|
|
|
<xref linkend="openssl10"/>
|
2017-04-23 15:06:22 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
|
|
|
<ulink url="https://github.com/nodejs/http-parser">http-parser</ulink>,
|
|
|
|
<ulink url="https://github.com/libuv/libuv">libuv</ulink>, and
|
2017-07-31 00:16:18 +08:00
|
|
|
<ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
|
|
|
|
<command>npm</command> will be installed if not present)
|
2017-04-23 15:06:22 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para condition="html" role="usernotes">
|
|
|
|
User Notes: <ulink url="&blfs-wiki;/nodejs"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Node.js</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Build <application>Node.js</application> by running the following
|
|
|
|
commands:
|
|
|
|
</para>
|
|
|
|
|
2017-06-04 06:32:28 +08:00
|
|
|
<screen><userinput>PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig \
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
--shared-cares \
|
|
|
|
--shared-openssl \
|
|
|
|
--shared-zlib \
|
|
|
|
--with-intl=system-icu &&
|
2017-04-23 15:06:22 +08:00
|
|
|
make</userinput></screen>
|
|
|
|
|
|
|
|
<para>This package does not come with a test suite.</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>make install &&
|
|
|
|
ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2017-05-06 14:29:54 +08:00
|
|
|
<para><parameter>--with-intl=system-icu</parameter>: use the system version
|
|
|
|
of <application>icu</application>. Other values are
|
|
|
|
<option>full-icu</option> (to build a local, full
|
|
|
|
<application>icu</application> library) and <option>small-icu</option> (to
|
|
|
|
to build a local, minimal <application>icu</application> library).</para>
|
2017-04-23 15:06:22 +08:00
|
|
|
|
|
|
|
<para><parameter>--shared-{cares,openssl,zlib}</parameter>: use the system
|
|
|
|
installed libraries instead of local copies.</para>
|
|
|
|
|
|
|
|
<para><option>--without-npm</option>: do not build
|
|
|
|
<application>npm</application> (use if you'd like to build a separate
|
|
|
|
<application>npm</application> later).</para>
|
|
|
|
|
|
|
|
<para><option>--shared-{http-parser,libuv}</option>: use the system
|
|
|
|
installed libraries instead of local copies.</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Library</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>
|
|
|
|
/usr/bin/node and /usr/bin/npm
|
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
None
|
|
|
|
</seg>
|
|
|
|
<seg>
|
|
|
|
/usr/lib/node_modules/npm/
|
|
|
|
</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="node">
|
|
|
|
<term><command>node</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
is the server-side JavaScript runtime.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="nodejs node">
|
|
|
|
<primary sortas="b-node">node</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="npm">
|
|
|
|
<term><command>npm</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
is the <application>Node.js</application> package manager.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="nodejs npm">
|
|
|
|
<primary sortas="b-npm">npm</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><filename class='directory'>/usr/lib/node_modules/npm/</filename></term>
|
|
|
|
<listitem>
|
2017-07-04 12:41:37 +08:00
|
|
|
<para>is the installation root for Node.js executables and
|
2017-04-23 15:06:22 +08:00
|
|
|
libraries.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|