[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 " ">
|
---|
[79cf80f5] | 9 | <!ENTITY nodejs-md5sum "5dd4a23c3e883af3dcab5adc846d91bc">
|
---|
[111bb21] | 10 | <!ENTITY nodejs-size "39 MB">
|
---|
[79cf80f5] | 11 | <!ENTITY nodejs-buildsize "919 MB (add 30 MB for tests)">
|
---|
| 12 | <!ENTITY nodejs-time "6.7 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 |
|
---|
[9bea06a] | 34 | &lfs113_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 |
|
---|
| 110 | <para>
|
---|
| 111 | Build <application>Node.js</application> by running the following
|
---|
| 112 | commands:
|
---|
| 113 | </para>
|
---|
| 114 |
|
---|
[de66d05] | 115 | <screen><userinput>./configure --prefix=/usr \
|
---|
[ccec040c] | 116 | --shared-cares \
|
---|
| 117 | --shared-libuv \
|
---|
| 118 | --shared-openssl \
|
---|
| 119 | --shared-nghttp2 \
|
---|
| 120 | --shared-zlib \
|
---|
| 121 | --with-intl=system-icu &&
|
---|
[4464d405] | 122 | make</userinput></screen>
|
---|
| 123 |
|
---|
[d56e7df] | 124 | <para>
|
---|
[ee1676a] | 125 | To test the results, issue: <command>make test-only</command>.
|
---|
[79cf80f5] | 126 | Two tests (of 3801 tests), test-net-socket-connect-without-cb and
|
---|
| 127 | test-tcp-wrap-listen are known to fail.
|
---|
[9bea06a] | 128 | <!--
|
---|
| 129 | Failed tests:
|
---|
[79cf80f5] | 130 | out/Release/node /build/node/node-v18.17.0/test/parallel/test-net-socket-connect-without-cb.js
|
---|
| 131 | out/Release/node - -expose-internals /build/node/node-v18.17.0/test/parallel/test-tcp-wrap-listen.js
|
---|
[9bea06a] | 132 | -->
|
---|
[6914a417] | 133 | </para>
|
---|
[4464d405] | 134 |
|
---|
| 135 | <para>
|
---|
| 136 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 137 | </para>
|
---|
| 138 |
|
---|
| 139 | <screen role="root"><userinput>make install &&
|
---|
| 140 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
| 141 | </sect2>
|
---|
| 142 |
|
---|
| 143 | <sect2 role="commands">
|
---|
| 144 | <title>Command Explanations</title>
|
---|
| 145 |
|
---|
[d56e7df] | 146 | <para>
|
---|
[6cbbb2d6] | 147 | <parameter>--with-intl=system-icu</parameter>: use the system version
|
---|
[d56e7df] | 148 | of <application>icu</application>. Other values are
|
---|
| 149 | <option>full-icu</option> (to build a local, full
|
---|
| 150 | <application>icu</application> library) and <option>small-icu</option>
|
---|
| 151 | (to build a local, minimal <application>icu</application> library).
|
---|
| 152 | </para>
|
---|
[4464d405] | 153 |
|
---|
[d56e7df] | 154 | <para>
|
---|
[087639a] | 155 | <parameter>--shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>:
|
---|
[d56e7df] | 156 | use the system installed libraries instead of local copies.
|
---|
| 157 | </para>
|
---|
[4464d405] | 158 |
|
---|
[d56e7df] | 159 | <para>
|
---|
| 160 | <option>--without-npm</option>: do not build
|
---|
| 161 | <application>npm</application> (use if you'd like to build a separate
|
---|
| 162 | <application>npm</application> later).
|
---|
| 163 | </para>
|
---|
[4464d405] | 164 |
|
---|
[d56e7df] | 165 | <para>
|
---|
| 166 | <option>--shared-http-parser</option>: use the system
|
---|
| 167 | installed library instead of a local copy.
|
---|
| 168 | </para>
|
---|
[4464d405] | 169 |
|
---|
| 170 | </sect2>
|
---|
| 171 |
|
---|
| 172 | <sect2 role="content">
|
---|
| 173 | <title>Contents</title>
|
---|
| 174 |
|
---|
| 175 | <segmentedlist>
|
---|
| 176 | <segtitle>Installed Programs</segtitle>
|
---|
| 177 | <segtitle>Installed Library</segtitle>
|
---|
| 178 | <segtitle>Installed Directories</segtitle>
|
---|
| 179 |
|
---|
| 180 | <seglistitem>
|
---|
| 181 | <seg>
|
---|
[38277fd] | 182 | corepack, node, npm, and npx
|
---|
[4464d405] | 183 | </seg>
|
---|
| 184 | <seg>
|
---|
| 185 | None
|
---|
| 186 | </seg>
|
---|
| 187 | <seg>
|
---|
[6a43232] | 188 | /usr/include/node,
|
---|
[c2051dbd] | 189 | /usr/lib/node_modules/{corepack,npm},
|
---|
[ee1676a] | 190 | /usr/share/doc/{node,node-&nodejs-version;}, and
|
---|
[6a43232] | 191 | /usr/share/systemtap/tapset
|
---|
[4464d405] | 192 | </seg>
|
---|
| 193 | </seglistitem>
|
---|
| 194 | </segmentedlist>
|
---|
| 195 |
|
---|
| 196 | <variablelist>
|
---|
| 197 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 198 | <?dbfo list-presentation="list"?>
|
---|
| 199 | <?dbhtml list-presentation="table"?>
|
---|
| 200 |
|
---|
[38277fd] | 201 | <varlistentry id="corepack">
|
---|
| 202 | <term><command>corepack</command></term>
|
---|
| 203 | <listitem>
|
---|
| 204 | <para>
|
---|
| 205 | is an experimental tool to help with managing versions of package
|
---|
| 206 | managers.
|
---|
| 207 | </para>
|
---|
| 208 | <indexterm zone="nodejs corepack">
|
---|
| 209 | <primary sortas="b-corepack">corepack</primary>
|
---|
| 210 | </indexterm>
|
---|
| 211 | </listitem>
|
---|
| 212 | </varlistentry>
|
---|
| 213 |
|
---|
[4464d405] | 214 | <varlistentry id="node">
|
---|
| 215 | <term><command>node</command></term>
|
---|
| 216 | <listitem>
|
---|
| 217 | <para>
|
---|
[4c24eb0a] | 218 | is the server-side JavaScript runtime
|
---|
[4464d405] | 219 | </para>
|
---|
| 220 | <indexterm zone="nodejs node">
|
---|
| 221 | <primary sortas="b-node">node</primary>
|
---|
| 222 | </indexterm>
|
---|
| 223 | </listitem>
|
---|
| 224 | </varlistentry>
|
---|
| 225 |
|
---|
| 226 | <varlistentry id="npm">
|
---|
| 227 | <term><command>npm</command></term>
|
---|
| 228 | <listitem>
|
---|
| 229 | <para>
|
---|
[4c24eb0a] | 230 | is the <application>Node.js</application> package manager
|
---|
[4464d405] | 231 | </para>
|
---|
| 232 | <indexterm zone="nodejs npm">
|
---|
| 233 | <primary sortas="b-npm">npm</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
| 237 |
|
---|
| 238 | <varlistentry>
|
---|
[4c24eb0a] | 239 | <term>
|
---|
| 240 | <filename class="directory">/usr/lib/node_modules/npm/</filename>
|
---|
| 241 | </term>
|
---|
[4464d405] | 242 | <listitem>
|
---|
[d56e7df] | 243 | <para>
|
---|
[4c24eb0a] | 244 | is the installation root for Node.js executables and libraries
|
---|
[d56e7df] | 245 | </para>
|
---|
[4464d405] | 246 | </listitem>
|
---|
| 247 | </varlistentry>
|
---|
| 248 |
|
---|
| 249 | </variablelist>
|
---|
| 250 |
|
---|
| 251 | </sect2>
|
---|
| 252 |
|
---|
| 253 | </sect1>
|
---|