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