「Herobox/sensors」の版間の差分
提供: fukudat.net
< Herobox
ナビゲーションに移動検索に移動
(ページの作成:「== Install == codeをget <pre> cd ~/git git clone ssh://fukudat.net/var/git/sensors </pre> python library を install <pre> cd ~/git/sensors pip install -r requirements.…」) |
|||
| (同じ利用者による、間の1版が非表示) | |||
| 15行目: | 15行目: | ||
<pre> | <pre> | ||
sudo cpan LWP LWP::protocol::https DBI DBD::mysql | sudo cpan LWP LWP::protocol::https DBI DBD::mysql | ||
| + | </pre> | ||
| + | |||
| + | == Configure == | ||
| + | 以下のファイルを準備。 | ||
| + | |||
| + | ~/git/sensors/bin/dbconfig.json | ||
| + | <pre> | ||
| + | { | ||
| + | "db": "experiment", | ||
| + | "user": "experiment", | ||
| + | "passwd": "パスワード", | ||
| + | "table": "radiation" | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | httpconfig.json | ||
| + | <pre> | ||
| + | { | ||
| + | "protocol": "https", | ||
| + | "host": "fukudat.net", | ||
| + | "port": 443, | ||
| + | "realm": "PRIVATE", | ||
| + | "user": "ユーザ名", | ||
| + | "passwd": "パスワード" | ||
| + | } | ||
| + | </pre> | ||
| + | |||
| + | どれもパスワードが含まれるので、他者から読まれないように chmod する。 | ||
| + | <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