1. 原始碼:
2. 安裝說明:
(1) 開發環境:
- laravel 6.18
- postgres 9.06
- php 7.3.10
(2) 專案初始化
- 安裝與更新laravel packages
更換新的composer.json
執行composer update以更換composer.lock
代碼: 選擇全部
composer update && cp .env.example .env代碼: 選擇全部
chmod 777 -R storage
chmod 777 -R bootstrap/cache> cd /hama(資料路徑)/bin/hama-dev/
> npm install
> ./node_modules/gulp/bin/gulp.js --gulpfile=monitor.js --compile-only
> cd ..
> ./sassAgent.sh
(4) 開啟webserver後,即可查看網頁
> cd ./public
> php -S 127.0.0.1:8000
1.aws錯誤訊息
https://github.com/aws/aws-sdk-php-laravel
2.google2FA錯誤訊息
https://github.com/antonioribeiro/google2fa-laravel
https://5balloons.info/two-factor-authe ... laravel-5/
3.composer install 過程錯誤訊息:Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
執行composer update
4.enable/install php extension
apt install php-zip
apt install php-xml
apt install php-gd
dom,simplexml
php.ini
3/12 Log 紀錄
代碼: 選擇全部
mis@air:~$ cd airQuality-taichung/
mis@air:~/airQuality-taichung$ ls
CHANGELOG artisan composer.json cookie.txt package.json resources storage webpack.mix.js
Modules bin composer.lock database phpunit.xml routes tests
app bootstrap config deploy public server.php vendor
mis@air:~/airQuality-taichung$ rm composer.json
mis@air:~/airQuality-taichung$ cd ..
mis@air:~$ cp composer.json airQuality-taichung/
mis@air:~$ cd airQuality-taichung/
mis@air:~/airQuality-taichung$ ls
CHANGELOG artisan composer.json cookie.txt package.json resources storage webpack.mix.js
Modules bin composer.lock database phpunit.xml routes tests
app bootstrap config deploy public server.php vendor
mis@air:~/airQuality-taichung$ composer update
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Package operations: 8 installs, 100 updates, 2 removals
- Removing symfony/inflector (v5.0.5)
- Removing developer_rt/hnoverseasiotmodule_php (dev-master)
The package has modified files:
M Config/config.php
M Resources/views/cht/signage/selectFrame.blade.php
M Routes/web.php
Discard changes [y,n,v,d,?]? y
Deleting ./Modules/RtIoC - deleted
- Updating composer/installers (v1.9.0 => v1.10.0): Loading from cache
- Updating symfony/thanks (v1.2.5 => v1.2.10): Loading from cache
- Updating dragonmantank/cron-expression (v2.3.0 => v2.3.1): Loading from cache
- Updating dasprid/enum (1.0.0 => 1.0.3): Loading from cache
- Updating bacon/bacon-qr-code (2.0.0 => 2.0.3): Loading from cache
- Updating doctrine/event-manager (1.1.0 => 1.1.1): Loading from cache
- Updating doctrine/cache (1.10.0 => 1.10.2): Loading from cache
- Updating doctrine/dbal (v2.10.1 => 2.12.1): Loading from cache
- Updating symfony/polyfill-ctype (v1.14.0 => v1.22.1): Loading from cache
- Updating phpoption/phpoption (1.7.2 => 1.7.5): Loading from cache
- Updating vlucas/phpdotenv (v3.6.0 => v3.6.8): Loading from cache
- Updating symfony/css-selector (v5.0.5 => v5.2.4): Loading from cache
- Updating tijsverkoyen/css-to-inline-styles (2.2.2 => 2.2.3): Loading from cache
- Updating symfony/polyfill-php72 (v1.14.0 => v1.22.1): Loading from cache
- Updating symfony/polyfill-mbstring (v1.14.0 => v1.22.1): Loading from cache
- Installing symfony/polyfill-php80 (v1.22.1): Loading from cache
- Updating symfony/var-dumper (v4.4.5 => v4.4.20): Loading from cache
- Updating symfony/routing (v4.4.5 => v4.4.20): Loading from cache
- Updating symfony/process (v4.4.5 => v4.4.20): Loading from cache
- Updating symfony/polyfill-php73 (v1.14.0 => v1.22.1): Loading from cache
- Installing symfony/polyfill-intl-normalizer (v1.22.1): Loading from cache
- Updating symfony/polyfill-intl-idn (v1.14.0 => v1.22.1): Loading from cache
- Updating paragonie/random_compat (v2.0.18 => v2.0.19): Loading from cache
- Installing symfony/deprecation-contracts (v2.2.0): Loading from cache
- Updating symfony/mime (v5.0.5 => v5.2.5): Loading from cache
- Updating symfony/http-foundation (v4.4.5 => v4.4.20): Loading from cache
- Updating symfony/event-dispatcher-contracts (v1.1.7 => v1.1.9): Loading from cache
- Updating psr/container (1.0.0 => 1.1.1): Loading from cache
- Updating symfony/event-dispatcher (v4.4.5 => v4.4.20): Loading from cache
- Updating psr/log (1.1.2 => 1.1.3): Loading from cache
- Updating symfony/debug (v4.4.5 => v4.4.20): Loading from cache
- Updating symfony/error-handler (v4.4.5 => v4.4.20): Loading from cache
- Installing symfony/http-client-contracts (v2.3.1): Loading from cache
- Updating symfony/http-kernel (v4.4.5 => v4.4.20): Loading from cache
- Updating symfony/finder (v4.4.5 => v4.4.20): Loading from cache
- Updating symfony/service-contracts (v2.0.1 => v2.2.0): Loading from cache
- Updating symfony/console (v4.4.5 => v4.4.20): Loading from cache
- Updating symfony/polyfill-iconv (v1.14.0 => v1.22.1): Loading from cache
- Updating doctrine/lexer (1.2.0 => 1.2.1): Loading from cache
- Updating egulias/email-validator (2.1.17 => 2.1.25): Loading from cache
- Updating swiftmailer/swiftmailer (v6.2.3 => v6.2.7): Loading from cache
- Updating opis/closure (3.5.1 => 3.6.1): Loading from cache
- Updating symfony/translation-contracts (v2.0.1 => v2.3.0): Loading from cache
- Updating symfony/translation (v4.4.5 => v4.4.20): Loading from cache
- Updating nesbot/carbon (2.31.0 => 2.46.0): Loading from cache
- Updating monolog/monolog (1.25.3 => 1.26.0): Loading from cache
- Installing league/mime-type-detection (1.7.0): Loading from cache
- Updating league/flysystem (1.0.65 => 1.1.3): Loading from cache
- Updating league/commonmark (1.3.1 => 1.5.7): Loading from cache
- Updating doctrine/inflector (1.3.1 => 2.0.3): Loading from cache
- Updating laravel/framework (v6.18.1 => v6.20.8): Loading from cache
- Updating fideloper/proxy (4.3.0 => 4.4.1): Loading from cache
- Updating filp/whoops (2.7.1 => 2.9.2): Loading from cache
- Updating jaybizzle/crawler-detect (v1.2.95 => v1.2.105): Loading from cache
- Updating mobiledetect/mobiledetectlib (2.8.34 => 2.8.37): Loading from cache
- Updating jenssegers/agent (v2.6.3 => v2.6.4): Loading from cache
- Installing symfony/polyfill-intl-grapheme (v1.22.1): Loading from cache
- Installing symfony/string (v5.2.4): Loading from cache
- Updating kyslik/column-sortable (6.3.0 => 6.4.0): Loading from cache
- Updating laravel/helpers (v1.2.0 => v1.4.1): Loading from cache
- Updating laravelcollective/html (v6.1.0 => v6.2.1): Loading from cache
- Updating lavary/laravel-menu (v1.7.7 => v1.8.3): Loading from cache
- Updating guzzlehttp/psr7 (1.6.1 => 1.7.0): Loading from cache
- Updating mews/captcha (3.0.2 => 3.2.5): Loading from cache
- Updating nwidart/laravel-modules (7.1.0 => 7.3.0): Loading from cache
- Updating orangehill/iseed (v2.6.3 => v2.6.4): Loading from cache
- Installing symfony/property-info (v5.2.4): Loading from cache
- Updating symfony/property-access (v5.0.5 => v5.2.4): Loading from cache
- Updating symfony/workflow (v4.4.5 => v4.4.20): Loading from cache
- Updating firebase/php-jwt (v5.1.0 => v5.2.1): Loading from cache
- Updating phpseclib/phpseclib (2.0.25 => 2.0.30): Loading from cache
- Updating lcobucci/jwt (3.3.1 => 3.4.5): Loading from cache
- Updating nikic/php-parser (v4.3.0 => v4.10.4): Loading from cache
- Updating mtdowling/jmespath.php (2.5.0 => 2.6.0): Loading from cache
- Updating guzzlehttp/promises (v1.3.1 => 1.4.1): Loading from cache
- Updating guzzlehttp/guzzle (6.5.2 => 6.5.5): Loading from cache
- Updating aws/aws-sdk-php (3.133.34 => 3.173.27): Loading from cache
- Updating paragonie/constant_time_encoding (v2.3.0 => v2.4.0): Loading from cache
- Updating pragmarx/google2fa-laravel (v1.3.3 => v1.4.1): Loading from cache
- Updating predis/predis (v1.1.1 => v1.1.6): Loading from cache
- Updating spatie/laravel-permission (3.11.0 => 3.18.0): Loading from cache
- Updating yajra/laravel-datatables-oracle (v9.9.0 => v9.15.2): Loading from cache
- Updating maximebf/debugbar (v1.16.1 => v1.16.5): Loading from cache
- Updating barryvdh/laravel-debugbar (v3.2.9 => v3.5.2): Loading from cache
- Updating fzaninotto/faker (v1.9.1 => v1.9.2): Loading from cache
- Updating hamcrest/hamcrest-php (v2.0.0 => v2.0.1): Loading from cache
- Updating mockery/mockery (1.3.1 => 1.3.4): Loading from cache
- Updating myclabs/deep-copy (1.9.5 => 1.10.2): Loading from cache
- Updating sebastian/recursion-context (3.0.0 => 3.0.1): Loading from cache
- Updating doctrine/instantiator (1.3.0 => 1.4.0): Loading from cache
- Updating sebastian/exporter (3.1.2 => 3.1.3): Loading from cache
- Updating sebastian/diff (3.0.2 => 3.0.3): Loading from cache
- Updating sebastian/comparator (3.0.2 => 3.0.3): Loading from cache
- Updating phpdocumentor/reflection-common (2.0.0 => 2.2.0): Loading from cache
- Updating webmozart/assert (1.7.0 => 1.10.0): Loading from cache
- Updating phpdocumentor/type-resolver (1.1.0 => 1.4.0): Loading from cache
- Updating phpdocumentor/reflection-docblock (5.1.0 => 5.2.2): Loading from cache
- Updating phpspec/prophecy (v1.10.3 => 1.12.2): Loading from cache
- Updating phpunit/php-file-iterator (2.0.2 => 2.0.3): Loading from cache
- Updating phpunit/php-timer (2.1.2 => 2.1.3): Loading from cache
- Updating sebastian/environment (4.2.3 => 4.2.4): Loading from cache
- Updating sebastian/object-reflector (1.1.1 => 1.1.2): Loading from cache
- Updating sebastian/object-enumerator (3.0.3 => 3.0.4): Loading from cache
- Updating webonyx/graphql-php (v0.13.8 => v0.13.9): Loading from cache
- Updating phpunit/php-token-stream (3.1.1 => 3.1.2): Loading from cache
- Updating sebastian/code-unit-reverse-lookup (1.0.1 => 1.0.2): Loading from cache
- Updating theseer/tokenizer (1.1.3 => 1.2.0): Loading from cache
- Updating sebastian/resource-operations (2.0.1 => 2.0.2): Loading from cache
symfony/polyfill-intl-normalizer suggests installing ext-intl (For best performance)
symfony/http-client-contracts suggests installing symfony/http-client-implementation
symfony/polyfill-intl-grapheme suggests installing ext-intl (For best performance)
symfony/property-info suggests installing psr/cache-implementation (To cache results)
symfony/property-info suggests installing symfony/doctrine-bridge (To use Doctrine metadata)
symfony/property-info suggests installing symfony/serializer (To use Serializer metadata)
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating optimized autoload files
Deprecation Notice: Class App\Services\RepairService located in ./app/Http/Services/RepairService.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in /usr/share/php/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class App\Services\DeviceService located in ./app/Http/Services/DeviceService.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in /usr/share/php/Composer/Autoload/ClassMapGenerator.php:201
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
In Filesystem.php line 150:
tempnam(): file created in the system's temporary directory
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
mis@air:~/airQuality-taichung$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package zendframework/zend-diactoros is abandoned, you should avoid using it. Use laminas/laminas-diactoros instead.
Generating optimized autoload files
Deprecation Notice: Class App\Services\RepairService located in ./app/Http/Services/RepairService.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in /usr/share/php/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class App\Services\DeviceService located in ./app/Http/Services/DeviceService.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in /usr/share/php/Composer/Autoload/ClassMapGenerator.php:201
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
In Filesystem.php line 150:
tempnam(): file created in the system's temporary directory
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
mis@air:~/airQuality-taichung$ cp .env.example .env
mis@air:~/airQuality-taichung$ chmod 777 -R storage
mis@air:~/airQuality-taichung$ chmod 777 -R bootstrap/cache/
mis@air:~/airQuality-taichung$ cd bin/hama-dev/
mis@air:~/airQuality-taichung/bin/hama-dev$ ls
README.md config.js images livereload.default.js local.key node_modules package.json
basic.handlebars error.log liveReloadServer.js local.crt monitor.js package-lock.json rmdir.js
mis@air:~/airQuality-taichung/bin/hama-dev$ npm install
> [email protected] install /home/mis/airQuality-taichung/bin/hama-dev/node_modules/node-sass
> node scripts/install.js
Cached binary found at /home/mis/.npm/node-sass/4.13.1/linux-x64-64_binding.node
> [email protected] install /home/mis/airQuality-taichung/bin/hama-dev/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory '/home/mis/airQuality-taichung/bin/hama-dev/node_modules/websocket/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory '/home/mis/airQuality-taichung/bin/hama-dev/node_modules/websocket/build'
> [email protected] postinstall /home/mis/airQuality-taichung/bin/hama-dev/node_modules/node-sass
> node scripts/build.js
Binary found at /home/mis/airQuality-taichung/bin/hama-dev/node_modules/node-sass/vendor/linux-x64-64/binding.node
Testing binary
Binary is fine
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 782 packages from 558 contributors and audited 852 packages in 13.529s
3 packages are looking for funding
run `npm fund` for details
found 61 vulnerabilities (49 low, 3 moderate, 9 high)
run `npm audit fix` to fix them, or `npm audit` for details
mis@air:~/airQuality-taichung/bin/hama-dev$ ./node_modules/gulp/bin/gulp.js --gulpfile=monitor.js --compile-only
Config File: ./config.js
[07:11:06] Using gulpfile ~/airQuality-taichung/bin/hama-dev/monitor.js
[07:11:06] Starting 'default'...
[07:11:06] Starting 'sass:watch'...
Sprite Updated
Crete CSS Sprite: ../../public/img/css_sprite/icons/test/
sass lunched
-----------------------Compiled-----------------------------
[07:11:30] Finished 'sass:watch' after 24 s
[07:11:30] Finished 'default' after 24 s
mis@air:~/airQuality-taichung/bin/hama-dev$ cd ..
mis@air:~/airQuality-taichung/bin$ ./sassAgent.sh
press ctrl-z to pause; fg to resume
Config File: ./config.js
LiveReload server lunched at port 35729
[07:12:29] Using gulpfile ~/airQuality-taichung/bin/hama-dev/monitor.js
[07:12:29] Starting 'default'...
[07:12:29] Starting 'sass:watch'...
Sprite Updated
Crete CSS Sprite: ../../public/img/css_sprite/icons/test/
sass lunched
---------------------Start Watch----------------------------
[07:12:53] Finished 'sass:watch' after 24 s
[07:12:53] Finished 'default' after 24 s