1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY nodejs-download-http "https://nodejs.org/dist/v&nodejs-version;/node-v&nodejs-version;.tar.xz">
|
---|
8 | <!ENTITY nodejs-download-ftp " ">
|
---|
9 | <!ENTITY nodejs-md5sum "e0299d7be20a2c8d5dd932f8494b072b">
|
---|
10 | <!ENTITY nodejs-size "22 MB">
|
---|
11 | <!ENTITY nodejs-buildsize "587 MB (add 39 MB for tests)">
|
---|
12 | <!ENTITY nodejs-time "7.8 SBU (using parallelism=4; add 2.4 SBU for tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
|
---|
16 | <?dbhtml filename="nodejs.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>Node.js-&nodejs-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="nodejs">
|
---|
26 | <primary sortas="a-nodejs">nodejs</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to Node.js</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | <application>Node.js</application> is a
|
---|
34 | <application>JavaScript</application> runtime built on
|
---|
35 | <application>Chrome's</application> V8 JavaScript engine.
|
---|
36 | </para>
|
---|
37 |
|
---|
38 | &lfs90_checked;
|
---|
39 |
|
---|
40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
41 | <itemizedlist spacing="compact">
|
---|
42 | <listitem>
|
---|
43 | <para>
|
---|
44 | Download (HTTP): <ulink url="&nodejs-download-http;"/>
|
---|
45 | </para>
|
---|
46 | </listitem>
|
---|
47 | <listitem>
|
---|
48 | <para>
|
---|
49 | Download (FTP): <ulink url="&nodejs-download-ftp;"/>
|
---|
50 | </para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>
|
---|
54 | Download MD5 sum: &nodejs-md5sum;
|
---|
55 | </para>
|
---|
56 | </listitem>
|
---|
57 | <listitem>
|
---|
58 | <para>
|
---|
59 | Download size: &nodejs-size;
|
---|
60 | </para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>
|
---|
64 | Estimated disk space required: &nodejs-buildsize;
|
---|
65 | </para>
|
---|
66 | </listitem>
|
---|
67 | <listitem>
|
---|
68 | <para>
|
---|
69 | Estimated build time: &nodejs-time;
|
---|
70 | </para>
|
---|
71 | </listitem>
|
---|
72 | </itemizedlist>
|
---|
73 |
|
---|
74 | <note>
|
---|
75 | <para>
|
---|
76 | This tarball was created using a BSD version of
|
---|
77 | <application>tar</application> and extracting it with a linux™
|
---|
78 | version will produce harmless warnings about unknown extended header
|
---|
79 | keywords.
|
---|
80 | </para>
|
---|
81 | </note>
|
---|
82 |
|
---|
83 | <bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
|
---|
84 |
|
---|
85 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
86 | <para role="required">
|
---|
87 | <xref linkend="python2"/> and
|
---|
88 | <xref linkend="which"/>
|
---|
89 | </para>
|
---|
90 |
|
---|
91 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
92 | <para role="recommended">
|
---|
93 | <xref linkend="c-ares"/>,
|
---|
94 | <xref linkend="icu"/>,
|
---|
95 | <xref linkend="libuv"/>, and
|
---|
96 | <xref linkend="nghttp2"/>
|
---|
97 | </para>
|
---|
98 |
|
---|
99 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
100 | <para role="optional">
|
---|
101 | <ulink url="https://github.com/nodejs/http-parser">http-parser</ulink>,
|
---|
102 | <ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
|
---|
103 | <command>npm</command> will be installed if not present)
|
---|
104 | </para>
|
---|
105 |
|
---|
106 | <para condition="html" role="usernotes">
|
---|
107 | User Notes: <ulink url="&blfs-wiki;/nodejs"/>
|
---|
108 | </para>
|
---|
109 |
|
---|
110 | </sect2>
|
---|
111 |
|
---|
112 | <sect2 role="installation">
|
---|
113 | <title>Installation of Node.js</title>
|
---|
114 |
|
---|
115 | <para>
|
---|
116 | Build <application>Node.js</application> by running the following
|
---|
117 | commands:
|
---|
118 | </para>
|
---|
119 |
|
---|
120 | <screen><userinput>./configure --prefix=/usr \
|
---|
121 | --shared-cares \
|
---|
122 | --shared-libuv \
|
---|
123 | --shared-nghttp2 \
|
---|
124 | --shared-openssl \
|
---|
125 | --shared-zlib \
|
---|
126 | --with-intl=system-icu &&
|
---|
127 | make</userinput></screen>
|
---|
128 |
|
---|
129 | <para>
|
---|
130 | To test the results, issue: <command>make check</command>.
|
---|
131 | One test, test-dns, is known to fail.
|
---|
132 | </para>
|
---|
133 |
|
---|
134 | <para>
|
---|
135 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
136 | </para>
|
---|
137 |
|
---|
138 | <screen role="root"><userinput>make install &&
|
---|
139 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
140 | </sect2>
|
---|
141 |
|
---|
142 | <sect2 role="commands">
|
---|
143 | <title>Command Explanations</title>
|
---|
144 |
|
---|
145 | <para><parameter>--with-intl=system-icu</parameter>: use the system version
|
---|
146 | of <application>icu</application>. Other values are
|
---|
147 | <option>full-icu</option> (to build a local, full
|
---|
148 | <application>icu</application> library) and <option>small-icu</option> (to
|
---|
149 | to build a local, minimal <application>icu</application> library).</para>
|
---|
150 |
|
---|
151 | <para><parameter>--shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>:
|
---|
152 | use the system installed libraries instead of local copies.</para>
|
---|
153 |
|
---|
154 | <para><option>--without-npm</option>: do not build
|
---|
155 | <application>npm</application> (use if you'd like to build a separate
|
---|
156 | <application>npm</application> later).</para>
|
---|
157 |
|
---|
158 | <para><option>--shared-http-parser</option>: use the system
|
---|
159 | installed library instead of a local copy.</para>
|
---|
160 |
|
---|
161 | </sect2>
|
---|
162 |
|
---|
163 | <sect2 role="content">
|
---|
164 | <title>Contents</title>
|
---|
165 |
|
---|
166 | <segmentedlist>
|
---|
167 | <segtitle>Installed Programs</segtitle>
|
---|
168 | <segtitle>Installed Library</segtitle>
|
---|
169 | <segtitle>Installed Directories</segtitle>
|
---|
170 |
|
---|
171 | <seglistitem>
|
---|
172 | <seg>
|
---|
173 | node, npm, and npx
|
---|
174 | </seg>
|
---|
175 | <seg>
|
---|
176 | None
|
---|
177 | </seg>
|
---|
178 | <seg>
|
---|
179 | /usr/include/node,
|
---|
180 | /usr/lib/node_modules/npm, and
|
---|
181 | /usr/share/systemtap/tapset
|
---|
182 | </seg>
|
---|
183 | </seglistitem>
|
---|
184 | </segmentedlist>
|
---|
185 |
|
---|
186 | <variablelist>
|
---|
187 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
188 | <?dbfo list-presentation="list"?>
|
---|
189 | <?dbhtml list-presentation="table"?>
|
---|
190 |
|
---|
191 | <varlistentry id="node">
|
---|
192 | <term><command>node</command></term>
|
---|
193 | <listitem>
|
---|
194 | <para>
|
---|
195 | is the server-side JavaScript runtime.
|
---|
196 | </para>
|
---|
197 | <indexterm zone="nodejs node">
|
---|
198 | <primary sortas="b-node">node</primary>
|
---|
199 | </indexterm>
|
---|
200 | </listitem>
|
---|
201 | </varlistentry>
|
---|
202 |
|
---|
203 | <varlistentry id="npm">
|
---|
204 | <term><command>npm</command></term>
|
---|
205 | <listitem>
|
---|
206 | <para>
|
---|
207 | is the <application>Node.js</application> package manager.
|
---|
208 | </para>
|
---|
209 | <indexterm zone="nodejs npm">
|
---|
210 | <primary sortas="b-npm">npm</primary>
|
---|
211 | </indexterm>
|
---|
212 | </listitem>
|
---|
213 | </varlistentry>
|
---|
214 |
|
---|
215 | <varlistentry>
|
---|
216 | <term><filename class='directory'>/usr/lib/node_modules/npm/</filename></term>
|
---|
217 | <listitem>
|
---|
218 | <para>is the installation root for Node.js executables and
|
---|
219 | libraries.</para>
|
---|
220 | </listitem>
|
---|
221 | </varlistentry>
|
---|
222 |
|
---|
223 | </variablelist>
|
---|
224 |
|
---|
225 | </sect2>
|
---|
226 |
|
---|
227 | </sect1>
|
---|