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;
|
|
|
|
|
|
|
|
<!ENTITY nodejs-download-http "https://github.com/nodejs/node/archive/v&nodejs-version;.tar.gz">
|
|
|
|
<!ENTITY nodejs-download-ftp " ">
|
|
|
|
<!ENTITY nodejs-md5sum "cef1dc78e5e4bdeb875fce58baa10a7d">
|
|
|
|
<!ENTITY nodejs-size "45 MB">
|
|
|
|
<!ENTITY nodejs-buildsize "483 MB">
|
|
|
|
<!ENTITY nodejs-time "10.5 SBU">
|
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
|
|
|
|
<?dbhtml filename="nodejs.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy: $</othername>
|
|
|
|
<date>$Date: $</date>
|
|
|
|
</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>
|
|
|
|
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
The <application>Node.js</application> source tarball shown above
|
|
|
|
downloads with the correct name, node-&nodejs-version;.tar.gz,
|
|
|
|
if using a browser such as Firefox. If you prefer to use a command line
|
|
|
|
program such as wget, you normally would obtain
|
|
|
|
v&nodejs-version;.tar.gz. To obtain this package with the proper
|
|
|
|
filename, run:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<screen><userinput>wget -c https://github.com/nodejs/node/archive/v&nodejs-version;.tar.gz \
|
|
|
|
-O node-&nodejs-version;.tar.gz</userinput></screen>
|
|
|
|
|
|
|
|
</note>
|
|
|
|
|
|
|
|
<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">
|
|
|
|
<xref linkend="c-ares"/>, and
|
|
|
|
<!-- <xref linkend="icu"/>, and -->
|
|
|
|
<xref linkend="openssl"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
|
|
|
<xref linkend="icu"/> (currently broken),
|
|
|
|
<ulink url="https://github.com/nodejs/http-parser">http-parser</ulink>,
|
|
|
|
<ulink url="https://github.com/libuv/libuv">libuv</ulink>, and
|
|
|
|
<ulink url="https://www.npmjs.com/">npm</ulink>, (internal versions of
|
|
|
|
these packages will be used if they are not present)
|
|
|
|
</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>
|
|
|
|
|
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
|
|
|
--shared-cares \
|
|
|
|
--shared-openssl \
|
|
|
|
--shared-zlib \
|
2017-05-04 15:23:15 +08:00
|
|
|
--with-intl=small-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-04 15:23:15 +08:00
|
|
|
<para><parameter>--with-intl=small-icu</parameter>: build a local, but
|
2017-04-23 15:06:22 +08:00
|
|
|
small copy of <application>icu</application>. Other values are
|
2017-05-04 15:23:15 +08:00
|
|
|
<option>full-icu</option> (to build a full <application>icu</application>
|
2017-04-23 15:06:22 +08:00
|
|
|
library) and <option>system-icu</option> (to use the system
|
|
|
|
<application>icu</application>).</para>
|
|
|
|
|
|
|
|
<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>
|
|
|
|
<para>is the installaton root for Node.js executables and
|
|
|
|
libraries.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|