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