FDX68@Raspberry Piのセットアップ
(このページは工事中です)
参照ページ
条件
FDX68 V2基板
Raspberry Pi 3 Model B+
Linux pbr 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux Raspberry Pi OS 11 Lite (bullseye)
FDX68 2.00dソフトウェア
初期セットアップ
Raspberry Pi Imagerを使ってRaspberry Pi OS LiteイメージをSDカードに書き込み。
独自のホスト名を設定。
独自のユーザを設定。
タイムゾーンをAsia/Tokyoにする。
ネットワーク(有線又は無線)の設定
SSHを起動するように設定。
Raspberry PiにSDカードを挿入してブート。
DHCPサーバに固定アドレス割り当ての設定
ネームサーバにホスト名の設定
sudo apt update
sudo apt upgrade
ssh-keygen -t ed25519
SSH公開鍵をgithubに追加。
sudo apt install git
gitリポジトリから次のパッケージをインストール(インストールは基本的にmake installでできる):
git@github.com:for2ando/dotfiles.git
git@github.com:for2ando/shell-sessions.git
git@github.com:for2ando/dirstack.git
gistから次のファイルをインストール:
git@gist.github.com:65c7c243289a27a1e15eb50cc1834ed1.git -> ~/lib/
git@gist.github.com:c052d63b3d0870935f022c0dc556b71b.git -> ~/bin/
git@gist.github.com:12ec2f1d4ea32dfa917805e8f42d712b.git -> Add to ~/.gitconfig
git@gist.github.com:2a17ee3a6e8451abd28dba534388b9b5.git -> ~/lib/
FDX68 2.00dソフトウェア(readmeとVERSIONを除く)を/usr/local/binに展開。
FDX68-phpのインストール
git clone https://github.com/ztto/fdx68-php.git
sudo raspi-config
次のロケールを生成:
en_US.UTF-8 UTF-8
ja_JP.EUC-JP EUC-JP
ja_JP.UTF-8 UTF-8
デフォルトのロケールとしてはen_US.UTF-8 UTF-8を選択。
sudo shutdown -r now
sudo apt install samba
sudo cp -p /etc/samba/smb.conf /etc/samba/smb.conf.org
ファイル末尾に追加:
code:/etc/samba/smb.conf
comment = FDX68
path = /home/pi
public = yes
read only = no
browsable = yes
guest ok = yes
force user = pi
force create mode = 0777
force directory mode = 0777
sudo shutdown -r now
sudo apt install nginx
sudo apt install php7.4-fpm
次の行を変更:
code:/etc/nginx/sites-enabled/default
44 index index.php index.html index.htm index.nginx-debian.html ;
56 location ~ \.php$ {
57 include snippets/fastcgi-php.conf;
58 #
59 # # With php-fpm (or other unix sockets):
60 fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
61 # # With php-cgi (or other tcp sockets):
62 # fastcgi_pass 127.0.0.1:9000;
63 }
sudo visudoで次の行を追加:
code:visudo
www-data ALL=NOPASSWD:/sbin/shutdown
www-data ALL=NOPASSWD:/usr/bin/pkill
www-data ALL=NOPASSWD:/usr/local/bin/fddemu
ファイルの保存はctrl+O
sudo service php7.4-fpm restart
sudo service nginx restart
sudo cp index.php /var/www/html/
mkdir ~/fdx68
次の行を書換え:
code:/var/www/html/index.php
define("IMAGE_PATH", "/home/pi/fdx68/");
define("PROCESS_PATH", "/usr/local/bin/");
define("PROCESS_NAME1", "fddctl");
define("PROCESS_NAME2", "fddemu");
define("PROCESS_NAME3", "fdxconv");
(2024-04-13)