「Herobox/sensors」の版間の差分
提供: fukudat.net
< Herobox
ナビゲーションに移動検索に移動
| 18行目: | 18行目: | ||
== Configure == | == Configure == | ||
| − | + | 以下のファイルを準備。 | |
~/git/sensors/bin/dbconfig.json | ~/git/sensors/bin/dbconfig.json | ||
| 42行目: | 42行目: | ||
</pre> | </pre> | ||
| − | + | どれもパスワードが含まれるので、他者から読まれないように chmod する。 | |
<pre> | <pre> | ||
| − | + | $ chmod og-rwx dbconfig.json httpconfig.json | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
</pre> | </pre> | ||
2020年10月21日 (水) 23:50時点における最新版
Install
codeをget
cd ~/git git clone ssh://fukudat.net/var/git/sensors
python library を install
cd ~/git/sensors pip install -r requirements.txt
perl library を install
sudo cpan LWP LWP::protocol::https DBI DBD::mysql
Configure
以下のファイルを準備。
~/git/sensors/bin/dbconfig.json
{
"db": "experiment",
"user": "experiment",
"passwd": "パスワード",
"table": "radiation"
}
httpconfig.json
{
"protocol": "https",
"host": "fukudat.net",
"port": 443,
"realm": "PRIVATE",
"user": "ユーザ名",
"passwd": "パスワード"
}
どれもパスワードが含まれるので、他者から読まれないように chmod する。
$ chmod og-rwx dbconfig.json httpconfig.json