[4464d405] | 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 |
|
---|
[2d4d59a] | 7 | <!ENTITY nodejs-download-http "https://nodejs.org/dist/v&nodejs-version;/node-v&nodejs-version;.tar.xz">
|
---|
[4464d405] | 8 | <!ENTITY nodejs-download-ftp " ">
|
---|
[223a2fa] | 9 | <!ENTITY nodejs-md5sum "0483d8d477b33fce65fd8cfbded088ca">
|
---|
[d514a90] | 10 | <!ENTITY nodejs-size "32 MB">
|
---|
[223a2fa] | 11 | <!ENTITY nodejs-buildsize "727 MB (add 16 MB for tests)">
|
---|
[d281a04e] | 12 | <!ENTITY nodejs-time "11 SBU (using parallelism=4; add 2.0 SBU for tests)">
|
---|
[223a2fa] | 13 | <!-- time might be longer on intel, on AMD the initial LFS SBU is very slow -->
|
---|
[4464d405] | 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
|
---|
| 17 | <?dbhtml filename="nodejs.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
[542d478] | 20 | <date>$Date$</date>
|
---|
[4464d405] | 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 |
|
---|
[9029db2] | 38 | &lfs101_checked;
|
---|
[4464d405] | 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 |
|
---|
[b01309e7] | 74 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 75 | <itemizedlist spacing="compact">
|
---|
| 76 | <listitem>
|
---|
| 77 | <para>
|
---|
| 78 | Required patch:
|
---|
| 79 | <ulink url="&patch-root;/node-v&nodejs-version;-icu_69-1.patch"/>
|
---|
| 80 | </para>
|
---|
| 81 | </listitem>
|
---|
| 82 | </itemizedlist>
|
---|
| 83 |
|
---|
[d122e9f2] | 84 | <!--<note>
|
---|
[bbaebd0] | 85 | <para>
|
---|
| 86 | This tarball was created using a BSD version of
|
---|
| 87 | <application>tar</application> and extracting it with a linux™
|
---|
| 88 | version will produce harmless warnings about unknown extended header
|
---|
| 89 | keywords.
|
---|
| 90 | </para>
|
---|
[d122e9f2] | 91 | </note>-->
|
---|
[bbaebd0] | 92 |
|
---|
[4464d405] | 93 | <bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
|
---|
| 94 |
|
---|
| 95 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 96 | <para role="required">
|
---|
[ff136571] | 97 | <xref linkend="which"/>
|
---|
[4464d405] | 98 | </para>
|
---|
| 99 |
|
---|
| 100 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 101 | <para role="recommended">
|
---|
[bbaebd0] | 102 | <xref linkend="c-ares"/>,
|
---|
[52e582c9] | 103 | <xref linkend="icu"/>,
|
---|
| 104 | <xref linkend="libuv"/>, and
|
---|
| 105 | <xref linkend="nghttp2"/>
|
---|
[4464d405] | 106 | </para>
|
---|
| 107 |
|
---|
| 108 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 109 | <para role="optional">
|
---|
[ee1676a] | 110 | <ulink url="https://github.com/nodejs/http-parser">http-parser</ulink> and
|
---|
[f02583f] | 111 | <ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
|
---|
| 112 | <command>npm</command> will be installed if not present)
|
---|
[4464d405] | 113 | </para>
|
---|
| 114 |
|
---|
| 115 | <para condition="html" role="usernotes">
|
---|
| 116 | User Notes: <ulink url="&blfs-wiki;/nodejs"/>
|
---|
| 117 | </para>
|
---|
| 118 |
|
---|
| 119 | </sect2>
|
---|
| 120 |
|
---|
| 121 | <sect2 role="installation">
|
---|
| 122 | <title>Installation of Node.js</title>
|
---|
| 123 |
|
---|
[b01309e7] | 124 | <!-- needed for ICU-69.1 -->
|
---|
| 125 | <para>
|
---|
| 126 | First, fix the build with system ICU:
|
---|
| 127 | </para>
|
---|
| 128 |
|
---|
| 129 | <screen><userinput remap="pre">patch -Np1 -i ../node-v&nodejs-version;-icu_69-1.patch</userinput></screen>
|
---|
| 130 |
|
---|
[4464d405] | 131 | <para>
|
---|
| 132 | Build <application>Node.js</application> by running the following
|
---|
| 133 | commands:
|
---|
| 134 | </para>
|
---|
| 135 |
|
---|
[ce508efa] | 136 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 137 | --shared-cares \
|
---|
[bbaebd0] | 138 | --shared-libuv \
|
---|
[ce508efa] | 139 | --shared-openssl \
|
---|
[52e582c9] | 140 | --shared-nghttp2 \
|
---|
[ce508efa] | 141 | --shared-zlib \
|
---|
[f4327ad9] | 142 | --with-intl=system-icu &&
|
---|
[4464d405] | 143 | make</userinput></screen>
|
---|
| 144 |
|
---|
[d56e7df] | 145 | <para>
|
---|
[ee1676a] | 146 | To test the results, issue: <command>make test-only</command>.
|
---|
| 147 | <!--One test, test-dns, is known to fail.-->
|
---|
| 148 | <!-- When using make check, a module is used that wasn't shipped properly
|
---|
| 149 | with the 12.16.2 release. See Ticket #13379 for details. We should
|
---|
| 150 | probably restore "make check" after the next version of Node.js.
|
---|
| 151 | This new command skips the documentation and lint checks. -renodr-->
|
---|
[6914a417] | 152 | </para>
|
---|
[4464d405] | 153 |
|
---|
| 154 | <para>
|
---|
| 155 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 156 | </para>
|
---|
| 157 |
|
---|
| 158 | <screen role="root"><userinput>make install &&
|
---|
| 159 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
| 160 | </sect2>
|
---|
| 161 |
|
---|
| 162 | <sect2 role="commands">
|
---|
| 163 | <title>Command Explanations</title>
|
---|
| 164 |
|
---|
[d56e7df] | 165 | <para>
|
---|
[6cbbb2d] | 166 | <parameter>--with-intl=system-icu</parameter>: use the system version
|
---|
[d56e7df] | 167 | of <application>icu</application>. Other values are
|
---|
| 168 | <option>full-icu</option> (to build a local, full
|
---|
| 169 | <application>icu</application> library) and <option>small-icu</option>
|
---|
| 170 | (to build a local, minimal <application>icu</application> library).
|
---|
| 171 | </para>
|
---|
[4464d405] | 172 |
|
---|
[d56e7df] | 173 | <para>
|
---|
[087639a] | 174 | <!-- FIXME : reinstate nghttp2 in this if build is fixed
|
---|
| 175 | FIXME cont: Seems to be fixed in 12.18.1 -renodr
|
---|
[f518066] | 176 | <parameter>\-\-shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>: -->
|
---|
[087639a] | 177 | <parameter>--shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>:
|
---|
[d56e7df] | 178 | use the system installed libraries instead of local copies.
|
---|
| 179 | </para>
|
---|
[4464d405] | 180 |
|
---|
[d56e7df] | 181 | <para>
|
---|
| 182 | <option>--without-npm</option>: do not build
|
---|
| 183 | <application>npm</application> (use if you'd like to build a separate
|
---|
| 184 | <application>npm</application> later).
|
---|
| 185 | </para>
|
---|
[4464d405] | 186 |
|
---|
[d56e7df] | 187 | <para>
|
---|
| 188 | <option>--shared-http-parser</option>: use the system
|
---|
| 189 | installed library instead of a local copy.
|
---|
| 190 | </para>
|
---|
[4464d405] | 191 |
|
---|
| 192 | </sect2>
|
---|
| 193 |
|
---|
| 194 | <sect2 role="content">
|
---|
| 195 | <title>Contents</title>
|
---|
| 196 |
|
---|
| 197 | <segmentedlist>
|
---|
| 198 | <segtitle>Installed Programs</segtitle>
|
---|
| 199 | <segtitle>Installed Library</segtitle>
|
---|
| 200 | <segtitle>Installed Directories</segtitle>
|
---|
| 201 |
|
---|
| 202 | <seglistitem>
|
---|
| 203 | <seg>
|
---|
[d4e93ea2] | 204 | node, npm, and npx
|
---|
[4464d405] | 205 | </seg>
|
---|
| 206 | <seg>
|
---|
| 207 | None
|
---|
| 208 | </seg>
|
---|
| 209 | <seg>
|
---|
[6a43232] | 210 | /usr/include/node,
|
---|
[ee1676a] | 211 | /usr/lib/node_modules/npm,
|
---|
| 212 | /usr/share/doc/{node,node-&nodejs-version;}, and
|
---|
[6a43232] | 213 | /usr/share/systemtap/tapset
|
---|
[4464d405] | 214 | </seg>
|
---|
| 215 | </seglistitem>
|
---|
| 216 | </segmentedlist>
|
---|
| 217 |
|
---|
| 218 | <variablelist>
|
---|
| 219 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 220 | <?dbfo list-presentation="list"?>
|
---|
| 221 | <?dbhtml list-presentation="table"?>
|
---|
| 222 |
|
---|
| 223 | <varlistentry id="node">
|
---|
| 224 | <term><command>node</command></term>
|
---|
| 225 | <listitem>
|
---|
| 226 | <para>
|
---|
[4c24eb0a] | 227 | is the server-side JavaScript runtime
|
---|
[4464d405] | 228 | </para>
|
---|
| 229 | <indexterm zone="nodejs node">
|
---|
| 230 | <primary sortas="b-node">node</primary>
|
---|
| 231 | </indexterm>
|
---|
| 232 | </listitem>
|
---|
| 233 | </varlistentry>
|
---|
| 234 |
|
---|
| 235 | <varlistentry id="npm">
|
---|
| 236 | <term><command>npm</command></term>
|
---|
| 237 | <listitem>
|
---|
| 238 | <para>
|
---|
[4c24eb0a] | 239 | is the <application>Node.js</application> package manager
|
---|
[4464d405] | 240 | </para>
|
---|
| 241 | <indexterm zone="nodejs npm">
|
---|
| 242 | <primary sortas="b-npm">npm</primary>
|
---|
| 243 | </indexterm>
|
---|
| 244 | </listitem>
|
---|
| 245 | </varlistentry>
|
---|
| 246 |
|
---|
| 247 | <varlistentry>
|
---|
[4c24eb0a] | 248 | <term>
|
---|
| 249 | <filename class="directory">/usr/lib/node_modules/npm/</filename>
|
---|
| 250 | </term>
|
---|
[4464d405] | 251 | <listitem>
|
---|
[d56e7df] | 252 | <para>
|
---|
[4c24eb0a] | 253 | is the installation root for Node.js executables and libraries
|
---|
[d56e7df] | 254 | </para>
|
---|
[4464d405] | 255 | </listitem>
|
---|
| 256 | </varlistentry>
|
---|
| 257 |
|
---|
| 258 | </variablelist>
|
---|
| 259 |
|
---|
| 260 | </sect2>
|
---|
| 261 |
|
---|
| 262 | </sect1>
|
---|