UJP - 技術情報2 : RapsberryPi3/002/FirstSetting をテンプレートにして作成
Life is fun and easy!
不正IP報告数
Okan Sensor
Home
Information
Service
Tech(Free)
Tech(Member)
Blog
FAQ
メイン
ホーム
お知らせ
技術新着情報
組織
サービス
技術情報2
新規ページ作成
最新ページ一覧
全ページ一覧
ヘルプ
技術情報1
技術情報
ブログ
RSSサイト更新
旧ブログ
FAQ
画像ファイル管理
ログイン
ユーザー名:
パスワード:
パスワード再発行手続き
|
無料会員入会手続へ...
ブログ カテゴリ一覧
雑記
(239)
投資で凍死
(277)
時事
(514)
テレビ・ドラマ
(422)
映画
(921)
007シリーズ
(33)
刑事コロンボ
(62)
災害
(212)
スキルチャージ
(49)
放送大学
(23)
Python
(10)
検定・試験
(32)
セキュリティ
(5)
ニュース・徒然
(326)
脆弱性情報/注意喚起
(110)
スパム・フィッシング
(652)
攻撃/ブルートフォース
(24)
ツール
(130)
事故・事件
(104)
文献・統計・参考資料
(130)
ベンダ・サービス
(3)
事故被害者記録
(46)
あとで確認
(1)
システム障害事故
(55)
サイト構築
(74)
Apple
(18)
MacBook Pro
(0)
2011 13inch
(31)
2007 15inch
(1)
2008 17inch
(20)
2015 15inch
(6)
Mac Pro 2013
(11)
Apple Watch
(85)
mac mini
(0)
2018
(1)
2011 server
(4)
2010 server
(5)
2014
(15)
2010
(38)
2005
(8)
MacBook
(0)
2017 12inch
(11)
2008 late
(46)
MacBook Air
(0)
2011 13inch/BCP
(9)
2013 13inch/US
(5)
2011 11inch
(31)
2011 13inch
(8)
Macソフト
(134)
Mac周辺機器
(36)
PowerBook
(5)
iPod touch/iOS
(59)
iPhone
(172)
iPad
(78)
ガジェット
(117)
fire tv
(1)
文房具
(20)
HUAWEI Watch FIT
(10)
カメラ/デジカメ
(40)
タイムラプス
(6)
ネットワーク機器
(18)
ネットワークケーブル
(4)
ネットワークその他
(8)
ネットワークスピード
(14)
YAMAHA/ヤマハ
(1)
FWX120
(2)
RTX1200
(14)
RTX1100/RTX1000
(10)
RT107e
(2)
NETGEAR WAC510
(11)
NERGEAR Orbi
(1)
Panasonic MNOseries
(3)
マウス&キーボード
(58)
AV機器・レグザ
(100)
電球
(11)
ハウツー
(105)
GPS/地図
(70)
ビジネス
(169)
新規ビジネス
(19)
お仕事
(63)
ケータイビジネス
(41)
PC
(11)
Raspberry Pi
(58)
ML110 G5
(20)
LIFEBOOK
(11)
Surface
(50)
ThinkPad R61
(5)
CF-LX4
(9)
CF-RZ6
(7)
DynabookPT45
(8)
PN-ZP30
(5)
EndeavorTN40
(4)
Intel NUC6CAYS
(2)
モバイル
(16)
ケータイスマホ機種
(34)
スマホアプリ
(73)
データ通信・契約
(84)
EMONSTER
(5)
IDEOS
(12)
Galaxy Note/A25
(41)
Windows Phone
(20)
Nexus
(22)
コンピュータ
(11)
Windows
(90)
サーバソフト
(32)
Db2
(16)
クライアントソフト
(77)
インターネット
(69)
Google
(119)
ネットサービス
(159)
ハードウェア
(19)
プリンタ
(9)
ストレージ
(5)
ディスプレイ
(11)
情報システム
(95)
趣味
(3)
ポケモンGO
(642)
寝台特急カシオペア/カシオペア紀行
(34)
TOKYO2020
(85)
雑草対策
(28)
食べた
(209)
たべた(駅弁)
(30)
飲んだ
(33)
調理した
(24)
ラーメン・麺類
(202)
鉄道
(237)
農園
(170)
アクアリウム
(162)
ホテル・旅館
(44)
書評
(44)
演劇
(22)
車・バイク
(76)
自然・星
(37)
散策・近代建築
(18)
神社・寺
(50)
高層ビル
(24)
現代建築
(15)
建築物
(6)
観光・名所
(88)
イベント
(73)
散策:城
(34)
ディズニー
(24)
モーターショー
(16)
鳥
(9)
美術館
(28)
コンサート/ライブ
(72)
船
(3)
スポーツ
(120)
音楽
(77)
ミニカー
(4)
Nゲージダイキャスト
(8)
Nゲージ
(0)
サマリ
(6)
ピンバッチ
(3)
サイト運営
(39)
人生
(68)
監視/防犯/みまもり/遠隔
(94)
お金の話
(95)
体・病気
(119)
相続・土地売買
(20)
コンテンツ更新情報
(2)
Raspberry Pi3 初期設定
をテンプレートにして作成
技術情報2
RapsberryPi3/002/FirstSetting をテンプレートにして作成
開始行:
*Raspberry Pi3 初期設定
**はじめに
Raspberry Pi3にRASPBIANをインストール後,最初に必要と思...
**SSH接続する
デフォルトでSSHサーバが起動して接続できる様になっている...
る.
デフォルトで用意されているユーザIDのpiで接続.
MBA13:~ ujpadmin$ ssh pi@192.168.0.3
The authenticity of host '192.168.0.3 (192.168.0.3)' can...
ECDSA key fingerprint is SHA256:s/2me7eOw9yV9pHLdjMZR9gP...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.3' (ECDSA) to the ...
pi@192.168.0.3's password:
パスワードはデフォルトのraspberryを入力.
The programs included with the Debian GNU/Linux system a...
the exact distribution terms for each program are descri...
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to t...
permitted by applicable law.
Last login: Sun Jul 3 01:26:03 2016
pi@raspberrypi:~ $
接続できた.
**piユーザとrootユーザのパスワード変更
piユーザは誰でも知っているパスワードなので,変更する.
pi@raspberrypi:~ $ passwd pi
Changing password for pi.
(current) UNIX password:現在のパスワードのraspberryを入...
Enter new UNIX password:新しいパスワード
Retype new UNIX password:新しいパスワード
passwd: password updated successfully
pi@raspberrypi:~ $
成功.rootユーザのパスワードも設定変更しておく.まずはs...
pi@raspberrypi:~ $ sudo su -
root@raspberrypi:~#
パスワードを設定変更.
root@raspberrypi:~# passwd root
Enter new UNIX password:新しいパスワード
Retype new UNIX password:新しいパスワード
passwd: password updated successfully
root@raspberrypi:~#
完了.
**ネットワーク情報を変更
***ネットワークの現在設定を確認.
pi@raspberrypi:~ $ /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:65:ab:6c:27:eb
inet addr:192.168.0.3 Bcast:192.168.0.255 Ma...
inet6 addr: fe80::7b2b:2fe4:1c2d:84f4/64 Scope...
UP BROADCAST RUNNING MULTICAST MTU:1500 Metr...
RX packets:1627 errors:0 dropped:3 overruns:0 ...
TX packets:904 errors:0 dropped:0 overruns:0 c...
collisions:0 txqueuelen:1000
RX bytes:609978 (595.6 KiB) TX bytes:131135 (...
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:200 errors:0 dropped:0 overruns:0 f...
TX packets:200 errors:0 dropped:0 overruns:0 c...
collisions:0 txqueuelen:1
RX bytes:16656 (16.2 KiB) TX bytes:16656 (16....
wlan0 Link encap:Ethernet HWaddr b8:27:eb:39:30:fe
inet6 addr: fe80::a113:ce32:1dd1:5d6/64 Scope:...
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:497 errors:0 dropped:497 overruns:0...
TX packets:0 errors:0 dropped:0 overruns:0 car...
collisions:0 txqueuelen:1000
RX bytes:201656 (196.9 KiB) TX bytes:0 (0.0 B)
pi@raspberrypi:~ $
WLANも認識しているな...
***固定IPアドレスの設定
/etc/dhcpcd.confにIPアドレス・サブネットマスク,ゲート...
まずは,現在設定を確認.
root@raspberrypi:~# grep -v "^#" /etc/dhcpcd.conf
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, ...
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname
root@raspberrypi:~#
設定を投入する.
root@raspberrypi:~# echo interface eth0 >> /etc/dhcpcd.c...
root@raspberrypi:~# echo static ip_address=192.168.0.241...
root@raspberrypi:~# echo static routers=192.168.20.1 >> ...
root@raspberrypi:~# echo static domain_name_servers=192....
root@raspberrypi:~#
ホスト名編集前にバックアップを行う.
root@raspberrypi:~# cp -f /etc/dhcpcd.conf /etc/dhcpcd.c...
root@raspberrypi:~#
ホスト名を設定する.この例の場合,commetというホスト名...
root@raspberrypi:~# cat /etc/dhcpcd.conf.bak | sed -e 's...
root@raspberrypi:~#
投入した設定を確認.
root@raspberrypi:~# grep -v "^#" /etc/dhcpcd.conf
hostname commet
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, ...
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname
interface eth0
static ip_address=192.168.0.241/24
static routers=192.168.20.1
static domain_name_servers=192.168.20.1
root@raspberrypi:~#
***設定した固定IPアドレスを有効化する
root@raspberrypi:~# ifdown eth0;sleep 1;ifdown eth0 &
ifdown: interface eth0 not configured
[1] 1538
root@raspberrypi:~#
interfaceファイルに記載が無いのでifdown/ifupコマンドは...
root@raspberrypi:~# reboot
Connection to 192.168.0.3 closed by remote host.
Connection to 192.168.0.3 closed.
MBA13:~ ujpadmin$
変更後のIPアドレスで接続してみる.
MBA13:~ ujpadmin$ ssh pi@192.168.0.241
The authenticity of host '192.168.0.241 (192.168.0.241)'...
ECDSA key fingerprint is SHA256:s/2jMe7eOds9pua2RhxwPHLd...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.241' (ECDSA) to th...
pi@192.168.0.241's password:先ほど設定したパスワード
The programs included with the Debian GNU/Linux system a...
the exact distribution terms for each program are descri...
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to t...
permitted by applicable law.
Last login: Sun Jul 3 02:45:04 2016
pi@raspberrypi:~ $
設定を確認する.
pi@raspberrypi:~ $ ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:65:ab:6c:27:eb
inet addr:192.168.0.241 Bcast:192.168.0.255 ...
inet6 addr: fe80::7b2b:2fe4:1c2d:84f4/64 Scope...
UP BROADCAST RUNNING MULTICAST MTU:1500 Metr...
RX packets:145 errors:0 dropped:0 overruns:0 f...
TX packets:108 errors:0 dropped:0 overruns:0 c...
collisions:0 txqueuelen:1000
RX bytes:11545 (11.2 KiB) TX bytes:15366 (15....
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:128 errors:0 dropped:0 overruns:0 f...
TX packets:128 errors:0 dropped:0 overruns:0 c...
collisions:0 txqueuelen:1
RX bytes:10368 (10.1 KiB) TX bytes:10368 (10....
wlan0 Link encap:Ethernet HWaddr b8:27:eb:39:30:fe
inet6 addr: fe80::a113:ce32:1dd1:5d6/64 Scope:...
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:26 overruns:0 f...
TX packets:0 errors:0 dropped:0 overruns:0 car...
collisions:0 txqueuelen:1000
RX bytes:11233 (10.9 KiB) TX bytes:0 (0.0 B)
pi@raspberrypi:~ $
接続できた.
**SDカード領域の拡張(raspi-config)
SDカードの容量全てを利用できる様に設定する.
rootユーザでraspi-configコマンドを実行.
root@raspberrypi:/home/pi# raspi-config
root@raspberrypi:/home/pi#
次の様な画面が表示.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Expand Filesystemを選択する.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
今回,NOOBSでインストールしているので作業不要の模様.ra...
root@raspberrypi:/home/pi# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 28G 3.4G 24G 13% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 6.4M 457M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p6 63M 20M 43M 32% /boot
tmpfs 93M 0 93M 0% /run/user/1000
/dev/mmcblk0p5 30M 437K 28M 2% /media/pi/SETTINGS
root@raspberrypi:/home/pi#
空き領域が24Gあるので,たぶん32GBのSDカード全体を使える...
**インターナショナル設定(raspi-config)
raspi-configのInternationalisation Optionにて,言語,タ...
***言語LANG設定
raspi-configのトップメニューにあるInternationalisation ...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
まずはLocale設定.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Raspberry Pi3はイギリス製なので,言語設定のデフォルトが...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
ja_JP.UTF-8を選択.選択するにはスペースキーを押せば良い.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Debianの文字が見て取れる.ユーザのデフォルトの言語設定...
選択するとトップ画面に戻る.
***Timezoneの変更
タイムゾーンは,東京に変更する.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
raspi-configのトップメニューにあるInternationalisation ...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Change Timezoneを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Asiaを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Tokyoを見つけて選択.アルファベットオーダーなのでTはか...
選択するとトップ画面に戻る.
***キーボードレイアウトの選択
日本語キーボードを選択する.
raspi-configのトップメニューにあるInternationalisation ...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Change Keyboard Layoutを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
106キーボードがないので,Generic 105-keyを選択する.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
キーボードレイアウトに該当するものが無いので,Otherを選...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Japaneseを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Japaneseを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
AltGRキーについて設定.一部の国のキーボードレイアウトだ...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Control+Alt+Backspaceの同時押しでXサーバを停止するかと...
**OSを再起動して日本語環境を確認する
言語設定を変更した後は,OSの再起動が必要.
root@raspberrypi:/home/pi# reboot
Connection to 192.168.0.241 closed by remote host.
Connection to 192.168.0.241 closed.
MBA13:~ ujpadmin$
2〜3分後,SSHで再接続.
MBA13:~ ujpadmin $ ssh pi@192.168.0.241
pi@192.168.0.241's password:
The programs included with the Debian GNU/Linux system a...
the exact distribution terms for each program are descri...
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to t...
permitted by applicable law.
Last login: Sun Jul 3 11:46:34 2016 from 192.168.20.35
pi@raspberrypi:~ $
言語環境を確認する.
pi@raspberrypi:~ $ env | grep LANG
LANG=ja_JP.UTF-8
pi@raspberrypi:~ $
日本語でUTF-8に設定されていることを確認.日本語のエラー...
pi@raspberrypi:~ $ aaaa
-bash: aaaa: コマンドが見つかりません
pi@raspberrypi:~ $
存在しないコマンドを実行してみた.
**テキストモードで起動させる
サーバとして運用するので,Xサーバを停止させる.
raspi-configを起動.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Boot Optionsを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Consoleを選択.オートログインもしない方式とする.
終了行:
*Raspberry Pi3 初期設定
**はじめに
Raspberry Pi3にRASPBIANをインストール後,最初に必要と思...
**SSH接続する
デフォルトでSSHサーバが起動して接続できる様になっている...
る.
デフォルトで用意されているユーザIDのpiで接続.
MBA13:~ ujpadmin$ ssh pi@192.168.0.3
The authenticity of host '192.168.0.3 (192.168.0.3)' can...
ECDSA key fingerprint is SHA256:s/2me7eOw9yV9pHLdjMZR9gP...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.3' (ECDSA) to the ...
pi@192.168.0.3's password:
パスワードはデフォルトのraspberryを入力.
The programs included with the Debian GNU/Linux system a...
the exact distribution terms for each program are descri...
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to t...
permitted by applicable law.
Last login: Sun Jul 3 01:26:03 2016
pi@raspberrypi:~ $
接続できた.
**piユーザとrootユーザのパスワード変更
piユーザは誰でも知っているパスワードなので,変更する.
pi@raspberrypi:~ $ passwd pi
Changing password for pi.
(current) UNIX password:現在のパスワードのraspberryを入...
Enter new UNIX password:新しいパスワード
Retype new UNIX password:新しいパスワード
passwd: password updated successfully
pi@raspberrypi:~ $
成功.rootユーザのパスワードも設定変更しておく.まずはs...
pi@raspberrypi:~ $ sudo su -
root@raspberrypi:~#
パスワードを設定変更.
root@raspberrypi:~# passwd root
Enter new UNIX password:新しいパスワード
Retype new UNIX password:新しいパスワード
passwd: password updated successfully
root@raspberrypi:~#
完了.
**ネットワーク情報を変更
***ネットワークの現在設定を確認.
pi@raspberrypi:~ $ /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:65:ab:6c:27:eb
inet addr:192.168.0.3 Bcast:192.168.0.255 Ma...
inet6 addr: fe80::7b2b:2fe4:1c2d:84f4/64 Scope...
UP BROADCAST RUNNING MULTICAST MTU:1500 Metr...
RX packets:1627 errors:0 dropped:3 overruns:0 ...
TX packets:904 errors:0 dropped:0 overruns:0 c...
collisions:0 txqueuelen:1000
RX bytes:609978 (595.6 KiB) TX bytes:131135 (...
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:200 errors:0 dropped:0 overruns:0 f...
TX packets:200 errors:0 dropped:0 overruns:0 c...
collisions:0 txqueuelen:1
RX bytes:16656 (16.2 KiB) TX bytes:16656 (16....
wlan0 Link encap:Ethernet HWaddr b8:27:eb:39:30:fe
inet6 addr: fe80::a113:ce32:1dd1:5d6/64 Scope:...
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:497 errors:0 dropped:497 overruns:0...
TX packets:0 errors:0 dropped:0 overruns:0 car...
collisions:0 txqueuelen:1000
RX bytes:201656 (196.9 KiB) TX bytes:0 (0.0 B)
pi@raspberrypi:~ $
WLANも認識しているな...
***固定IPアドレスの設定
/etc/dhcpcd.confにIPアドレス・サブネットマスク,ゲート...
まずは,現在設定を確認.
root@raspberrypi:~# grep -v "^#" /etc/dhcpcd.conf
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, ...
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname
root@raspberrypi:~#
設定を投入する.
root@raspberrypi:~# echo interface eth0 >> /etc/dhcpcd.c...
root@raspberrypi:~# echo static ip_address=192.168.0.241...
root@raspberrypi:~# echo static routers=192.168.20.1 >> ...
root@raspberrypi:~# echo static domain_name_servers=192....
root@raspberrypi:~#
ホスト名編集前にバックアップを行う.
root@raspberrypi:~# cp -f /etc/dhcpcd.conf /etc/dhcpcd.c...
root@raspberrypi:~#
ホスト名を設定する.この例の場合,commetというホスト名...
root@raspberrypi:~# cat /etc/dhcpcd.conf.bak | sed -e 's...
root@raspberrypi:~#
投入した設定を確認.
root@raspberrypi:~# grep -v "^#" /etc/dhcpcd.conf
hostname commet
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, ...
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname
interface eth0
static ip_address=192.168.0.241/24
static routers=192.168.20.1
static domain_name_servers=192.168.20.1
root@raspberrypi:~#
***設定した固定IPアドレスを有効化する
root@raspberrypi:~# ifdown eth0;sleep 1;ifdown eth0 &
ifdown: interface eth0 not configured
[1] 1538
root@raspberrypi:~#
interfaceファイルに記載が無いのでifdown/ifupコマンドは...
root@raspberrypi:~# reboot
Connection to 192.168.0.3 closed by remote host.
Connection to 192.168.0.3 closed.
MBA13:~ ujpadmin$
変更後のIPアドレスで接続してみる.
MBA13:~ ujpadmin$ ssh pi@192.168.0.241
The authenticity of host '192.168.0.241 (192.168.0.241)'...
ECDSA key fingerprint is SHA256:s/2jMe7eOds9pua2RhxwPHLd...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.241' (ECDSA) to th...
pi@192.168.0.241's password:先ほど設定したパスワード
The programs included with the Debian GNU/Linux system a...
the exact distribution terms for each program are descri...
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to t...
permitted by applicable law.
Last login: Sun Jul 3 02:45:04 2016
pi@raspberrypi:~ $
設定を確認する.
pi@raspberrypi:~ $ ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:65:ab:6c:27:eb
inet addr:192.168.0.241 Bcast:192.168.0.255 ...
inet6 addr: fe80::7b2b:2fe4:1c2d:84f4/64 Scope...
UP BROADCAST RUNNING MULTICAST MTU:1500 Metr...
RX packets:145 errors:0 dropped:0 overruns:0 f...
TX packets:108 errors:0 dropped:0 overruns:0 c...
collisions:0 txqueuelen:1000
RX bytes:11545 (11.2 KiB) TX bytes:15366 (15....
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:128 errors:0 dropped:0 overruns:0 f...
TX packets:128 errors:0 dropped:0 overruns:0 c...
collisions:0 txqueuelen:1
RX bytes:10368 (10.1 KiB) TX bytes:10368 (10....
wlan0 Link encap:Ethernet HWaddr b8:27:eb:39:30:fe
inet6 addr: fe80::a113:ce32:1dd1:5d6/64 Scope:...
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:26 overruns:0 f...
TX packets:0 errors:0 dropped:0 overruns:0 car...
collisions:0 txqueuelen:1000
RX bytes:11233 (10.9 KiB) TX bytes:0 (0.0 B)
pi@raspberrypi:~ $
接続できた.
**SDカード領域の拡張(raspi-config)
SDカードの容量全てを利用できる様に設定する.
rootユーザでraspi-configコマンドを実行.
root@raspberrypi:/home/pi# raspi-config
root@raspberrypi:/home/pi#
次の様な画面が表示.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Expand Filesystemを選択する.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
今回,NOOBSでインストールしているので作業不要の模様.ra...
root@raspberrypi:/home/pi# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 28G 3.4G 24G 13% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 6.4M 457M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p6 63M 20M 43M 32% /boot
tmpfs 93M 0 93M 0% /run/user/1000
/dev/mmcblk0p5 30M 437K 28M 2% /media/pi/SETTINGS
root@raspberrypi:/home/pi#
空き領域が24Gあるので,たぶん32GBのSDカード全体を使える...
**インターナショナル設定(raspi-config)
raspi-configのInternationalisation Optionにて,言語,タ...
***言語LANG設定
raspi-configのトップメニューにあるInternationalisation ...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
まずはLocale設定.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Raspberry Pi3はイギリス製なので,言語設定のデフォルトが...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
ja_JP.UTF-8を選択.選択するにはスペースキーを押せば良い.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Debianの文字が見て取れる.ユーザのデフォルトの言語設定...
選択するとトップ画面に戻る.
***Timezoneの変更
タイムゾーンは,東京に変更する.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
raspi-configのトップメニューにあるInternationalisation ...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Change Timezoneを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Asiaを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Tokyoを見つけて選択.アルファベットオーダーなのでTはか...
選択するとトップ画面に戻る.
***キーボードレイアウトの選択
日本語キーボードを選択する.
raspi-configのトップメニューにあるInternationalisation ...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Change Keyboard Layoutを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
106キーボードがないので,Generic 105-keyを選択する.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
キーボードレイアウトに該当するものが無いので,Otherを選...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Japaneseを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Japaneseを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
AltGRキーについて設定.一部の国のキーボードレイアウトだ...
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Control+Alt+Backspaceの同時押しでXサーバを停止するかと...
**OSを再起動して日本語環境を確認する
言語設定を変更した後は,OSの再起動が必要.
root@raspberrypi:/home/pi# reboot
Connection to 192.168.0.241 closed by remote host.
Connection to 192.168.0.241 closed.
MBA13:~ ujpadmin$
2〜3分後,SSHで再接続.
MBA13:~ ujpadmin $ ssh pi@192.168.0.241
pi@192.168.0.241's password:
The programs included with the Debian GNU/Linux system a...
the exact distribution terms for each program are descri...
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to t...
permitted by applicable law.
Last login: Sun Jul 3 11:46:34 2016 from 192.168.20.35
pi@raspberrypi:~ $
言語環境を確認する.
pi@raspberrypi:~ $ env | grep LANG
LANG=ja_JP.UTF-8
pi@raspberrypi:~ $
日本語でUTF-8に設定されていることを確認.日本語のエラー...
pi@raspberrypi:~ $ aaaa
-bash: aaaa: コマンドが見つかりません
pi@raspberrypi:~ $
存在しないコマンドを実行してみた.
**テキストモードで起動させる
サーバとして運用するので,Xサーバを停止させる.
raspi-configを起動.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Boot Optionsを選択.
#ref(site://modules/xelfinder/index.php?page=view&file=34...
Consoleを選択.オートログインもしない方式とする.
ページ名:
Counter: 0, today: 0, yesterday: 0
広告スペース
検索用語を入力
検索フォームを送信
Web
www.ujp.jp