Homebrew & Python3(pip3)インストール on MacOS High Sierra - Opensourcetechブログ





bash-3.2$ brew install nodebrew
==> Downloading
==> Downloading from
######################################################################## 100.0%
==> Caveats
You need to manually run setup_dirs to create directories required by nodebrew:
/usr/local/opt/nodebrew/bin/nodebrew setup_dirs

Add path:
export PATH=$HOME/.nodebrew/current/bin:$PATH

To use Homebrew's directories rather than ~/.nodebrew add to your profile:
export NODEBREW_ROOT=/usr/local/var/nodebrew

Bash completion has been installed to:

zsh completions have been installed to:
==> Summary
🍺 /usr/local/Cellar/nodebrew/1.0.1: 8 files, 38.6KB, built in 16 seconds
bash-3.2$ nodebrew -v
nodebrew 1.0.1

nodebrew help Show this message
nodebrew install <version> Download and install <version> (from binary)
nodebrew compile <version> Download and install <version> (from source)
nodebrew install-binary <version> Alias of `install` (For backword compatibility)
nodebrew uninstall <version> Uninstall <version>
nodebrew use <version> Use <version>
nodebrew list List installed versions
nodebrew ls Alias for `list`
nodebrew ls-remote List remote versions
nodebrew ls-all List remote and installed versions
nodebrew alias <key> <value> Set alias
nodebrew unalias <key> Remove alias
nodebrew clean <version> | all Remove source file
nodebrew selfupdate Update nodebrew
nodebrew migrate-package <version> Install global NPM packages contained in <version> to current version
nodebrew exec <version> -- <command> Execute <command> using specified <version>

# install
nodebrew install v8.9.4

# use a specific version number
nodebrew use v8.9.4





「export "PATH=$HOME/.nodebrew/current/bin:$PATH"」

bash-3.2$ cd
bash-3.2$ vi .bash_profile
bash-3.2$ cat .bash_profile
# add for nodebrew(Node.js)
export "PATH=$HOME/.nodebrew/current/bin:$PATH"

bash-3.2$ source .bash_profile





XYZ:~ Yoshiki$ nodebrew ls-remote・・・利用可能バージョンの確認
v0.0.1 v0.0.2 v0.0.3 v0.0.4 v0.0.5 v0.0.6

v0.1.0 v0.1.1 v0.1.2 v0.1.3 v0.1.4 v0.1.5 v0.1.6 v0.1.7
v0.1.8 v0.1.9 v0.1.10 v0.1.11 v0.1.12 v0.1.13 v0.1.14 v0.1.15
v0.1.16 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.9.12

v0.10.0 v0.10.1 v0.10.2 v0.10.3 v0.10.4 v0.10.5 v0.10.6 v0.10.7
v0.10.8 v0.10.9 v0.10.10 v0.10.11 v0.10.12 v0.10.13 v0.10.14 v0.10.15
v0.10.16 v0.10.17 v0.10.18 v0.10.19 v0.10.20 v0.10.21 v0.10.22 v0.10.23
v0.10.24 v0.10.25 v0.10.26 v0.10.27 v0.10.28 v0.10.29 v0.10.30 v0.10.31
v0.10.32 v0.10.33 v0.10.34 v0.10.35 v0.10.36 v0.10.37 v0.10.38 v0.10.39
v0.10.40 v0.10.41 v0.10.42 v0.10.43 v0.10.44 v0.10.45 v0.10.46 v0.10.47

v0.11.0 v0.11.1 v0.11.2 v0.11.3 v0.11.4 v0.11.5 v0.11.6 v0.11.7
v0.11.8 v0.11.9 v0.11.10 v0.11.11 v0.11.12 v0.11.13 v0.11.14 v0.11.15

v0.12.0 v0.12.1 v0.12.2 v0.12.3 v0.12.4 v0.12.5 v0.12.6 v0.12.7
v0.12.8 v0.12.9 v0.12.10 v0.12.11 v0.12.12 v0.12.13 v0.12.14 v0.12.15
v0.12.16 v0.12.17 v0.12.18

v4.0.0 v4.1.0 v4.1.1 v4.1.2 v4.2.0 v4.2.1 v4.2.2 v4.2.3
v4.2.4 v4.2.5 v4.2.6 v4.3.0 v4.3.1 v4.3.2 v4.4.0 v4.4.1
v4.4.2 v4.4.3 v4.4.4 v4.4.5 v4.4.6 v4.4.7 v4.5.0 v4.6.0
v4.6.1 v4.6.2 v4.7.0 v4.7.1 v4.7.2 v4.7.3 v4.8.0 v4.8.1
v4.8.2 v4.8.3 v4.8.4 v4.8.5 v4.8.6 v4.8.7 v4.9.0 v4.9.1

v5.0.0 v5.1.0 v5.1.1 v5.2.0 v5.3.0 v5.4.0 v5.4.1 v5.5.0
v5.6.0 v5.7.0 v5.7.1 v5.8.0 v5.9.0 v5.9.1 v5.10.0 v5.10.1
v5.11.0 v5.11.1 v5.12.0

v6.0.0 v6.1.0 v6.2.0 v6.2.1 v6.2.2 v6.3.0 v6.3.1 v6.4.0
v6.5.0 v6.6.0 v6.7.0 v6.8.0 v6.8.1 v6.9.0 v6.9.1 v6.9.2
v6.9.3 v6.9.4 v6.9.5 v6.10.0 v6.10.1 v6.10.2 v6.10.3 v6.11.0
v6.11.1 v6.11.2 v6.11.3 v6.11.4 v6.11.5 v6.12.0 v6.12.1 v6.12.2
v6.12.3 v6.13.0 v6.13.1 v6.14.0 v6.14.1 v6.14.2 v6.14.3 v6.14.4
v6.15.0 v6.15.1 v6.16.0 v6.17.0 v6.17.1

v7.0.0 v7.1.0 v7.2.0 v7.2.1 v7.3.0 v7.4.0 v7.5.0 v7.6.0
v7.7.0 v7.7.1 v7.7.2 v7.7.3 v7.7.4 v7.8.0 v7.9.0 v7.10.0

v8.0.0 v8.1.0 v8.1.1 v8.1.2 v8.1.3 v8.1.4 v8.2.0 v8.2.1
v8.3.0 v8.4.0 v8.5.0 v8.6.0 v8.7.0 v8.8.0 v8.8.1 v8.9.0
v8.9.1 v8.9.2 v8.9.3 v8.9.4 v8.10.0 v8.11.0 v8.11.1 v8.11.2
v8.11.3 v8.11.4 v8.12.0 v8.13.0 v8.14.0 v8.14.1 v8.15.0 v8.15.1

v9.0.0 v9.1.0 v9.2.0 v9.2.1 v9.3.0 v9.4.0 v9.5.0 v9.6.0
v9.6.1 v9.7.0 v9.7.1 v9.8.0 v9.9.0 v9.10.0 v9.10.1 v9.11.0
v9.11.1 v9.11.2

v10.0.0 v10.1.0 v10.2.0 v10.2.1 v10.3.0 v10.4.0 v10.4.1 v10.5.0
v10.6.0 v10.7.0 v10.8.0 v10.9.0 v10.10.0 v10.11.0 v10.12.0 v10.13.0
v10.14.0 v10.14.1 v10.14.2 v10.15.0 v10.15.1 v10.15.2 v10.15.3

v11.0.0 v11.1.0 v11.2.0 v11.3.0 v11.4.0 v11.5.0 v11.6.0 v11.7.0
v11.8.0 v11.9.0 v11.10.0 v11.10.1 v11.11.0 v11.12.0 v11.13.0

io@v1.0.0 io@v1.0.1 io@v1.0.2 io@v1.0.3 io@v1.0.4 io@v1.1.0 io@v1.2.0 io@v1.3.0
io@v1.4.1 io@v1.4.2 io@v1.4.3 io@v1.5.0 io@v1.5.1 io@v1.6.0 io@v1.6.1 io@v1.6.2
io@v1.6.3 io@v1.6.4 io@v1.7.1 io@v1.8.1 io@v1.8.2 io@v1.8.3 io@v1.8.4

io@v2.0.0 io@v2.0.1 io@v2.0.2 io@v2.1.0 io@v2.2.0 io@v2.2.1 io@v2.3.0 io@v2.3.1
io@v2.3.2 io@v2.3.3 io@v2.3.4 io@v2.4.0 io@v2.5.0

io@v3.0.0 io@v3.1.0 io@v3.2.0 io@v3.3.0 io@v3.3.1

XYZ:~ Yoshiki$ nodebrew install-binary latest・・・最新をインストール
######################################################################### 100.0%
Installed successfully
XYZ:~ Yoshiki$ nodebrew list・・・インストールされているバージョン一覧

current: none

XYZ:~ Yoshiki$ nodebrew use v11.13.0・・・指定バージョンの使用
use v11.13.0
XYZ:~ Yoshiki$ nodebrew list

current: v11.13.0

bash-3.2$ node -v・・・バージョン確認





bash-3.2$ man node > /tmp/
bash-3.2$ cat /tmp/

NODE(1) BSD General Commands Manual NODE(1)

node -- server-side JavaScript runtime

node [options] [v8-options] [-e string | script.js | -] [--]
[arguments ...]
node inspect [-e string | script.js | - | <host>:<port>] ...
node [--v8-options]

Node.js is a set of libraries for JavaScript which allows it to be used
outside of the browser. It is primarily focused on creating simple,
easy-to-build network clients and servers.

Execute node without arguments to start a REPL.

- Alias for stdin, analogous to the use of - in other command-line
utilities. The executed script is read from stdin, and remaining
arguments are passed to the script.

-- Indicate the end of command-line options. Pass the rest of the
arguments to the script.

If no script filename or eval/print script is supplied prior to
this, then the next argument will be used as a script filename.

Aborting instead of exiting causes a core file to be generated
for analysis.

Print source-able bash completion script for Node.js.

Location at which the diagnostic report will be generated.

Name of the file to which the diagnostic report will be written.

Enables the diagnostic report to be triggered on fatal errors
(internal errors within the Node.js runtime such as out of mem-
ory) that leads to termination of the application, if
--experimental-report is enabled. Useful to inspect various diag-
nostic data elements such as heap, stack, event loop state,
resource consumption etc. to reason about the fatal error.

Enables diagnostic report to be generated upon receiving the
specified (or predefined) signal to the running Node.js process,
if --experimental-report is enabled. Default signal is SIGUSR2.

Sets or resets the signal for diagnostic report generation (not
supported on Windows). Default signal is SIGUSR2.

Enables diagnostic report to be generated on un-caught excep-
tions, if --experimental-report is enabled. Useful when inspect-
ing JavaScript stack in conjunction with native stack and other
runtime environment data.

Enable FIPS-compliant crypto at startup. Requires Node.js to be
built with ./configure --openssl-fips.

Enable experimental ES module support and caching modules.

Use the specified file as a security policy.

Enable experimental top-level await keyword support in REPL.

Enable experimental diagnostic report feature.

Enable experimental ES module support in VM module.

Force FIPS-compliant crypto on startup (Cannot be disabled from
script code). Same requirements as --enable-fips.

Enable experimental frozen intrinsics support.

Chooses an HTTP parser library. Available values are llhttp or

Specify ICU data load path. Overrides NODE_ICU_DATA.

Activate inspector on host:port and break at start of user

Set the host:port to be used when the inspector is activated.

Activate inspector on host:port. Default is

V8 Inspector integration allows attaching Chrome DevTools and
IDEs to Node.js instances for debugging and profiling. It uses
the Chrome DevTools Protocol.

Specify the file as a custom loader, to load

Specify the maximum size of HTTP headers in bytes. Defaults to

This option is a no-op. It is kept for compatibility.

Silence deprecation warnings.

Disable runtime checks for `async_hooks`. These will still be
enabled dynamically when `async_hooks` is enabled.

Silence all process warnings (including deprecations).

Load an OpenSSL configuration file on startup. Among other uses,
this can be used to enable FIPS-compliant crypto if Node.js is
built with ./configure --openssl-fips.

Emit pending deprecation warnings.

Instructs the module loader to preserve symbolic links when
resolving and caching modules other than the main module.

Instructs the module loader to preserve symbolic links when
resolving and caching the main module.

--prof Generate V8 profiler output.

Process V8 profiler output generated using the V8 option --prof.

Write process warnings to the given file instead of printing to

Throw errors for deprecations.

Specify process.title on startup.

Specify an alternative default TLS cipher list. Requires Node.js
to be built with crypto support. (Default)

Print stack traces for deprecations.

--trace-event-categories categories
A comma-separated list of categories that should be traced when
trace event tracing is enabled using --trace-events-enabled.

--trace-event-file-pattern pattern
Template string specifying the filepath for the trace event data,
it supports ${rotation} and ${pid}.

Enable the collection of trace event tracing information.

Print a stack trace whenever synchronous I/O is detected after
the first turn of the event loop.

Print stack traces for process warnings (including deprecations).

Track heap object allocations for heap snapshots.

--use-bundled-ca, --use-openssl-ca
Use bundled Mozilla CA store as supplied by current Node.js ver-
sion or use OpenSSL's default CA store. The default store is
selectable at build-time.

The bundled CA store, as supplied by Node.js, is a snapshot of
Mozilla CA store that is fixed at release time. It is identical
on all supported platforms.

Using OpenSSL store allows for external modifications of the
store. For most Linux and BSD distributions, this store is main-
tained by the distribution maintainers and system administrators.
OpenSSL CA store location is dependent on configuration of the
OpenSSL library but this can be altered at runtime using environ-
ment variables.


Print V8 command-line options.

Set V8's thread pool size which will be used to allocate back-
ground jobs. If set to 0 then V8 will choose an appropriate size
of the thread pool based on the number of online processors. If
the value provided is larger than V8's maximum, then the largest
value will be chosen.

Automatically zero-fills all newly allocated Buffer and Slow-
Buffer instances.

-c, --check
Check the script's syntax without executing it. Exits with an
error code if script is invalid.

-e, --eval string
Evaluate string as JavaScript.

-h, --help
Print command-line options. The output of this option is less
detailed than this document.

-i, --interactive
Open the REPL even if stdin does not appear to be a terminal.

-p, --print string
Identical to -e, but prints the result.

-r, --require module
Preload the specified module at startup. Follows `require()`'s
module resolution rules. module may be either a path to a file,
or a Node.js module name.

-v, --version
Print node's version.

NODE_DEBUG modules...
Comma-separated list of core modules that should print debug

Comma-separated list of C++ core modules that should print debug

When set to 1, colors will not be used in the REPL.

When set, the well-known ``root'' CAs (like VeriSign) will be
extended with the extra certificates in file. The file should
consist of one or more trusted certificates in PEM format.

If file is missing or misformatted, a message will be emitted
once using process.emitWarning(), but any errors are otherwise

This environment variable is ignored when `node` runs as setuid
root or has Linux file capabilities set.

Data path for ICU (Intl object) data. Will extend linked-in data
when compiled with small-icu support.

When set to 1, process warnings are silenced.

NODE_OPTIONS options...
A space-separated list of command-line options, which are inter-
preted as if they had been specified on the command-line before
the actual command (so they can be overridden). Node.js will
exit with an error if an option that is not allowed in the envi-
ronment is used, such as --print or a script file.

NODE_PATH directories...
A colon-separated list of directories prefixed to the module
search path.

When set to 1, emit pending deprecation warnings.

When set to 1, the module loader preserves symbolic links when
resolving and caching modules.

Write process warnings to the given file instead of printing to
stderr. Equivalent to passing --redirect-warnings file on com-

Path to the file used to store persistent REPL history. The
default path is ~/.node_repl_history, which is overridden by this
variable. Setting the value to an empty string ("" or " ") will
disable persistent REPL history.

When set to 0, TLS certificate validation is disabled.

When set, Node.js writes JavaScript code coverage information to

Load an OpenSSL configuration file on startup. Among other uses,
this can be used to enable FIPS-compliant crypto if Node.js is
built with ./configure --openssl-fips.

If the --openssl-config command-line option is used, this envi-
ronment variable is ignored.

If --use-openssl-ca is enabled, this overrides and sets OpenSSL's
directory containing trusted certificates.

If --use-openssl-ca is enabled, this overrides and sets OpenSSL's
file containing trusted certificates.

Sets the number of threads used in libuv's threadpool to size.

Bugs are tracked in GitHub Issues:

Copyright Node.js contributors. Node.js is available under the MIT

Node.js also includes external libraries that are available under a vari-
ety of licenses. See
for the full license text.



GitHub repository & Issue Tracker:

IRC (general questions): #node.js (unofficial)

IRC (Node.js core development): #node-dev

Written and maintained by 1000+ contributors:

April 4, 2019





TCPポート7778で待ち受けて、Webクライアントからのアクセスに対して「node.js sample program」という文字列を返すシンプルなものです。

bash-3.2$ cat sample_node.js
var http = require('http');
//nginx unitでは require('http') を require('unit-http') に変更する

var server = http.createServer(function (req, res) {
  res.writeHead(200, {"Content-Type": "text/plain"});
  res.end('node.js sample program\n');






bash-3.2$ node sample_node.js







nginx unitを使って、Goアプリケーションの実行をする予定です。










にほんブログ村 IT技術ブログ Linuxへ

にほんブログ村 IT技術ブログ オープンソースへ



Opensourcetech by Takahiro Kujirai