[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 " ">
|
---|
[f92d633] | 9 | <!ENTITY nodejs-md5sum "7832164e52741a743106c5aadd34cdee">
|
---|
[2a406a80] | 10 | <!ENTITY nodejs-size "40 MB">
|
---|
[f92d633] | 11 | <!ENTITY nodejs-buildsize "1.0 GB (add 67 MB for tests)">
|
---|
| 12 | <!ENTITY nodejs-time "12 SBU (add 2.9 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 |
|
---|
[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>.
|
---|
[0f667d5] | 139 | Out of 4096 tests, 25 in the 'parallel' test suite are known to fail.
|
---|
[9bea06a] | 140 | <!--
|
---|
| 141 | Failed tests:
|
---|
[0f667d5] | 142 | parallel/test-crypto-dh.js
|
---|
| 143 | parallel/test-https-client-checkServerIdentity.js
|
---|
| 144 | parallel/test-https-strict.js
|
---|
| 145 | parallel/test-process-euid-egid.js
|
---|
| 146 | parallel/test-process-initgroups.js
|
---|
| 147 | parallel/test-process-setgroups.js
|
---|
| 148 | parallel/test-process-uid-gid.js
|
---|
| 149 | parallel/test-tls-alert-handling.js
|
---|
| 150 | parallel/test-tls-cert-regression.js
|
---|
| 151 | parallel/test-tls-client-auth.js
|
---|
| 152 | parallel/test-tls-client-mindhsize.js
|
---|
| 153 | parallel/test-tls-client-getephemeralkeyinfo.js
|
---|
| 154 | parallel/test-tls-client-renegotiation-13.js
|
---|
| 155 | parallel/test-tls-client-verify.js
|
---|
| 156 | - -no-warnings parallel/test-tls-dhe.js
|
---|
| 157 | parallel/test-tls-getcipher.js
|
---|
| 158 | parallel/test-tls-junk-server.js
|
---|
| 159 | parallel/test-tls-multiple-cas-as-string.js
|
---|
| 160 | parallel/test-tls-multi-key.js
|
---|
| 161 | parallel/test-tls-peer-certificate-encoding.js
|
---|
| 162 | parallel/test-tls-set-ciphers.js
|
---|
| 163 | parallel/test-tls-sni-server-client.js
|
---|
| 164 | parallel/test-tls-sni-option.js
|
---|
| 165 | parallel/test-tls-server-verify.js
|
---|
| 166 | parallel/test-tls-junk-closes-server.js
|
---|
[9bea06a] | 167 | -->
|
---|
[6914a417] | 168 | </para>
|
---|
[4464d405] | 169 |
|
---|
| 170 | <para>
|
---|
| 171 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 172 | </para>
|
---|
| 173 |
|
---|
| 174 | <screen role="root"><userinput>make install &&
|
---|
| 175 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
| 176 | </sect2>
|
---|
| 177 |
|
---|
| 178 | <sect2 role="commands">
|
---|
| 179 | <title>Command Explanations</title>
|
---|
| 180 |
|
---|
[d56e7df] | 181 | <para>
|
---|
[6cbbb2d6] | 182 | <parameter>--with-intl=system-icu</parameter>: use the system version
|
---|
[d56e7df] | 183 | of <application>icu</application>. Other values are
|
---|
| 184 | <option>full-icu</option> (to build a local, full
|
---|
| 185 | <application>icu</application> library) and <option>small-icu</option>
|
---|
| 186 | (to build a local, minimal <application>icu</application> library).
|
---|
| 187 | </para>
|
---|
[4464d405] | 188 |
|
---|
[d56e7df] | 189 | <para>
|
---|
[d0212021] | 190 | <parameter>--shared-{brotli,cares,libuv,nghttp2,openssl,zlib}</parameter>:
|
---|
[d56e7df] | 191 | use the system installed libraries instead of local copies.
|
---|
| 192 | </para>
|
---|
[4464d405] | 193 |
|
---|
[d56e7df] | 194 | <para>
|
---|
| 195 | <option>--without-npm</option>: do not build
|
---|
| 196 | <application>npm</application> (use if you'd like to build a separate
|
---|
| 197 | <application>npm</application> later).
|
---|
| 198 | </para>
|
---|
[4464d405] | 199 |
|
---|
[d56e7df] | 200 | <para>
|
---|
| 201 | <option>--shared-http-parser</option>: use the system
|
---|
| 202 | installed library instead of a local copy.
|
---|
| 203 | </para>
|
---|
[4464d405] | 204 |
|
---|
| 205 | </sect2>
|
---|
| 206 |
|
---|
| 207 | <sect2 role="content">
|
---|
| 208 | <title>Contents</title>
|
---|
| 209 |
|
---|
| 210 | <segmentedlist>
|
---|
| 211 | <segtitle>Installed Programs</segtitle>
|
---|
| 212 | <segtitle>Installed Library</segtitle>
|
---|
| 213 | <segtitle>Installed Directories</segtitle>
|
---|
| 214 |
|
---|
| 215 | <seglistitem>
|
---|
| 216 | <seg>
|
---|
[38277fd] | 217 | corepack, node, npm, and npx
|
---|
[4464d405] | 218 | </seg>
|
---|
| 219 | <seg>
|
---|
| 220 | None
|
---|
| 221 | </seg>
|
---|
| 222 | <seg>
|
---|
[6a43232] | 223 | /usr/include/node,
|
---|
[c2051dbd] | 224 | /usr/lib/node_modules/{corepack,npm},
|
---|
[ee1676a] | 225 | /usr/share/doc/{node,node-&nodejs-version;}, and
|
---|
[6a43232] | 226 | /usr/share/systemtap/tapset
|
---|
[4464d405] | 227 | </seg>
|
---|
| 228 | </seglistitem>
|
---|
| 229 | </segmentedlist>
|
---|
| 230 |
|
---|
| 231 | <variablelist>
|
---|
| 232 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 233 | <?dbfo list-presentation="list"?>
|
---|
| 234 | <?dbhtml list-presentation="table"?>
|
---|
| 235 |
|
---|
[38277fd] | 236 | <varlistentry id="corepack">
|
---|
| 237 | <term><command>corepack</command></term>
|
---|
| 238 | <listitem>
|
---|
| 239 | <para>
|
---|
| 240 | is an experimental tool to help with managing versions of package
|
---|
| 241 | managers.
|
---|
| 242 | </para>
|
---|
| 243 | <indexterm zone="nodejs corepack">
|
---|
| 244 | <primary sortas="b-corepack">corepack</primary>
|
---|
| 245 | </indexterm>
|
---|
| 246 | </listitem>
|
---|
| 247 | </varlistentry>
|
---|
| 248 |
|
---|
[4464d405] | 249 | <varlistentry id="node">
|
---|
| 250 | <term><command>node</command></term>
|
---|
| 251 | <listitem>
|
---|
| 252 | <para>
|
---|
[4c24eb0a] | 253 | is the server-side JavaScript runtime
|
---|
[4464d405] | 254 | </para>
|
---|
| 255 | <indexterm zone="nodejs node">
|
---|
| 256 | <primary sortas="b-node">node</primary>
|
---|
| 257 | </indexterm>
|
---|
| 258 | </listitem>
|
---|
| 259 | </varlistentry>
|
---|
| 260 |
|
---|
| 261 | <varlistentry id="npm">
|
---|
| 262 | <term><command>npm</command></term>
|
---|
| 263 | <listitem>
|
---|
| 264 | <para>
|
---|
[4c24eb0a] | 265 | is the <application>Node.js</application> package manager
|
---|
[4464d405] | 266 | </para>
|
---|
| 267 | <indexterm zone="nodejs npm">
|
---|
| 268 | <primary sortas="b-npm">npm</primary>
|
---|
| 269 | </indexterm>
|
---|
| 270 | </listitem>
|
---|
| 271 | </varlistentry>
|
---|
| 272 |
|
---|
| 273 | <varlistentry>
|
---|
[4c24eb0a] | 274 | <term>
|
---|
| 275 | <filename class="directory">/usr/lib/node_modules/npm/</filename>
|
---|
| 276 | </term>
|
---|
[4464d405] | 277 | <listitem>
|
---|
[d56e7df] | 278 | <para>
|
---|
[4c24eb0a] | 279 | is the installation root for Node.js executables and libraries
|
---|
[d56e7df] | 280 | </para>
|
---|
[4464d405] | 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
| 283 |
|
---|
| 284 | </variablelist>
|
---|
| 285 |
|
---|
| 286 | </sect2>
|
---|
| 287 |
|
---|
| 288 | </sect1>
|
---|