[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 " ">
|
---|
[dca29118] | 9 | <!ENTITY nodejs-md5sum "2e59511d65c64338b1cf5504c9e18d53">
|
---|
[2a406a80] | 10 | <!ENTITY nodejs-size "40 MB">
|
---|
[dca29118] | 11 | <!ENTITY nodejs-buildsize "978 MB (add 35 MB for tests)">
|
---|
| 12 | <!ENTITY nodejs-time "10 SBU (add 7.5 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 |
|
---|
[7426e905] | 34 | &lfs122_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 |
|
---|
[0f667d5] | 105 | &test-use-internet;
|
---|
[4464d405] | 106 |
|
---|
| 107 | </sect2>
|
---|
| 108 |
|
---|
| 109 | <sect2 role="installation">
|
---|
| 110 | <title>Installation of Node.js</title>
|
---|
| 111 |
|
---|
[d0212021] | 112 | <!--
|
---|
[73ac81b] | 113 | <para>
|
---|
| 114 | If Python-3.12 is installed, fix the <command>configure</command> script:
|
---|
| 115 | </para>
|
---|
| 116 |
|
---|
| 117 | <screen><userinput>sed -e '/python3.11/i command -v python3.12 >/dev/null && exec python3.12 "$0" "$@"' \
|
---|
| 118 | -e '/3, 11/s/\(.3, 11.\)/(3, 12), \1/' \
|
---|
| 119 | -i configure</userinput></screen>
|
---|
[d0212021] | 120 | -->
|
---|
[73ac81b] | 121 |
|
---|
[4464d405] | 122 | <para>
|
---|
| 123 | Build <application>Node.js</application> by running the following
|
---|
| 124 | commands:
|
---|
| 125 | </para>
|
---|
| 126 |
|
---|
[de66d05] | 127 | <screen><userinput>./configure --prefix=/usr \
|
---|
[d0212021] | 128 | --shared-brotli \
|
---|
[ccec040c] | 129 | --shared-cares \
|
---|
| 130 | --shared-libuv \
|
---|
| 131 | --shared-openssl \
|
---|
| 132 | --shared-nghttp2 \
|
---|
| 133 | --shared-zlib \
|
---|
| 134 | --with-intl=system-icu &&
|
---|
[4464d405] | 135 | make</userinput></screen>
|
---|
| 136 |
|
---|
[d56e7df] | 137 | <para>
|
---|
[ee1676a] | 138 | To test the results, issue: <command>make test-only</command>.
|
---|
[dca29118] | 139 | Out of over 4100 tests, 11 in the 'parallel' test suite are known to fail.
|
---|
[9bea06a] | 140 | <!--
|
---|
| 141 | Failed tests:
|
---|
[f2953794] | 142 | node-v20.17.0/test/parallel/test-https-client-checkServerIdentity.js
|
---|
| 143 | node-v20.17.0/test/parallel/test-https-strict.js
|
---|
| 144 | node-v20.17.0/test/parallel/test-net-socket-connect-without-cb.js
|
---|
| 145 | node-v20.17.0/test/parallel/test-process-euid-egid.js
|
---|
| 146 | node-v20.17.0/test/parallel/test-process-initgroups.js
|
---|
| 147 | node-v20.17.0/test/parallel/test-process-setgroups.js
|
---|
| 148 | node-v20.17.0/test/parallel/test-process-uid-gid.js
|
---|
| 149 | - -expose-internals node-v20.17.0/test/parallel/test-tcp-wrap-listen.js
|
---|
| 150 | node-v20.17.0/test/parallel/test-tls-alert-handling.js
|
---|
| 151 | node-v20.17.0/test/parallel/test-tls-cert-regression.js
|
---|
| 152 | node-v20.17.0/test/parallel/test-tls-client-auth.js
|
---|
| 153 | node-v20.17.0/test/parallel/test-tls-client-getephemeralkeyinfo.js
|
---|
| 154 | node-v20.17.0/test/parallel/test-tls-client-mindhsize.js
|
---|
| 155 | node-v20.17.0/test/parallel/test-tls-client-renegotiation-13.js
|
---|
| 156 | node-v20.17.0/test/parallel/test-tls-client-verify.js
|
---|
| 157 | - -no-warnings node-v20.17.0/test/parallel/test-tls-dhe.js
|
---|
| 158 | node-v20.17.0/test/parallel/test-tls-getcipher.js
|
---|
| 159 | node-v20.17.0/test/parallel/test-tls-junk-server.js
|
---|
| 160 | node-v20.17.0/test/parallel/test-tls-multiple-cas-as-string.js
|
---|
| 161 | node-v20.17.0/test/parallel/test-tls-multi-key.js
|
---|
| 162 | node-v20.17.0/test/parallel/test-tls-peer-certificate-encoding.js
|
---|
| 163 | node-v20.17.0/test/parallel/test-tls-sni-server-client.js
|
---|
| 164 | node-v20.17.0/test/parallel/test-tls-set-ciphers.js
|
---|
| 165 | node-v20.17.0/test/parallel/test-tls-sni-option.js
|
---|
| 166 | node-v20.17.0/test/parallel/test-tls-server-verify.js
|
---|
| 167 | node-v20.17.0/test/parallel/test-tls-junk-closes-server.js
|
---|
[dca29118] | 168 |
|
---|
| 169 | node-v20.18.0:
|
---|
| 170 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-net-socket-connect-without-cb.js
|
---|
| 171 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-process-euid-egid.js
|
---|
| 172 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-process-initgroups.js
|
---|
| 173 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-process-setgroups.js
|
---|
| 174 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-process-uid-gid.js
|
---|
| 175 | out/Release/node - -expose-internals /build/node/node-v20.18.0/test/parallel/test-tcp-wrap-listen.js
|
---|
| 176 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-tls-cert-regression.js
|
---|
| 177 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-tls-client-getephemeralkeyinfo.js
|
---|
| 178 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-tls-getcipher.js
|
---|
| 179 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-tls-set-ciphers.js
|
---|
| 180 | out/Release/node /build/node/node-v20.18.0/test/parallel/test-tls-junk-closes-server.js
|
---|
| 181 |
|
---|
| 182 | [04:40|% 100|+ 4127|- 11]: Done
|
---|
[9bea06a] | 183 | -->
|
---|
[6914a417] | 184 | </para>
|
---|
[4464d405] | 185 |
|
---|
| 186 | <para>
|
---|
| 187 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 188 | </para>
|
---|
| 189 |
|
---|
| 190 | <screen role="root"><userinput>make install &&
|
---|
| 191 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
| 192 | </sect2>
|
---|
| 193 |
|
---|
| 194 | <sect2 role="commands">
|
---|
| 195 | <title>Command Explanations</title>
|
---|
| 196 |
|
---|
[d56e7df] | 197 | <para>
|
---|
[6cbbb2d6] | 198 | <parameter>--with-intl=system-icu</parameter>: use the system version
|
---|
[d56e7df] | 199 | of <application>icu</application>. Other values are
|
---|
| 200 | <option>full-icu</option> (to build a local, full
|
---|
| 201 | <application>icu</application> library) and <option>small-icu</option>
|
---|
| 202 | (to build a local, minimal <application>icu</application> library).
|
---|
| 203 | </para>
|
---|
[4464d405] | 204 |
|
---|
[d56e7df] | 205 | <para>
|
---|
[d0212021] | 206 | <parameter>--shared-{brotli,cares,libuv,nghttp2,openssl,zlib}</parameter>:
|
---|
[d56e7df] | 207 | use the system installed libraries instead of local copies.
|
---|
| 208 | </para>
|
---|
[4464d405] | 209 |
|
---|
[d56e7df] | 210 | <para>
|
---|
| 211 | <option>--without-npm</option>: do not build
|
---|
| 212 | <application>npm</application> (use if you'd like to build a separate
|
---|
| 213 | <application>npm</application> later).
|
---|
| 214 | </para>
|
---|
[4464d405] | 215 |
|
---|
[d56e7df] | 216 | <para>
|
---|
| 217 | <option>--shared-http-parser</option>: use the system
|
---|
| 218 | installed library instead of a local copy.
|
---|
| 219 | </para>
|
---|
[4464d405] | 220 |
|
---|
| 221 | </sect2>
|
---|
| 222 |
|
---|
| 223 | <sect2 role="content">
|
---|
| 224 | <title>Contents</title>
|
---|
| 225 |
|
---|
| 226 | <segmentedlist>
|
---|
| 227 | <segtitle>Installed Programs</segtitle>
|
---|
| 228 | <segtitle>Installed Library</segtitle>
|
---|
| 229 | <segtitle>Installed Directories</segtitle>
|
---|
| 230 |
|
---|
| 231 | <seglistitem>
|
---|
| 232 | <seg>
|
---|
[38277fd] | 233 | corepack, node, npm, and npx
|
---|
[4464d405] | 234 | </seg>
|
---|
| 235 | <seg>
|
---|
| 236 | None
|
---|
| 237 | </seg>
|
---|
| 238 | <seg>
|
---|
[6a43232] | 239 | /usr/include/node,
|
---|
[c2051dbd] | 240 | /usr/lib/node_modules/{corepack,npm},
|
---|
[ee1676a] | 241 | /usr/share/doc/{node,node-&nodejs-version;}, and
|
---|
[6a43232] | 242 | /usr/share/systemtap/tapset
|
---|
[4464d405] | 243 | </seg>
|
---|
| 244 | </seglistitem>
|
---|
| 245 | </segmentedlist>
|
---|
| 246 |
|
---|
| 247 | <variablelist>
|
---|
| 248 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 249 | <?dbfo list-presentation="list"?>
|
---|
| 250 | <?dbhtml list-presentation="table"?>
|
---|
| 251 |
|
---|
[38277fd] | 252 | <varlistentry id="corepack">
|
---|
| 253 | <term><command>corepack</command></term>
|
---|
| 254 | <listitem>
|
---|
| 255 | <para>
|
---|
| 256 | is an experimental tool to help with managing versions of package
|
---|
| 257 | managers.
|
---|
| 258 | </para>
|
---|
| 259 | <indexterm zone="nodejs corepack">
|
---|
| 260 | <primary sortas="b-corepack">corepack</primary>
|
---|
| 261 | </indexterm>
|
---|
| 262 | </listitem>
|
---|
| 263 | </varlistentry>
|
---|
| 264 |
|
---|
[4464d405] | 265 | <varlistentry id="node">
|
---|
| 266 | <term><command>node</command></term>
|
---|
| 267 | <listitem>
|
---|
| 268 | <para>
|
---|
[4c24eb0a] | 269 | is the server-side JavaScript runtime
|
---|
[4464d405] | 270 | </para>
|
---|
| 271 | <indexterm zone="nodejs node">
|
---|
| 272 | <primary sortas="b-node">node</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
| 277 | <varlistentry id="npm">
|
---|
| 278 | <term><command>npm</command></term>
|
---|
| 279 | <listitem>
|
---|
| 280 | <para>
|
---|
[4c24eb0a] | 281 | is the <application>Node.js</application> package manager
|
---|
[4464d405] | 282 | </para>
|
---|
| 283 | <indexterm zone="nodejs npm">
|
---|
| 284 | <primary sortas="b-npm">npm</primary>
|
---|
| 285 | </indexterm>
|
---|
| 286 | </listitem>
|
---|
| 287 | </varlistentry>
|
---|
| 288 |
|
---|
| 289 | <varlistentry>
|
---|
[4c24eb0a] | 290 | <term>
|
---|
| 291 | <filename class="directory">/usr/lib/node_modules/npm/</filename>
|
---|
| 292 | </term>
|
---|
[4464d405] | 293 | <listitem>
|
---|
[d56e7df] | 294 | <para>
|
---|
[4c24eb0a] | 295 | is the installation root for Node.js executables and libraries
|
---|
[d56e7df] | 296 | </para>
|
---|
[4464d405] | 297 | </listitem>
|
---|
| 298 | </varlistentry>
|
---|
| 299 |
|
---|
| 300 | </variablelist>
|
---|
| 301 |
|
---|
| 302 | </sect2>
|
---|
| 303 |
|
---|
| 304 | </sect1>
|
---|