[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 " ">
|
---|
[57141410] | 9 | <!ENTITY nodejs-md5sum "3f23ba05c01f6f03170059057a7bd727">
|
---|
[d122e9f2] | 10 | <!ENTITY nodejs-size "23 MB">
|
---|
[57141410] | 11 | <!ENTITY nodejs-buildsize "1.2 GB (add 21 MB for tests)">
|
---|
| 12 | <!ENTITY nodejs-time "9.4 SBU (using parallelism=4; add 2.6 SBU for tests)">
|
---|
[35a6888] | 13 | <!-- timing is significantly longer on a Ryzen -->
|
---|
[57141410] | 14 | <!-- Size increases are due to using internal ICU -->
|
---|
[4464d405] | 15 | ]>
|
---|
| 16 |
|
---|
| 17 | <sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
|
---|
| 18 | <?dbhtml filename="nodejs.html"?>
|
---|
| 19 |
|
---|
| 20 | <sect1info>
|
---|
[542d478] | 21 | <othername>$LastChangedBy$</othername>
|
---|
| 22 | <date>$Date$</date>
|
---|
[4464d405] | 23 | </sect1info>
|
---|
| 24 |
|
---|
| 25 | <title>Node.js-&nodejs-version;</title>
|
---|
| 26 |
|
---|
| 27 | <indexterm zone="nodejs">
|
---|
| 28 | <primary sortas="a-nodejs">nodejs</primary>
|
---|
| 29 | </indexterm>
|
---|
| 30 |
|
---|
| 31 | <sect2 role="package">
|
---|
| 32 | <title>Introduction to Node.js</title>
|
---|
| 33 |
|
---|
| 34 | <para>
|
---|
| 35 | <application>Node.js</application> is a
|
---|
| 36 | <application>JavaScript</application> runtime built on
|
---|
| 37 | <application>Chrome's</application> V8 JavaScript engine.
|
---|
| 38 | </para>
|
---|
| 39 |
|
---|
[d122e9f2] | 40 | &lfs91_checked;
|
---|
[4464d405] | 41 |
|
---|
| 42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 43 | <itemizedlist spacing="compact">
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>
|
---|
| 46 | Download (HTTP): <ulink url="&nodejs-download-http;"/>
|
---|
| 47 | </para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>
|
---|
| 51 | Download (FTP): <ulink url="&nodejs-download-ftp;"/>
|
---|
| 52 | </para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>
|
---|
| 56 | Download MD5 sum: &nodejs-md5sum;
|
---|
| 57 | </para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>
|
---|
| 61 | Download size: &nodejs-size;
|
---|
| 62 | </para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>
|
---|
| 66 | Estimated disk space required: &nodejs-buildsize;
|
---|
| 67 | </para>
|
---|
| 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>
|
---|
| 71 | Estimated build time: &nodejs-time;
|
---|
| 72 | </para>
|
---|
| 73 | </listitem>
|
---|
| 74 | </itemizedlist>
|
---|
| 75 |
|
---|
[d122e9f2] | 76 | <!--<note>
|
---|
[bbaebd0] | 77 | <para>
|
---|
| 78 | This tarball was created using a BSD version of
|
---|
| 79 | <application>tar</application> and extracting it with a linux™
|
---|
| 80 | version will produce harmless warnings about unknown extended header
|
---|
| 81 | keywords.
|
---|
| 82 | </para>
|
---|
[d122e9f2] | 83 | </note>-->
|
---|
[bbaebd0] | 84 |
|
---|
[4464d405] | 85 | <bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
|
---|
| 86 |
|
---|
| 87 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 88 | <para role="required">
|
---|
[ff136571] | 89 | <xref linkend="python2"/> and
|
---|
| 90 | <xref linkend="which"/>
|
---|
[4464d405] | 91 | </para>
|
---|
| 92 |
|
---|
| 93 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 94 | <para role="recommended">
|
---|
[bbaebd0] | 95 | <xref linkend="c-ares"/>,
|
---|
[d94c86c9] | 96 | <xref linkend="icu"/>,
|
---|
| 97 | <xref linkend="libuv"/>, and
|
---|
| 98 | <xref linkend="nghttp2"/>
|
---|
[4464d405] | 99 | </para>
|
---|
| 100 |
|
---|
| 101 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 102 | <para role="optional">
|
---|
[ee1676a] | 103 | <ulink url="https://github.com/nodejs/http-parser">http-parser</ulink> and
|
---|
[f02583f] | 104 | <ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
|
---|
| 105 | <command>npm</command> will be installed if not present)
|
---|
[4464d405] | 106 | </para>
|
---|
| 107 |
|
---|
| 108 | <para condition="html" role="usernotes">
|
---|
| 109 | User Notes: <ulink url="&blfs-wiki;/nodejs"/>
|
---|
| 110 | </para>
|
---|
| 111 |
|
---|
| 112 | </sect2>
|
---|
| 113 |
|
---|
| 114 | <sect2 role="installation">
|
---|
| 115 | <title>Installation of Node.js</title>
|
---|
| 116 |
|
---|
| 117 | <para>
|
---|
| 118 | Build <application>Node.js</application> by running the following
|
---|
| 119 | commands:
|
---|
| 120 | </para>
|
---|
| 121 |
|
---|
[ce508efa] | 122 | <screen><userinput>./configure --prefix=/usr \
|
---|
[57141410] | 123 | --download=icu \
|
---|
[ce508efa] | 124 | --shared-cares \
|
---|
[bbaebd0] | 125 | --shared-libuv \
|
---|
[d94c86c9] | 126 | --shared-nghttp2 \
|
---|
[ce508efa] | 127 | --shared-openssl \
|
---|
| 128 | --shared-zlib \
|
---|
[57141410] | 129 | --with-intl=full-icu &&
|
---|
[4464d405] | 130 | make</userinput></screen>
|
---|
| 131 |
|
---|
[d56e7df] | 132 | <para>
|
---|
[ee1676a] | 133 | To test the results, issue: <command>make test-only</command>.
|
---|
| 134 | <!--One test, test-dns, is known to fail.-->
|
---|
| 135 | <!-- When using make check, a module is used that wasn't shipped properly
|
---|
| 136 | with the 12.16.2 release. See Ticket #13379 for details. We should
|
---|
| 137 | probably restore "make check" after the next version of Node.js.
|
---|
| 138 | This new command skips the documentation and lint checks. -renodr-->
|
---|
[6914a417] | 139 | </para>
|
---|
[4464d405] | 140 |
|
---|
| 141 | <para>
|
---|
| 142 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 143 | </para>
|
---|
| 144 |
|
---|
| 145 | <screen role="root"><userinput>make install &&
|
---|
| 146 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
| 147 | </sect2>
|
---|
| 148 |
|
---|
| 149 | <sect2 role="commands">
|
---|
| 150 | <title>Command Explanations</title>
|
---|
| 151 |
|
---|
[57141410] | 152 | <!--
|
---|
[d56e7df] | 153 | <para>
|
---|
[57141410] | 154 | <parameter>- -with-intl=system-icu</parameter>: use the system version
|
---|
[d56e7df] | 155 | of <application>icu</application>. Other values are
|
---|
| 156 | <option>full-icu</option> (to build a local, full
|
---|
| 157 | <application>icu</application> library) and <option>small-icu</option>
|
---|
| 158 | (to build a local, minimal <application>icu</application> library).
|
---|
| 159 | </para>
|
---|
[57141410] | 160 | -->
|
---|
| 161 |
|
---|
| 162 | <!-- These two options are due to using the internal ICU version.
|
---|
| 163 | This prevents problems with ICU-67 -->
|
---|
| 164 | <para>
|
---|
| 165 | <parameter>--with-intl=full-icu</parameter>: This switch forces Node.js
|
---|
| 166 | to use its internal version of ICU.
|
---|
| 167 | </para>
|
---|
| 168 |
|
---|
| 169 | <para>
|
---|
| 170 | <parameter>--download=icu</parameter>: This switch downloads the version
|
---|
| 171 | of ICU that is appropriate for this version of Node.js.
|
---|
| 172 | </para>
|
---|
[4464d405] | 173 |
|
---|
[d56e7df] | 174 | <para>
|
---|
| 175 | <parameter>--shared-{cares,libuv,nghttp2,openssl,zlib}</parameter>:
|
---|
| 176 | use the system installed libraries instead of local copies.
|
---|
| 177 | </para>
|
---|
[4464d405] | 178 |
|
---|
[d56e7df] | 179 | <para>
|
---|
| 180 | <option>--without-npm</option>: do not build
|
---|
| 181 | <application>npm</application> (use if you'd like to build a separate
|
---|
| 182 | <application>npm</application> later).
|
---|
| 183 | </para>
|
---|
[4464d405] | 184 |
|
---|
[d56e7df] | 185 | <para>
|
---|
| 186 | <option>--shared-http-parser</option>: use the system
|
---|
| 187 | installed library instead of a local copy.
|
---|
| 188 | </para>
|
---|
[4464d405] | 189 |
|
---|
| 190 | </sect2>
|
---|
| 191 |
|
---|
| 192 | <sect2 role="content">
|
---|
| 193 | <title>Contents</title>
|
---|
| 194 |
|
---|
| 195 | <segmentedlist>
|
---|
| 196 | <segtitle>Installed Programs</segtitle>
|
---|
| 197 | <segtitle>Installed Library</segtitle>
|
---|
| 198 | <segtitle>Installed Directories</segtitle>
|
---|
| 199 |
|
---|
| 200 | <seglistitem>
|
---|
| 201 | <seg>
|
---|
[d4e93ea2] | 202 | node, npm, and npx
|
---|
[4464d405] | 203 | </seg>
|
---|
| 204 | <seg>
|
---|
| 205 | None
|
---|
| 206 | </seg>
|
---|
| 207 | <seg>
|
---|
[6a43232] | 208 | /usr/include/node,
|
---|
[ee1676a] | 209 | /usr/lib/node_modules/npm,
|
---|
| 210 | /usr/share/doc/{node,node-&nodejs-version;}, and
|
---|
[6a43232] | 211 | /usr/share/systemtap/tapset
|
---|
[4464d405] | 212 | </seg>
|
---|
| 213 | </seglistitem>
|
---|
| 214 | </segmentedlist>
|
---|
| 215 |
|
---|
| 216 | <variablelist>
|
---|
| 217 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 218 | <?dbfo list-presentation="list"?>
|
---|
| 219 | <?dbhtml list-presentation="table"?>
|
---|
| 220 |
|
---|
| 221 | <varlistentry id="node">
|
---|
| 222 | <term><command>node</command></term>
|
---|
| 223 | <listitem>
|
---|
| 224 | <para>
|
---|
| 225 | is the server-side JavaScript runtime.
|
---|
| 226 | </para>
|
---|
| 227 | <indexterm zone="nodejs node">
|
---|
| 228 | <primary sortas="b-node">node</primary>
|
---|
| 229 | </indexterm>
|
---|
| 230 | </listitem>
|
---|
| 231 | </varlistentry>
|
---|
| 232 |
|
---|
| 233 | <varlistentry id="npm">
|
---|
| 234 | <term><command>npm</command></term>
|
---|
| 235 | <listitem>
|
---|
| 236 | <para>
|
---|
| 237 | is the <application>Node.js</application> package manager.
|
---|
| 238 | </para>
|
---|
| 239 | <indexterm zone="nodejs npm">
|
---|
| 240 | <primary sortas="b-npm">npm</primary>
|
---|
| 241 | </indexterm>
|
---|
| 242 | </listitem>
|
---|
| 243 | </varlistentry>
|
---|
| 244 |
|
---|
| 245 | <varlistentry>
|
---|
| 246 | <term><filename class='directory'>/usr/lib/node_modules/npm/</filename></term>
|
---|
| 247 | <listitem>
|
---|
[d56e7df] | 248 | <para>
|
---|
| 249 | is the installation root for Node.js executables and libraries.
|
---|
| 250 | </para>
|
---|
[4464d405] | 251 | </listitem>
|
---|
| 252 | </varlistentry>
|
---|
| 253 |
|
---|
| 254 | </variablelist>
|
---|
| 255 |
|
---|
| 256 | </sect2>
|
---|
| 257 |
|
---|
| 258 | </sect1>
|
---|