LoginSignup
0
0

More than 5 years have passed since last update.

【俺メモ】CentOS7にNode.js+SQLite3環境をインストール

Posted at

うーん、インストールでコケたからメモっておく。
下の手順はうまくいった後やで。

使用するツール・ライブラリ等

nodebrew

Node.jsのバージョンごとに環境を切り替えてくれるツールや。
これでインストールから切り替えも楽チンやで。
nodebrew - Node.js version manager

node-sqlite3

Node.js用のSQLite3に接続するパッケージや。
Asynchronous, non-blocking SQLite3 bindings for Node.js

node-pre-gyp

Node.jsでC++のバイナリをコンパイル?(よく調べてないけど)するためのものっぽい。
Node.js tool for easy binary deployment of C++ addons

インストール

SQLite3インストール

$ sudo yum install sqlite3

Node.jsバージョン指定

node-sqlite3がNode.jsのバージョンを指定してるから注意な。
指定のバージョンは上の公式ページ(GitHub)のサイトに書いてあるからチェックや。

$ nodebrew install-binary v5.11.0
$ nodebrew use v5.11.0
$ node -v

node-pre-gypとnode-sqlite3インストール

$ npm install -g node-pre-gyp
$ npm install -g node-sqlite3

もしかすると、node-pre-gypいらへんかもしれへんわ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0