|
|
|
|
初音ミク V4X ASIN: B01G6XK6VM |
クリプトン・フューチャー・メディア公認 初音ミク V4X 徹底攻略ガイドブック 調声からDAWでの曲作りまでわかる本 (データ・ダウンロード対応) (日本語) 単行本(ソフトカバー) - 2016/11/18 ASIN: 4845628708 |
初音ミク Project DIVA MEGA39's(メガミックス) - Switch ASIN: B07WZZWGTS |
初音ミク Project DIVA Future Tone DX - PS4 ASIN: B073191YDM |
【Amazon.co.jp限定】初音ミク「マジカルミライ 2019」 [2Blu-ray + 豪華ブック] (初回限定盤) (Amazon.co.jp限定予約購入特典 : マジカルミライライブフォトカレンダー 付) ASIN: B07W4QCVPY |
Raspberry Pi OS (32-bit) Lite Minimal image based on Debian Buster Version: May 2020 Release date: 2020-05-27 pi@raspberrypi:~ $ uname -a Linux raspberrypi 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux pi@raspberrypi:~ $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
# ラズパイの IPv6を無効化 sudo bash -c "echo \# Disable IPV6 >> /etc/sysctl.conf" sudo bash -c "echo net.ipv6.conf.all.disable_ipv6 = 1 >> /etc/sysctl.conf" # === # bashのコマンドラインヒストリの設定 # echo export HISTCONTROL=ignoreboth >> ~/.bashrc # ラズパイの bashでは HISTCONTROL=ignorebothは正しく動きません。 # ラズパイの bashでは HISTCONTROL=ignorespace:ignoredups:erasedupsとします。 echo export HISTCONTROL=ignorespace:ignoredups:erasedups >> ~/.bashrc # === free # total used free shared buff/cache available # Mem: 948280 52592 658088 12264 237600 828696 # Swap: 102396 0 102396 # CPUの使用メモリ空間の確認方法 vcgencmd get_mem arm # arm=948M # GPUの使用メモリ空間の確認方法 vcgencmd get_mem gpu # gpu=76M # VRAMのサイズを 64MBから 16MBに減らす # sudo bash -c "echo gpu_mem=16>> /boot/config.txt" # sudo sed -i -e "s/^gpu_mem=.*/gpu_mem=16/g" /boot/config.txt # raspi-config nonintコマンドで gpu_memを設定する方が簡単で確実 sudo raspi-config nonint do_memory_split 16 # === # 初期設定 ACT-LEDをハートビート動作 sudo bash -c "echo dtparam=act_led_trigger=heartbeat >> /boot/config.txt" # === # ラズパイを最新の状態にする bash -c "echo \#\!/bin/sh > update.sh" bash -c "echo df -h >> update.sh" bash -c "echo sudo apt-get update >> update.sh" bash -c "echo sudo apt-get -y upgrade >> update.sh" bash -c "echo sudo apt-get -y dist-upgrade >> update.sh" bash -c "echo echo \$\'\\\a\' >> update.sh" bash -c "echo df -h >> update.sh" bash -c "echo sudo reboot >> update.sh" bash -c "echo \# sudo poweroff >> update.sh" chmod +x update.sh ./update.sh # 自動的に再起動する # === free # total used free shared buff/cache available # Mem: 999012 46216 872624 12860 80172 889040 # Swap: 102396 0 102396 vcgencmd get_mem arm # arm=998M vcgencmd get_mem gpu # gpu=16M
# お決まりの sudo apt-get update sudo apt-get update # gitのインストール sudo apt -y install git # MySQLのインストール # mysql-serverから mariadb-serverに変わった # sudo apt -y install mysql-server sudo apt -y install mariadb-server # MySQLのバージョンの確認 # コマンドラインはそのまま mysqldと mysqlが使える mysqld -V # mysqld Ver 10.3.22-MariaDB-0+deb10u1 for debian-linux-gnueabihf on armv8l (Raspbian 10) mysql -V # mysql Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnueabihf (armv8l) using readline 5.2
# PHP 7.3のインストールを一行で一括で行なう場合 # mcryptと php7.1-mcryptは php 7.2から廃止になった sudo apt-get -y install php7.3 php7.3-common php7.3-mbstring php7.3-xml php7.3-mysql php7.3-zip php7.3-gd php7.3-curl php7.3-json # libc-bin # Configuring libc6:armhf # PHPのバージョンの確認 PHP 7.3.14 php -v # PHP 7.3.14-1~deb10u1 (cli) (built: Feb 16 2020 15:07:23) ( NTS ) # Copyright (c) 1997-2018 The PHP Group # Zend Engine v3.3.14, Copyright (c) 1998-2018 Zend Technologies # with Zend OPcache v7.3.14-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
# Apache 2 Web Serverのインストール(不要) # sudo apt-get -y install apache2 # Apache 2 Web Serverのバージョンの確認 apache2 -v # Server version: Apache/2.4.38 (Raspbian) # Server built: 2019-10-15T19:53:42
# Composerのインストール sudo apt-get -y install composer # Composerのバージョンの確認 composer -V # Composer 1.8.4 2019-02-11 10:52:10
sudo mysql -u root mysql # MySQLにアカウント laravelを作成する # パスワードは password # GRANT OPTION を除き、指定されたアクセスレベルにあるすべての権限を付与します # ALL PRIVILEGES = 最強権限 # ALL = 強権限 # とりま自分の勉強用なので「強権限」で作成する # ※ セキュリティの観点から公開する場合は必要最小限の権限にして管理、適切に設定しましょう。 GRANT ALL ON *.* TO 'laravel'@'localhost' IDENTIFIED BY 'password'; SELECT user, host FROM mysql.user; +---------+-----------+ | user | host | +---------+-----------+ | laravel | localhost | | root | localhost | +---------+-----------+
$ mysql -u laravel -ppassword $ mysql --user=laravel --password=password # phpMyAdminのログインもこのアカウント情報を使用します
$ mysql -u laravel -ppassword CREATE DATABASE laravel; exit
sudo rm -rf /var/www/hazard_alert sudo mkdir /var/www/hazard_alert # 本来であれば chownでファイル権限のユーザーで許可を与えるが、自分だけの開発環境なので chmodで安易に済ませている。 sudo chmod 777 /var/www/hazard_alert cd /var/www git clone https://github.com/cfm-system-team/hazard_alert.git cd hazard_alert composer install # Package manifest generated successfully.
cp .env.example .env php artisan key:generate # Application key set successfully. # データベースなどの環境情報を設定 # メール送信の設定 nano .env
# データベースなどの環境情報を設定 DB_DATABASE=laravel DB_USERNAME=laravel DB_PASSWORD=password # メール送信の設定 MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME="Gmailのアカウント(例:hogehoge@gmail.com)" MAIL_PASSWORD="Gmailのパスワード" MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS="送信元メールアドレス(例:hogehoge@gmail.com)" MAIL_FROM_NAME="${APP_NAME}"
cd /var/www/hazard_alert php artisan migrate # Migration table created successfully. php artisan --version # Laravel Framework 7.13.0
# apache2の mod_rewriteモジュールを a2enmodコマンドで有効化する # これを有効化しないと /のルートディレクトリ以外にアクセスすると 404 Not Foundになる sudo a2enmod rewrite # apache2の mod_rewriteモジュールの有効化を確認する ls -l /etc/apache2/mods-enabled/ | grep rewrite # lrwxrwxrwx 1 root root 30 Mar 5 06:06 rewrite.load -> ../mods-available/rewrit .load # 000-default.confの DocumentRoot設定を書き換える # 000-default.confの DocumentRoot設定の下に AllowOverride All設定を追加する sudo nano /etc/apache2/sites-available/000-default.conf <VirtualHost *:80> # DocumentRoot /var/www/html DocumentRoot /var/www/hazard_alert/public <Directory "/var/www/hazard_alert/public"> AllowOverride All </Directory> # apache2の設定ファイルを書き換えたので apache2を再起動する sudo systemctl restart apache2 # failed to open stream: Permission deniedになるので 757にする # 本来であれば chownでファイル権限のユーザーで許可を与えるが、自分だけの開発環境なので chmodで安易に済ませている。 sudo chmod -R 757 /var/www/hazard_alert/storage
# Basic認証用のユーザー情報の追加方法(その1) php artisan make:seeder UserSeeder # Seeder created successfully. nano database/seeds/UserSeeder.php <?php use Illuminate\Database\Seeder; class UserSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { // DB::table('users')->insert([ 'name' => 'name', 'email' => 'admin', 'password' => bcrypt('password'), ]); } } nano database/seeds/DatabaseSeeder.php <?php use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Seed the application's database. * * @return void */ public function run() { $this->call(UserSeeder::class); } } php artisan db:seed --class=UserSeeder # Database seeding completed successfully.
# Basic認証用のユーザー情報の追加方法(その2) pi@raspberrypi:/var/www/hazard_alert $ php artisan tinker Psy Shell v0.10.4 (PHP 7.3.14-1~deb10u1 - cli) by Justin Hileman >>> echo Hash::make('password'); $2y$10$PquwpEIvaPfOXtztEOPlVefziL05N6sTTT3//MYsriv8uyEsRkJRG⏎ >>> exit Exit: Goodbye $ mysql -u laravel -ppassword use laravel; # Database changed show tables; # +-------------------+ # | Tables_in_laravel | # +-------------------+ # | failed_jobs | # | groups | # | migrations | # | recipients | # | users | # +-------------------+ # 5 rows in set (0.002 sec) select * from users; # Empty set (0.001 sec) show columns from users; insert into users(id,name,email,password) VALUES (1,'管理者','admin','$2y$10$PquwpEIvaPfOXtztEOPlVefziL05N6sTTT3//MYsriv8uyEsRkJRG'); select * from users; +----+-----------+-------+-------------------+----------+----------------+------------+------------+ | id | name | email | email_verified_at | password | remember_token | created_at | updated_at | +----+-----------+-------+-------------------+----------+----------------+------------+------------+ | 1 | 管理者 | admin | NULL | $2y..... | NULL | NULL | NULL | +----+-----------+-------+-------------------+----------+----------------+------------+------------+ 1 row in set (0.000 sec) exit
# Basic認証用のユーザー情報の追加方法(その3) php artisan tinker App\User::create(['name' => 'sample', 'email' => 'admin', 'password' => bcrypt('password')]);
FastCGIの注意 PHP FastCGIを使用している場合、初期状態のままでHTTP基本認証は正しく動作しないでしょう。 以下の行を.htaccessファイルへ追加してください。 /var/www/hazard_alert/public/.htaccess RewriteCond %{HTTP:Authorization} ^(.+)$ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# 画面表示等の文字列情報を設定 nano .env APP_NAME=.envのAPP_NAME ... DEVELOPER=.envのDEVELOPER COLLABORATION=.envのCOLLABORATION COPYRIGHT=.envのCOPYRIGHT PRIVACY_POLICY_URL=.envのPRIVACY_POLICY_URL DESCRIPTION=.envのDESCRIPTION
設定例 # 画面表示等の文字列情報を設定 APP_NAME=○○県□□市の「コロナ濃厚接触確認通知システム」 ... DEVELOPER=開発会社 FREE WING COLLABORATION=協力会社 FREE WING COPYRIGHT=COPYRIGHT ○○県□□市 PRIVACY_POLICY_URL=https://hogehoge.example.com/privacy_policy_page.html DESCRIPTION=説明文をここに書く、新型コロナウイルスの感染者と濃厚に接触した可能性がある場合にメールでお知らせします。resources/views/group/create.blade.php
店舗・イベント QRコード生成のヘッダ部分 こちらは「<b>{{ config('app.name') }}</b>」店舗関係者・イベント主催者様用のご登録ページです。<br> 下記入力欄に皆様の店舗・イベント・集客施設の情報のご登録をお願いします。<br> 「登録してQRコードを生成」のボタンを押すと、掲示用のQRコードをダウンロードすることができます。<br> また、登録いただいた情報はメール受信を希望するユーザーに公開されます。
ブラウザ表示のフッタ部分 <p>© {{ env('COPYRIGHT') }}</p> <p><a href="/terms_user">利用規約(利用者用)</a> | <a href="/terms_organization">利用規約(事業者用)</a> | <a href="{{ env('PRIVACY_POLICY_URL') }}" target="_blank">プライバシーポリシー</a></p> <p><small>※「QRコード」は株式会社デンソーウェーブの登録商標です。</small></p>
メールのフッタ部分 ****************************************** 【{{ config('app.name') }}】 {{ env('DESCRIPTION') }} システム運営:{{ env('DEVELOPER') }} 協力:{{ env('COLLABORATION') }} ******************************************
# メール送信のテスト # hogehoge@gmail.comにテストメールを送信する pi@raspberrypi:/var/www/hazard_alert $ php artisan tinker Psy Shell v0.10.4 (PHP 7.3.14-1~deb10u1 - cli) by Justin Hileman >>> Mail::raw('Test Mail', function($message) { $message->to('hogehoge@gmail.com')->subject('subject Test Mail'); }); => null >>> exit Exit: Goodbye nullを表示すれば「メール送信 成功」
http://raspberrypi.local/ # 404 Not Foundが出れば正常・クリプトン開発の「リスク通知システム」 をラズパイで動かす!コロナ対策に!
# QRコードの発行(店舗、施設等) http://raspberrypi.local/group/register
# リスク発生時の来店・来場された方の件数とメールアドレスの確認 http://raspberrypi.local/recipient/search
/var/www/hazard_alert/app/Http/Controllers RecipientController.php この if文のブロックを丸ごと無効にする // ガラケー対応 if (empty($_SERVER['HTTPS'])) { $ua = $_SERVER['HTTP_USER_AGENT']; if(!((strpos($ua, 'DoCoMo') !== false) || (strpos($ua, 'FOMA') !== false) || (strpos($ua, 'SoftBank') !== false))) { $url = 'https://' . $_SERVER['HTTP_HOST'] . '/recipient/register/' . $hash; return redirect($url); } }
pi@raspberrypi:/var/www/hazard_alert $ php artisan migrate Illuminate\Database\QueryException SQLSTATE[HY000] [1049] Unknown database 'laravel' (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE') at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671 667| // If an exception occurs when attempting to run a query, we'll format the error 668| // message to include the bindings with SQL, which will make this exception a 669| // lot more helpful to the developer instead of just the database's errors. 670| catch (Exception $e) { > 671| throw new QueryException( 672| $query, $this->prepareBindings($bindings), $e 673| ); 674| } 675| • Database name seems incorrect: You're using the default database name `laravel`. This database does not exist. Edit the `.env` file and use the correct database name in the `DB_DATABASE` key. https://laravel.com/docs/master/database#configuration +36 vendor frames 37 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
pi@raspberrypi:/var/www/hazard_alert $ php artisan tinker Psy Shell v0.10.4 (PHP 7.3.14-1~deb10u1 - cli) by Justin Hileman >>> Mail::raw('Test Mail', function($message) { $message->to('hogehoge@gmail.com')->subject('subject Test Mail'); }); Swift_TransportException with message 'Expected response code 250 but got code "530", with message "530 5.7.0 Must issue a STARTTLS command first. xxxxxxxxxxxxxxx.219 - gsmtp "' >>> exit Exit: Goodbye
pi@raspberrypi:/var/www/hazard_alert $ php artisan tinker Psy Shell v0.10.4 (PHP 7.3.14-1~deb10u1 - cli) by Justin Hileman >>> Mail::raw('Test Mail', function($message) { $message->to('hogehoge@gmail.com')->subject('subject Test Mail'); }); Swift_TransportException with message 'Failed to authenticate on SMTP server with username "hogehoge" using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials xxxxxxxxxxxxxxx.35 - gsmtp ". Authenticator PLAIN returned Expected response code 235 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials xxxxxxxxxxxxxxx.35 - gsmtp ". Authenticator XOAUTH2 returned Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials xxxxxxxxxxxxxxx.35 - gsmtp ".' >>> exit Exit: Goodbye
UnexpectedValueException The stream or file "/var/www/hazard_alert/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied http://raspberrypi.local/group/register Monolog\Handler\StreamHandler::write vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:111
Swift_TransportException Expected response code 250 but got code "530", with message "530 5.7.0 Must issue a STARTTLS command first. xxxxxxxxxxxxxxx.30 - gsmtp" http://raspberrypi.local/group/register Swift_Transport_AbstractSmtpTransport::assertResponseCode vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:457