[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 " ">
|
---|
[f7f63f8] | 9 | <!ENTITY nodejs-md5sum "f375dc584e8887203dae2cdc741de185">
|
---|
[ce508efa] | 10 | <!ENTITY nodejs-size "18 MB">
|
---|
[ce005d8d] | 11 | <!ENTITY nodejs-buildsize "321 MB">
|
---|
| 12 | <!ENTITY nodejs-time "3.7 SBU (using parallelism=4)">
|
---|
[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 |
|
---|
[cfb32e2e] | 38 | &lfs82_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 |
|
---|
| 74 | <bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
|
---|
| 75 |
|
---|
| 76 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 77 | <para role="required">
|
---|
| 78 | <xref linkend="python2"/>
|
---|
| 79 | </para>
|
---|
| 80 |
|
---|
| 81 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 82 | <para role="recommended">
|
---|
[94b42903] | 83 | <xref linkend="c-ares"/> and
|
---|
| 84 | <xref linkend="icu"/>
|
---|
[4464d405] | 85 | </para>
|
---|
| 86 |
|
---|
| 87 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 88 | <para role="optional">
|
---|
| 89 | <ulink url="https://github.com/nodejs/http-parser">http-parser</ulink>,
|
---|
| 90 | <ulink url="https://github.com/libuv/libuv">libuv</ulink>, and
|
---|
[f02583f] | 91 | <ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
|
---|
| 92 | <command>npm</command> will be installed if not present)
|
---|
[4464d405] | 93 | </para>
|
---|
| 94 |
|
---|
| 95 | <para condition="html" role="usernotes">
|
---|
| 96 | User Notes: <ulink url="&blfs-wiki;/nodejs"/>
|
---|
| 97 | </para>
|
---|
| 98 |
|
---|
| 99 | </sect2>
|
---|
| 100 |
|
---|
| 101 | <sect2 role="installation">
|
---|
| 102 | <title>Installation of Node.js</title>
|
---|
| 103 |
|
---|
| 104 | <para>
|
---|
| 105 | Build <application>Node.js</application> by running the following
|
---|
| 106 | commands:
|
---|
| 107 | </para>
|
---|
| 108 |
|
---|
[ce508efa] | 109 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 110 | --shared-cares \
|
---|
| 111 | --shared-openssl \
|
---|
| 112 | --shared-zlib \
|
---|
| 113 | --with-intl=system-icu &&
|
---|
[4464d405] | 114 | make</userinput></screen>
|
---|
| 115 |
|
---|
| 116 | <para>This package does not come with a test suite.</para>
|
---|
| 117 |
|
---|
| 118 | <para>
|
---|
| 119 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 120 | </para>
|
---|
| 121 |
|
---|
| 122 | <screen role="root"><userinput>make install &&
|
---|
| 123 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
| 124 | </sect2>
|
---|
| 125 |
|
---|
| 126 | <sect2 role="commands">
|
---|
| 127 | <title>Command Explanations</title>
|
---|
| 128 |
|
---|
[d4e87a67] | 129 | <para><parameter>--with-intl=system-icu</parameter>: use the system version
|
---|
| 130 | of <application>icu</application>. Other values are
|
---|
| 131 | <option>full-icu</option> (to build a local, full
|
---|
| 132 | <application>icu</application> library) and <option>small-icu</option> (to
|
---|
| 133 | to build a local, minimal <application>icu</application> library).</para>
|
---|
[4464d405] | 134 |
|
---|
| 135 | <para><parameter>--shared-{cares,openssl,zlib}</parameter>: use the system
|
---|
| 136 | installed libraries instead of local copies.</para>
|
---|
| 137 |
|
---|
| 138 | <para><option>--without-npm</option>: do not build
|
---|
| 139 | <application>npm</application> (use if you'd like to build a separate
|
---|
| 140 | <application>npm</application> later).</para>
|
---|
| 141 |
|
---|
| 142 | <para><option>--shared-{http-parser,libuv}</option>: use the system
|
---|
| 143 | installed libraries instead of local copies.</para>
|
---|
| 144 |
|
---|
| 145 | </sect2>
|
---|
| 146 |
|
---|
| 147 | <sect2 role="content">
|
---|
| 148 | <title>Contents</title>
|
---|
| 149 |
|
---|
| 150 | <segmentedlist>
|
---|
| 151 | <segtitle>Installed Programs</segtitle>
|
---|
| 152 | <segtitle>Installed Library</segtitle>
|
---|
| 153 | <segtitle>Installed Directories</segtitle>
|
---|
| 154 |
|
---|
| 155 | <seglistitem>
|
---|
| 156 | <seg>
|
---|
[d4e93ea2] | 157 | node, npm, and npx
|
---|
[4464d405] | 158 | </seg>
|
---|
| 159 | <seg>
|
---|
| 160 | None
|
---|
| 161 | </seg>
|
---|
| 162 | <seg>
|
---|
[d4e93ea2] | 163 | /usr/include/node/ and
|
---|
[4464d405] | 164 | /usr/lib/node_modules/npm/
|
---|
| 165 | </seg>
|
---|
| 166 | </seglistitem>
|
---|
| 167 | </segmentedlist>
|
---|
| 168 |
|
---|
| 169 | <variablelist>
|
---|
| 170 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 171 | <?dbfo list-presentation="list"?>
|
---|
| 172 | <?dbhtml list-presentation="table"?>
|
---|
| 173 |
|
---|
| 174 | <varlistentry id="node">
|
---|
| 175 | <term><command>node</command></term>
|
---|
| 176 | <listitem>
|
---|
| 177 | <para>
|
---|
| 178 | is the server-side JavaScript runtime.
|
---|
| 179 | </para>
|
---|
| 180 | <indexterm zone="nodejs node">
|
---|
| 181 | <primary sortas="b-node">node</primary>
|
---|
| 182 | </indexterm>
|
---|
| 183 | </listitem>
|
---|
| 184 | </varlistentry>
|
---|
| 185 |
|
---|
| 186 | <varlistentry id="npm">
|
---|
| 187 | <term><command>npm</command></term>
|
---|
| 188 | <listitem>
|
---|
| 189 | <para>
|
---|
| 190 | is the <application>Node.js</application> package manager.
|
---|
| 191 | </para>
|
---|
| 192 | <indexterm zone="nodejs npm">
|
---|
| 193 | <primary sortas="b-npm">npm</primary>
|
---|
| 194 | </indexterm>
|
---|
| 195 | </listitem>
|
---|
| 196 | </varlistentry>
|
---|
| 197 |
|
---|
| 198 | <varlistentry>
|
---|
| 199 | <term><filename class='directory'>/usr/lib/node_modules/npm/</filename></term>
|
---|
| 200 | <listitem>
|
---|
[542d478] | 201 | <para>is the installation root for Node.js executables and
|
---|
[4464d405] | 202 | libraries.</para>
|
---|
| 203 | </listitem>
|
---|
| 204 | </varlistentry>
|
---|
| 205 |
|
---|
| 206 | </variablelist>
|
---|
| 207 |
|
---|
| 208 | </sect2>
|
---|
| 209 |
|
---|
| 210 | </sect1>
|
---|