[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 |
|
---|
| 7 | <!ENTITY nodejs-download-http "https://github.com/nodejs/node/archive/v&nodejs-version;.tar.gz">
|
---|
| 8 | <!ENTITY nodejs-download-ftp " ">
|
---|
[d4e87a67] | 9 | <!ENTITY nodejs-md5sum "24bfdd2f3d96818608a508482c1e3cd8">
|
---|
[4464d405] | 10 | <!ENTITY nodejs-size "45 MB">
|
---|
[d4e87a67] | 11 | <!ENTITY nodejs-buildsize "432 MB">
|
---|
| 12 | <!ENTITY nodejs-time "9.3 SBU">
|
---|
[4464d405] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
|
---|
| 16 | <?dbhtml filename="nodejs.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy: $</othername>
|
---|
| 20 | <date>$Date: $</date>
|
---|
| 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 |
|
---|
| 38 | &lfs80_checked;
|
---|
| 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 | <note>
|
---|
| 75 | <para>
|
---|
| 76 | The <application>Node.js</application> source tarball shown above
|
---|
| 77 | downloads with the correct name, node-&nodejs-version;.tar.gz,
|
---|
| 78 | if using a browser such as Firefox. If you prefer to use a command line
|
---|
| 79 | program such as wget, you normally would obtain
|
---|
| 80 | v&nodejs-version;.tar.gz. To obtain this package with the proper
|
---|
| 81 | filename, run:
|
---|
| 82 | </para>
|
---|
| 83 |
|
---|
| 84 | <screen><userinput>wget -c https://github.com/nodejs/node/archive/v&nodejs-version;.tar.gz \
|
---|
| 85 | -O node-&nodejs-version;.tar.gz</userinput></screen>
|
---|
| 86 |
|
---|
| 87 | </note>
|
---|
| 88 |
|
---|
[0639bb6] | 89 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[d4e87a67] | 90 | <itemizedlist spacing="compact">
|
---|
| 91 | <listitem>
|
---|
| 92 | <para>
|
---|
| 93 | Required patch for use with ICU >= 59:
|
---|
| 94 | <ulink url="&patch-root;/node-&nodejs-version;-icu59-1.patch"/>
|
---|
| 95 | </para>
|
---|
| 96 | </listitem>
|
---|
| 97 | </itemizedlist>
|
---|
| 98 |
|
---|
[4464d405] | 99 | <bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
|
---|
| 100 |
|
---|
| 101 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 102 | <para role="required">
|
---|
| 103 | <xref linkend="python2"/>
|
---|
| 104 | </para>
|
---|
| 105 |
|
---|
| 106 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 107 | <para role="recommended">
|
---|
[d4e87a67] | 108 | <xref linkend="c-ares"/>,
|
---|
| 109 | <xref linkend="icu"/>, and
|
---|
[4464d405] | 110 | <xref linkend="openssl"/>
|
---|
| 111 | </para>
|
---|
| 112 |
|
---|
| 113 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 114 | <para role="optional">
|
---|
| 115 | <ulink url="https://github.com/nodejs/http-parser">http-parser</ulink>,
|
---|
| 116 | <ulink url="https://github.com/libuv/libuv">libuv</ulink>, and
|
---|
| 117 | <ulink url="https://www.npmjs.com/">npm</ulink>, (internal versions of
|
---|
| 118 | these packages will be used if they are not present)
|
---|
| 119 | </para>
|
---|
| 120 |
|
---|
| 121 | <para condition="html" role="usernotes">
|
---|
| 122 | User Notes: <ulink url="&blfs-wiki;/nodejs"/>
|
---|
| 123 | </para>
|
---|
| 124 |
|
---|
| 125 | </sect2>
|
---|
| 126 |
|
---|
| 127 | <sect2 role="installation">
|
---|
| 128 | <title>Installation of Node.js</title>
|
---|
| 129 |
|
---|
[d4e87a67] | 130 | <para>
|
---|
| 131 | First, fix a build issue with <application>icu</application> >= 59:
|
---|
| 132 | </para>
|
---|
| 133 |
|
---|
| 134 | <screen><userinput>patch -Np1 -i ../node-&nodejs-version;-icu59-1.patch</userinput></screen>
|
---|
| 135 |
|
---|
[4464d405] | 136 | <para>
|
---|
| 137 | Build <application>Node.js</application> by running the following
|
---|
| 138 | commands:
|
---|
| 139 | </para>
|
---|
| 140 |
|
---|
| 141 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 142 | --shared-cares \
|
---|
| 143 | --shared-openssl \
|
---|
| 144 | --shared-zlib \
|
---|
[d4e87a67] | 145 | --with-intl=system-icu &&
|
---|
[4464d405] | 146 | make</userinput></screen>
|
---|
| 147 |
|
---|
| 148 | <para>This package does not come with a test suite.</para>
|
---|
| 149 |
|
---|
| 150 | <para>
|
---|
| 151 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 152 | </para>
|
---|
| 153 |
|
---|
| 154 | <screen role="root"><userinput>make install &&
|
---|
| 155 | ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
|
---|
| 156 | </sect2>
|
---|
| 157 |
|
---|
| 158 | <sect2 role="commands">
|
---|
| 159 | <title>Command Explanations</title>
|
---|
| 160 |
|
---|
[d4e87a67] | 161 | <para><parameter>--with-intl=system-icu</parameter>: use the system version
|
---|
| 162 | of <application>icu</application>. Other values are
|
---|
| 163 | <option>full-icu</option> (to build a local, full
|
---|
| 164 | <application>icu</application> library) and <option>small-icu</option> (to
|
---|
| 165 | to build a local, minimal <application>icu</application> library).</para>
|
---|
[4464d405] | 166 |
|
---|
| 167 | <para><parameter>--shared-{cares,openssl,zlib}</parameter>: use the system
|
---|
| 168 | installed libraries instead of local copies.</para>
|
---|
| 169 |
|
---|
| 170 | <para><option>--without-npm</option>: do not build
|
---|
| 171 | <application>npm</application> (use if you'd like to build a separate
|
---|
| 172 | <application>npm</application> later).</para>
|
---|
| 173 |
|
---|
| 174 | <para><option>--shared-{http-parser,libuv}</option>: use the system
|
---|
| 175 | installed libraries instead of local copies.</para>
|
---|
| 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>
|
---|
| 189 | /usr/bin/node and /usr/bin/npm
|
---|
| 190 | </seg>
|
---|
| 191 | <seg>
|
---|
| 192 | None
|
---|
| 193 | </seg>
|
---|
| 194 | <seg>
|
---|
| 195 | /usr/lib/node_modules/npm/
|
---|
| 196 | </seg>
|
---|
| 197 | </seglistitem>
|
---|
| 198 | </segmentedlist>
|
---|
| 199 |
|
---|
| 200 | <variablelist>
|
---|
| 201 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 202 | <?dbfo list-presentation="list"?>
|
---|
| 203 | <?dbhtml list-presentation="table"?>
|
---|
| 204 |
|
---|
| 205 | <varlistentry id="node">
|
---|
| 206 | <term><command>node</command></term>
|
---|
| 207 | <listitem>
|
---|
| 208 | <para>
|
---|
| 209 | is the server-side JavaScript runtime.
|
---|
| 210 | </para>
|
---|
| 211 | <indexterm zone="nodejs node">
|
---|
| 212 | <primary sortas="b-node">node</primary>
|
---|
| 213 | </indexterm>
|
---|
| 214 | </listitem>
|
---|
| 215 | </varlistentry>
|
---|
| 216 |
|
---|
| 217 | <varlistentry id="npm">
|
---|
| 218 | <term><command>npm</command></term>
|
---|
| 219 | <listitem>
|
---|
| 220 | <para>
|
---|
| 221 | is the <application>Node.js</application> package manager.
|
---|
| 222 | </para>
|
---|
| 223 | <indexterm zone="nodejs npm">
|
---|
| 224 | <primary sortas="b-npm">npm</primary>
|
---|
| 225 | </indexterm>
|
---|
| 226 | </listitem>
|
---|
| 227 | </varlistentry>
|
---|
| 228 |
|
---|
| 229 | <varlistentry>
|
---|
| 230 | <term><filename class='directory'>/usr/lib/node_modules/npm/</filename></term>
|
---|
| 231 | <listitem>
|
---|
| 232 | <para>is the installaton root for Node.js executables and
|
---|
| 233 | libraries.</para>
|
---|
| 234 | </listitem>
|
---|
| 235 | </varlistentry>
|
---|
| 236 |
|
---|
| 237 | </variablelist>
|
---|
| 238 |
|
---|
| 239 | </sect2>
|
---|
| 240 |
|
---|
| 241 | </sect1>
|
---|