[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 " ">
|
---|
[a1492906] | 9 | <!ENTITY nodejs-md5sum "b57e634501db61d2080e2366ce87ea03">
|
---|
[111bb21] | 10 | <!ENTITY nodejs-size "39 MB">
|
---|
[a1492906] | 11 | <!ENTITY nodejs-buildsize "921 MB (add 31 MB for tests)">
|
---|
| 12 | <!ENTITY nodejs-time "7.6 SBU (add 3.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 |
|
---|
[6aa631b] | 34 | &lfs120_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">
|
---|
[bbaebd0] | 91 | <xref linkend="c-ares"/>,
|
---|
[52e582c9] | 92 | <xref linkend="icu"/>,
|
---|
| 93 | <xref linkend="libuv"/>, and
|
---|
| 94 | <xref linkend="nghttp2"/>
|
---|
[4464d405] | 95 | </para>
|
---|
| 96 |
|
---|
| 97 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 98 | <para role="optional">
|
---|
[ee1676a] | 99 | <ulink url="https://github.com/nodejs/http-parser">http-parser</ulink> and
|
---|
[f02583f] | 100 | <ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
|
---|
| 101 | <command>npm</command> will be installed if not present)
|
---|
[4464d405] | 102 | </para>
|
---|
| 103 |
|
---|
| 104 |
|
---|
| 105 | </sect2>
|
---|
| 106 |
|
---|
| 107 | <sect2 role="installation">
|
---|
| 108 | <title>Installation of Node.js</title>
|
---|
| 109 |
|
---|
[73ac81b] | 110 | <para>
|
---|
| 111 | If Python-3.12 is installed, fix the <command>configure</command> script:
|
---|
| 112 | </para>
|
---|
| 113 |
|
---|
| 114 | <screen><userinput>sed -e '/python3.11/i command -v python3.12 >/dev/null && exec python3.12 "$0" "$@"' \
|
---|
| 115 | -e '/3, 11/s/\(.3, 11.\)/(3, 12), \1/' \
|
---|
| 116 | -i configure</userinput></screen>
|
---|
| 117 |
|
---|
[4464d405] | 118 | <para>
|
---|
| 119 | Build <application>Node.js</application> by running the following
|
---|
| 120 | commands:
|
---|
| 121 | </para>
|
---|
| 122 |
|
---|
[de66d05] | 123 | <screen><userinput>./configure --prefix=/usr \
|
---|
[ccec040c] | 124 | --shared-cares \
|
---|
| 125 | --shared-libuv \
|
---|
| 126 | --shared-openssl \
|
---|
| 127 | --shared-nghttp2 \
|
---|
| 128 | --shared-zlib \
|
---|
| 129 | --with-intl=system-icu &&
|
---|
[4464d405] | 130 | make</userinput></screen>
|
---|
| 131 |
|
---|
[d56e7df] | 132 | <para>
|
---|
[ee1676a] | 133 | To test the results, issue: <command>make test-only</command>.
|
---|
[a1492906] | 134 | Ten tests (of 3817 tests) are known to fail
|
---|
| 135 | due to behavior differences between OpenSSL-3.0 and OpenSSL-3.1.
|
---|
[9bea06a] | 136 | <!--
|
---|
| 137 | Failed tests:
|
---|
[a1492906] | 138 | out/Release/node - -tls-min-v1.0 /build/node/node-v18.18.2/test/parallel/test-https-agent-session-eviction.js
|
---|
| 139 | out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-alert.js
|
---|
| 140 | out/Release/node - -tls-max-v1.2 /build/node/node-v18.18.2/test/parallel/test-tls-cli-max-version-1.2.js
|
---|
| 141 | out/Release/node - -tls-max-v1.3 /build/node/node-v18.18.2/test/parallel/test-tls-cli-max-version-1.3.js
|
---|
| 142 | out/Release/node - -tls-min-v1.1 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.1.js
|
---|
| 143 | out/Release/node - -tls-min-v1.2 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.2.js
|
---|
| 144 | out/Release/node - -tls-min-v1.3 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.3.js
|
---|
| 145 | out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-getprotocol.js
|
---|
| 146 | out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-min-max-version.js
|
---|
| 147 | out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-session-cache.js
|
---|
[9bea06a] | 148 | -->
|
---|
[6914a417] | 149 | </para>
|
---|
[4464d405] | 150 |
|
---|
| 151 | <para>
|
---|
| 152 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 153 | </para>
|
---|
| 154 |
|
---|
| 155 | <screen role="root"><userinput>make install &&
|
---|
| 156 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
| 157 | </sect2>
|
---|
| 158 |
|
---|
| 159 | <sect2 role="commands">
|
---|
| 160 | <title>Command Explanations</title>
|
---|
| 161 |
|
---|
[d56e7df] | 162 | <para>
|
---|
[6cbbb2d6] | 163 | <parameter>--with-intl=system-icu</parameter>: use the system version
|
---|
[d56e7df] | 164 | of <application>icu</application>. Other values are
|
---|
| 165 | <option>full-icu</option> (to build a local, full
|
---|
| 166 | <application>icu</application> library) and <option>small-icu</option>
|
---|
| 167 | (to build a local, minimal <application>icu</application> library).
|
---|
| 168 | </para>
|
---|
[4464d405] | 169 |
|
---|
[d56e7df] | 170 | <para>
|
---|
[087639a] | 171 | <parameter>--shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>:
|
---|
[d56e7df] | 172 | use the system installed libraries instead of local copies.
|
---|
| 173 | </para>
|
---|
[4464d405] | 174 |
|
---|
[d56e7df] | 175 | <para>
|
---|
| 176 | <option>--without-npm</option>: do not build
|
---|
| 177 | <application>npm</application> (use if you'd like to build a separate
|
---|
| 178 | <application>npm</application> later).
|
---|
| 179 | </para>
|
---|
[4464d405] | 180 |
|
---|
[d56e7df] | 181 | <para>
|
---|
| 182 | <option>--shared-http-parser</option>: use the system
|
---|
| 183 | installed library instead of a local copy.
|
---|
| 184 | </para>
|
---|
[4464d405] | 185 |
|
---|
| 186 | </sect2>
|
---|
| 187 |
|
---|
| 188 | <sect2 role="content">
|
---|
| 189 | <title>Contents</title>
|
---|
| 190 |
|
---|
| 191 | <segmentedlist>
|
---|
| 192 | <segtitle>Installed Programs</segtitle>
|
---|
| 193 | <segtitle>Installed Library</segtitle>
|
---|
| 194 | <segtitle>Installed Directories</segtitle>
|
---|
| 195 |
|
---|
| 196 | <seglistitem>
|
---|
| 197 | <seg>
|
---|
[38277fd] | 198 | corepack, node, npm, and npx
|
---|
[4464d405] | 199 | </seg>
|
---|
| 200 | <seg>
|
---|
| 201 | None
|
---|
| 202 | </seg>
|
---|
| 203 | <seg>
|
---|
[6a43232] | 204 | /usr/include/node,
|
---|
[c2051dbd] | 205 | /usr/lib/node_modules/{corepack,npm},
|
---|
[ee1676a] | 206 | /usr/share/doc/{node,node-&nodejs-version;}, and
|
---|
[6a43232] | 207 | /usr/share/systemtap/tapset
|
---|
[4464d405] | 208 | </seg>
|
---|
| 209 | </seglistitem>
|
---|
| 210 | </segmentedlist>
|
---|
| 211 |
|
---|
| 212 | <variablelist>
|
---|
| 213 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 214 | <?dbfo list-presentation="list"?>
|
---|
| 215 | <?dbhtml list-presentation="table"?>
|
---|
| 216 |
|
---|
[38277fd] | 217 | <varlistentry id="corepack">
|
---|
| 218 | <term><command>corepack</command></term>
|
---|
| 219 | <listitem>
|
---|
| 220 | <para>
|
---|
| 221 | is an experimental tool to help with managing versions of package
|
---|
| 222 | managers.
|
---|
| 223 | </para>
|
---|
| 224 | <indexterm zone="nodejs corepack">
|
---|
| 225 | <primary sortas="b-corepack">corepack</primary>
|
---|
| 226 | </indexterm>
|
---|
| 227 | </listitem>
|
---|
| 228 | </varlistentry>
|
---|
| 229 |
|
---|
[4464d405] | 230 | <varlistentry id="node">
|
---|
| 231 | <term><command>node</command></term>
|
---|
| 232 | <listitem>
|
---|
| 233 | <para>
|
---|
[4c24eb0a] | 234 | is the server-side JavaScript runtime
|
---|
[4464d405] | 235 | </para>
|
---|
| 236 | <indexterm zone="nodejs node">
|
---|
| 237 | <primary sortas="b-node">node</primary>
|
---|
| 238 | </indexterm>
|
---|
| 239 | </listitem>
|
---|
| 240 | </varlistentry>
|
---|
| 241 |
|
---|
| 242 | <varlistentry id="npm">
|
---|
| 243 | <term><command>npm</command></term>
|
---|
| 244 | <listitem>
|
---|
| 245 | <para>
|
---|
[4c24eb0a] | 246 | is the <application>Node.js</application> package manager
|
---|
[4464d405] | 247 | </para>
|
---|
| 248 | <indexterm zone="nodejs npm">
|
---|
| 249 | <primary sortas="b-npm">npm</primary>
|
---|
| 250 | </indexterm>
|
---|
| 251 | </listitem>
|
---|
| 252 | </varlistentry>
|
---|
| 253 |
|
---|
| 254 | <varlistentry>
|
---|
[4c24eb0a] | 255 | <term>
|
---|
| 256 | <filename class="directory">/usr/lib/node_modules/npm/</filename>
|
---|
| 257 | </term>
|
---|
[4464d405] | 258 | <listitem>
|
---|
[d56e7df] | 259 | <para>
|
---|
[4c24eb0a] | 260 | is the installation root for Node.js executables and libraries
|
---|
[d56e7df] | 261 | </para>
|
---|
[4464d405] | 262 | </listitem>
|
---|
| 263 | </varlistentry>
|
---|
| 264 |
|
---|
| 265 | </variablelist>
|
---|
| 266 |
|
---|
| 267 | </sect2>
|
---|
| 268 |
|
---|
| 269 | </sect1>
|
---|