[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[4464d405] | 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 " ">
|
---|
[99ebfa12] | 9 | <!ENTITY nodejs-md5sum "d12466cd0e03e317e5e435f8c83d581f">
|
---|
[2a406a80] | 10 | <!ENTITY nodejs-size "40 MB">
|
---|
[99ebfa12] | 11 | <!ENTITY nodejs-buildsize "967 MB (add 44 MB for tests)">
|
---|
| 12 | <!ENTITY nodejs-time "11 SBU (add 2.4 SBU for tests: both using parallelism=8 and 8 CPUs online, parts of the tests will use all online CPUs)">
|
---|
[4464d405] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
|
---|
| 16 | <?dbhtml filename="nodejs.html"?>
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | <title>Node.js-&nodejs-version;</title>
|
---|
| 20 |
|
---|
| 21 | <indexterm zone="nodejs">
|
---|
| 22 | <primary sortas="a-nodejs">nodejs</primary>
|
---|
| 23 | </indexterm>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="package">
|
---|
| 26 | <title>Introduction to Node.js</title>
|
---|
| 27 |
|
---|
| 28 | <para>
|
---|
| 29 | <application>Node.js</application> is a
|
---|
| 30 | <application>JavaScript</application> runtime built on
|
---|
[8558044] | 31 | <application>Chrome's</application> V8 JavaScript engine.
|
---|
[4464d405] | 32 | </para>
|
---|
| 33 |
|
---|
[f67c5c8] | 34 | &lfs121_checked;
|
---|
[4464d405] | 35 |
|
---|
| 36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 37 | <itemizedlist spacing="compact">
|
---|
| 38 | <listitem>
|
---|
| 39 | <para>
|
---|
| 40 | Download (HTTP): <ulink url="&nodejs-download-http;"/>
|
---|
| 41 | </para>
|
---|
| 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>
|
---|
| 45 | Download (FTP): <ulink url="&nodejs-download-ftp;"/>
|
---|
| 46 | </para>
|
---|
| 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>
|
---|
| 50 | Download MD5 sum: &nodejs-md5sum;
|
---|
| 51 | </para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>
|
---|
| 55 | Download size: &nodejs-size;
|
---|
| 56 | </para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>
|
---|
| 60 | Estimated disk space required: &nodejs-buildsize;
|
---|
| 61 | </para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>
|
---|
| 65 | Estimated build time: &nodejs-time;
|
---|
| 66 | </para>
|
---|
| 67 | </listitem>
|
---|
| 68 | </itemizedlist>
|
---|
[25ef5f7] | 69 |
|
---|
[dda8ca6] | 70 | <!--
|
---|
[b01309e7] | 71 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 72 | <itemizedlist spacing="compact">
|
---|
| 73 | <listitem>
|
---|
| 74 | <para>
|
---|
| 75 | Required patch:
|
---|
| 76 | <ulink url="&patch-root;/node-v&nodejs-version;-icu_69-1.patch"/>
|
---|
| 77 | </para>
|
---|
| 78 | </listitem>
|
---|
| 79 | </itemizedlist>
|
---|
[dda8ca6] | 80 | -->
|
---|
[25ef5f7] | 81 |
|
---|
[4464d405] | 82 | <bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
|
---|
| 83 |
|
---|
| 84 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 85 | <para role="required">
|
---|
[8558044] | 86 | <xref linkend="which"/>
|
---|
[4464d405] | 87 | </para>
|
---|
| 88 |
|
---|
| 89 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 90 | <para role="recommended">
|
---|
[d0212021] | 91 | <xref linkend="brotli"/>,
|
---|
[bbaebd0] | 92 | <xref linkend="c-ares"/>,
|
---|
[52e582c9] | 93 | <xref linkend="icu"/>,
|
---|
| 94 | <xref linkend="libuv"/>, and
|
---|
| 95 | <xref linkend="nghttp2"/>
|
---|
[4464d405] | 96 | </para>
|
---|
| 97 |
|
---|
| 98 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 99 | <para role="optional">
|
---|
[ee1676a] | 100 | <ulink url="https://github.com/nodejs/http-parser">http-parser</ulink> and
|
---|
[f02583f] | 101 | <ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
|
---|
| 102 | <command>npm</command> will be installed if not present)
|
---|
[4464d405] | 103 | </para>
|
---|
| 104 |
|
---|
| 105 |
|
---|
| 106 | </sect2>
|
---|
| 107 |
|
---|
| 108 | <sect2 role="installation">
|
---|
| 109 | <title>Installation of Node.js</title>
|
---|
| 110 |
|
---|
[d0212021] | 111 | <!--
|
---|
[73ac81b] | 112 | <para>
|
---|
| 113 | If Python-3.12 is installed, fix the <command>configure</command> script:
|
---|
| 114 | </para>
|
---|
| 115 |
|
---|
| 116 | <screen><userinput>sed -e '/python3.11/i command -v python3.12 >/dev/null && exec python3.12 "$0" "$@"' \
|
---|
| 117 | -e '/3, 11/s/\(.3, 11.\)/(3, 12), \1/' \
|
---|
| 118 | -i configure</userinput></screen>
|
---|
[d0212021] | 119 | -->
|
---|
[73ac81b] | 120 |
|
---|
[4464d405] | 121 | <para>
|
---|
| 122 | Build <application>Node.js</application> by running the following
|
---|
| 123 | commands:
|
---|
| 124 | </para>
|
---|
| 125 |
|
---|
[de66d05] | 126 | <screen><userinput>./configure --prefix=/usr \
|
---|
[d0212021] | 127 | --shared-brotli \
|
---|
[ccec040c] | 128 | --shared-cares \
|
---|
| 129 | --shared-libuv \
|
---|
| 130 | --shared-openssl \
|
---|
| 131 | --shared-nghttp2 \
|
---|
| 132 | --shared-zlib \
|
---|
| 133 | --with-intl=system-icu &&
|
---|
[4464d405] | 134 | make</userinput></screen>
|
---|
| 135 |
|
---|
[d56e7df] | 136 | <para>
|
---|
[ee1676a] | 137 | To test the results, issue: <command>make test-only</command>.
|
---|
[99ebfa12] | 138 | Out of 4043 tests, 31 in the 'parallel' test suite are known to fail.
|
---|
[9bea06a] | 139 | <!--
|
---|
| 140 | Failed tests:
|
---|
[a1492906] | 141 | out/Release/node - -tls-min-v1.0 /build/node/node-v18.18.2/test/parallel/test-https-agent-session-eviction.js
|
---|
| 142 | out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-alert.js
|
---|
| 143 | out/Release/node - -tls-max-v1.2 /build/node/node-v18.18.2/test/parallel/test-tls-cli-max-version-1.2.js
|
---|
| 144 | out/Release/node - -tls-max-v1.3 /build/node/node-v18.18.2/test/parallel/test-tls-cli-max-version-1.3.js
|
---|
| 145 | out/Release/node - -tls-min-v1.1 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.1.js
|
---|
| 146 | out/Release/node - -tls-min-v1.2 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.2.js
|
---|
| 147 | out/Release/node - -tls-min-v1.3 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.3.js
|
---|
| 148 | out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-getprotocol.js
|
---|
| 149 | out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-min-max-version.js
|
---|
| 150 | out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-session-cache.js
|
---|
[a3efdf5c] | 151 |
|
---|
| 152 | For node-v20.9.0 all 3969 tests passed. bdubbs 3 Nov 23
|
---|
[99ebfa12] | 153 | For node-v20.14.0 31 of 4043 tests failed. bdubbs 29 May 24
|
---|
[9bea06a] | 154 | -->
|
---|
[6914a417] | 155 | </para>
|
---|
[4464d405] | 156 |
|
---|
| 157 | <para>
|
---|
| 158 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 159 | </para>
|
---|
| 160 |
|
---|
| 161 | <screen role="root"><userinput>make install &&
|
---|
| 162 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
| 163 | </sect2>
|
---|
| 164 |
|
---|
| 165 | <sect2 role="commands">
|
---|
| 166 | <title>Command Explanations</title>
|
---|
| 167 |
|
---|
[d56e7df] | 168 | <para>
|
---|
[6cbbb2d6] | 169 | <parameter>--with-intl=system-icu</parameter>: use the system version
|
---|
[d56e7df] | 170 | of <application>icu</application>. Other values are
|
---|
| 171 | <option>full-icu</option> (to build a local, full
|
---|
| 172 | <application>icu</application> library) and <option>small-icu</option>
|
---|
| 173 | (to build a local, minimal <application>icu</application> library).
|
---|
| 174 | </para>
|
---|
[4464d405] | 175 |
|
---|
[d56e7df] | 176 | <para>
|
---|
[d0212021] | 177 | <parameter>--shared-{brotli,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>
|
---|
[38277fd] | 204 | corepack, node, npm, and npx
|
---|
[4464d405] | 205 | </seg>
|
---|
| 206 | <seg>
|
---|
| 207 | None
|
---|
| 208 | </seg>
|
---|
| 209 | <seg>
|
---|
[6a43232] | 210 | /usr/include/node,
|
---|
[c2051dbd] | 211 | /usr/lib/node_modules/{corepack,npm},
|
---|
[ee1676a] | 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 |
|
---|
[38277fd] | 223 | <varlistentry id="corepack">
|
---|
| 224 | <term><command>corepack</command></term>
|
---|
| 225 | <listitem>
|
---|
| 226 | <para>
|
---|
| 227 | is an experimental tool to help with managing versions of package
|
---|
| 228 | managers.
|
---|
| 229 | </para>
|
---|
| 230 | <indexterm zone="nodejs corepack">
|
---|
| 231 | <primary sortas="b-corepack">corepack</primary>
|
---|
| 232 | </indexterm>
|
---|
| 233 | </listitem>
|
---|
| 234 | </varlistentry>
|
---|
| 235 |
|
---|
[4464d405] | 236 | <varlistentry id="node">
|
---|
| 237 | <term><command>node</command></term>
|
---|
| 238 | <listitem>
|
---|
| 239 | <para>
|
---|
[4c24eb0a] | 240 | is the server-side JavaScript runtime
|
---|
[4464d405] | 241 | </para>
|
---|
| 242 | <indexterm zone="nodejs node">
|
---|
| 243 | <primary sortas="b-node">node</primary>
|
---|
| 244 | </indexterm>
|
---|
| 245 | </listitem>
|
---|
| 246 | </varlistentry>
|
---|
| 247 |
|
---|
| 248 | <varlistentry id="npm">
|
---|
| 249 | <term><command>npm</command></term>
|
---|
| 250 | <listitem>
|
---|
| 251 | <para>
|
---|
[4c24eb0a] | 252 | is the <application>Node.js</application> package manager
|
---|
[4464d405] | 253 | </para>
|
---|
| 254 | <indexterm zone="nodejs npm">
|
---|
| 255 | <primary sortas="b-npm">npm</primary>
|
---|
| 256 | </indexterm>
|
---|
| 257 | </listitem>
|
---|
| 258 | </varlistentry>
|
---|
| 259 |
|
---|
| 260 | <varlistentry>
|
---|
[4c24eb0a] | 261 | <term>
|
---|
| 262 | <filename class="directory">/usr/lib/node_modules/npm/</filename>
|
---|
| 263 | </term>
|
---|
[4464d405] | 264 | <listitem>
|
---|
[d56e7df] | 265 | <para>
|
---|
[4c24eb0a] | 266 | is the installation root for Node.js executables and libraries
|
---|
[d56e7df] | 267 | </para>
|
---|
[4464d405] | 268 | </listitem>
|
---|
| 269 | </varlistentry>
|
---|
| 270 |
|
---|
| 271 | </variablelist>
|
---|
| 272 |
|
---|
| 273 | </sect2>
|
---|
| 274 |
|
---|
| 275 | </sect1>
|
---|