LoginSignup
0
1

More than 3 years have passed since last update.

初心者が機械学習をやってみたら(その2)

Last updated at Posted at 2020-07-10

やっとのおもいで、ヘッドレスのJetsonの設定が完了しました。

ここからは、ネットワーク上のJetsonに接続して、環境を整えていきます。

まずは、開発言語であるPython3の環境と整えたいと思います。

の前に、リポジトリのアップデートを実施します。

1.リポジトリアップデート

以下、コマンドを実行しアップデートを行う。

$ sudo apt update
[sudo] password for dlinano: 
# パスワードを入力してください。

2.Python3環境設定(最新化)

以下、コマンドを実行し最新化する。

$ sudo apt install python3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3 is already the newest version (3.6.7-1~18.04).
python3 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 312 not upgraded.

私の環境は、最新のようでした。

3.MongoDBインストール・環境設定

3.1.MongoDBインストール

以下、コマンドを実行しMongoDBインストール

$ sudo apt install mongodb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libboost-program-options1.65.1 libgoogle-perftools4 libtcmalloc-minimal4
  libyaml-cpp0.5v5 mongo-tools mongodb-clients mongodb-server
  mongodb-server-core
The following NEW packages will be installed:
  libboost-program-options1.65.1 libgoogle-perftools4 libtcmalloc-minimal4
  libyaml-cpp0.5v5 mongo-tools mongodb mongodb-clients mongodb-server
  mongodb-server-core
0 upgraded, 9 newly installed, 0 to remove and 312 not upgraded.
Need to get 47.6 MB of archives.
After this operation, 203 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

「Y」を入力しインストールする。

3.2.MongoDB動作確認

以下、コマンドにてMongoDBのインストール、動作確認を行う。

$ mongo
(略)
>

となれば、インストール、動作の確認は完了です。
「Ctrl+C」にて終了させてください。

3.3.MongoDB環境設定

MongoDBに対し外部からアクセスを可能とする。
以下のファイルを変更する。
(ログインユーザに書き込み権が無いため、編集時は「sudo」してください)

/etc/mongodb.conf
bind_ip = 127.0.0.1

自端末からのみアクセス可能を外部からのアクセス可能に変更する。

/etc/mongodb.conf
#bind_ip = 127.0.0.1
# コメントアウト

bind_ip = 0.0.0.0
# 0.0.0.0に変更する

MongoDBを再起動し、設定を反映させる。

$ sudo /etc/init.d/mongodb restart
[ ok ] Restarting mongodb (via systemctl): mongodb.service.

これで、開発環境、DBMSの設定が完了したと思われます。
開発のライブラリは、必要に応じてセットアップすることになります。

何とかスタートラインにはたどり着いたかな。
この先も、試行錯誤していきます。

関連(連載)

初心者が機械学習をやってみたら(その0)
初心者が機械学習をやってみたら(その3)

0
1
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
1