1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ラズパイコマンド/インストール後の設定

1
Last updated at Posted at 2021-12-22

#インストール
公式のインストーラーが出たらしい。
https://www.indoorcorgielec.com/resources/raspberry-pi/raspberry-pi-os%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/

古い機種だとLegacyOSのイメージをいれた方がよさそう。

SDカード

32GB UHS-I U1 A1 Class10

32GB UHS-I U1 A1 Class10
容量 inteface UHS-Speedclass AppPerformace SD-Speedclass
image.png

基本

機種名を確認
cat /proc/device-tree/model

OSを確認: uname -a
エディタ : nano (CUIエディタ)
https://qiita.com/snct_hu/items/971d512c26dd8b3a3b3c

conda : miniconda か BerryConda
https://qiita.com/bouningen98/items/720c327642f934ad29a5

condaのコマンド:Anaconda でよく使うコマンド一覧
https://qiita.com/naz_/items/84634fbd134fbcd25296

ssh: 
windows10はデフォルトでsshコマンドが使える。
ssh pi@192.169.0.xx -p 22
ポートは22

sudo apt-get update
sudo apt-get upgrade

ROOTパスワードの変更
sudo passwd root

lsの文字色を変える。
https://raspi.ryo.sc/ls_color/

コマンド

シェルの再起動 exec $SHELL -l

pythonメモ

モジュール検索パス

import sys
import pprint

pprint.pprint(sys.path)

pipでインストールしたパッケージの場所を調べる

pip show [パッケージ名]

crontab

pythonスクリプト等、コード中は絶対パスを使う事。

cronサービスが動いているか確認
sudo apt-get install chkconfig
chkconfig cron

cronを有効化
sudo systemctl enable cron

logを確認
less /var/log/cron.log

conda

wget https://github.com/jjhelmus/berryconda/releases/download/v2.0.0/Berryconda3-2.0.0-Linux-armv7l.sh
chmodして.shを実行する、
conda create -n hogehoge
source activate hogehoge

cron設定

https://www.kagoya.jp/howto/it-glossary/server/cron/
【例3】毎月10日の午前4時59日にコマンド「/home/test01/test.sh」を実行する場合
59 04 10 * * /home/test01/test.sh

例1 10分ごとに実行する。2行目は省略した書き方。
0,10,20,30,40,50 * * * * ruby hello.rb
*/10 * * * * ruby hello.rb

再起動 sudo systemctl restart cron

samba

参考)
https://qiita.com/neomi/items/645e2c7184210f989828

一度つながったが繋がらなくなった。
image.png

#telnet port23
https://spaghettiprogramming.blog.jp/archives/7193766.html

ラズパイ固定IP( wifi)

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?