UJP - 2008 13inch 1カテゴリのエントリ

I hope this helps.

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

  • カテゴリ 2008 13inch 1 の最新配信
  • RSS
  • RDF
  • ATOM

ブログ - 2008 13inch 1カテゴリのエントリ

バッテリの交換修理 その4

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2022/1/21 18:03
 MacBook 2008 lateのトラックパッドがクリックが効かなくなったので2019年8月以来のバッテリ交換になるので901日目.
 互換バッテリなのに2年以上もったということは評価できるかな.
 スクショ撮り忘れたけれど最後は84%くらいでした.


 このモデルは,バッテリ交換が楽.バッテリだけでなくメモリもストレージも簡単に交換できる.
 買ったのは2009年10月なので12年と103日目.

CPU Usageが激減

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2021/10/25 15:49
 macOS Serverで使っていたTime Machine用HDDが壊れたのでSSDに入れ替えた結果、CPUリソースが圧倒的に減りました.

 まずはデイリーで.

 75%あたりだったのに25-30%程度に低減.

 週間で確認してもこのグラフ.


 いまさらだけれどIOの改善って効果あるね.
 サーバのCPU負荷が右肩上がり.上がったきっかけはストレージをHDDからSSDに変更したこと.それ以外に,OSやミドルウェアのバージョンアップや設定変更はしていない.利用者が増えたわけでもない.


CPU Usageのグラフ

 ということで,OSを再起動してみた.
 するとどうでしょう...起動してこなくなった.

 こんな時のために,10年前の2009年に購入したこのサーバには予備機が準備してあって,SSDを取り外して2号機に取り付けて起動.しかし残念ながらこれも起動してこない.

 起動しなかったSSDを,別のMacに接続してみた.すると次のようなメッセージが.


 「ディスク上のファイルは開いたりコピーしたりすることができますが変更は保存することはできません」というメッセージ.
 ディスクユーティリティでFirst Aidしてみる.


 残念ながら失敗.File System check exit code is 8と出ていて,これはファイルシステムが壊れているという意味で,フォーマットしか修復する方法は無い模様.

 ということで,Time Machineからのフルリストアを実施.


 リストア先は元の1号機だけれど,2号機から取り外したSSDが入っているのでストレージの名前がPlutoになっている.


 「バックアップ済みのデータ」の画面が表示されてから,Time Machineのバックアップ先のストレージ,今回は約3年前に購入したカクうす HDPX-UTA1.0KというUSB-HDDを接続する.


 ありがたいことに,直前までバックアップされていた模様.Time Machineが二年半も動いてなかった実績もあったのでヒヤヒヤです.


 そして84GBほどのデータは1時間半弱でリストア完了.

 被害は,少量のアクセスログと,2本のブログ記事がなくなりました.

 使っているのはMacBook 2008 lateモデルなので,SSDもバッテリも取り外しやすいモデルでよかった...

サーバをSSDにしたらどうなったのか

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2019/8/7 23:50
 土曜日の朝にHDDをSSDに入れ替えて見たのだけれど目に見える変化があったのか?ということで,MRTGで取っているサーバシステムリソースから,特徴的な部分を抜き出して見た.

 まずは,CPU Usageを.


 SSDによってI/Oが高速になったので,CPU負荷が下がるのではないか?という予想があったのだけれど,残念ながら変化なしという感じ.

 次に,WebサーバなのでhttpdのプロセスがCPUを利用している時間をグラフ化したもの.


 これがどんと減った.つまり,I/Oが速いことで高速に処理できるようになったので,CPUを占有しなくなったということ.

 そして,じんわりと効いているのがこれ.


 macOSのサーバなので,バックアップはTime Machineを使って取っているけえど,その実際のエンジンのbackupdが利用するCPU時間を示すもの.
 backupdは1時間程度ごとに動作して,必要に応じてバックアップを取るのだけれど,その処理時間が長いとグラフに出てくるが,SSDに交換してからは,すいている感じに見える.

 利用していてもサーバは速いはずなんだけれど,総合サーバになっているのと,なんせ10年以上前(MacBook 2008年モデル)なので,CPU性能なども低いので,そんなに体感できるほどの高速化は無いかな.
 それよりは,11年使ったHDDが故障する前に交換できたことの方がメリットが大きい.

バッテリの交換修理 その3

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2019/8/4 23:00
 2009年10月に整備調整品を購入したMacBook 2008 Lateですが,もう一台,予備用に買っていたMacBookからバッテリを移植して今日まで動き続けてきました.
 予備のMacbookには,ロワジャパンで買ったバッテリを2013年6月に装着しているようだから,使用期間は次の通り.

・2009年10月から2013年6月なので3年8ヶ月
・2013年6月から2019年8月までなので6年と2ヶ月

 純正バッテリで同じようにサーバ運用していても,このように違いがあるのか...
 そして今回,ロワジャパンは最近評判を落としているようで,アマゾンのワールドプラスというところでバッテリを購入しました.A1280というやつで5390円(税別)


 まずはMacBook 2008 lateの開腹.裏面にひっくり返してノッチを立てる.


 それだけでバッテリとハードディスクにアクセスできます.


 今回,6年2ヶ月ぶりなのでファンあたりの清掃をしようと裏蓋も開腹.PH00ドライバが必要です.清掃はエアーでバババッと野外で吹き飛ばして終了.少し無水エタノールで拭き掃除.


 今回購入したバッテリのWorld Plusの箱.


 保証は6ヶ月〜1年と書かれています.今回購入したものは,アマゾンでは1年保証付きと記載されていました.


 純正のバッテリとWorld Plusのバッテリを並べて確認.遠目にはわからないくらい外観もそっくり.


 アップルのロゴがあるかどうかでわかりますかね.

 そして,バッテリの情報を取得して見た.
ujp:~ mars$  ioreg -l | grep Capacity🆑
    | |           "MaxCapacity" = 5603
    | |           "CurrentCapacity" = 5603
    | |           "LegacyBatteryInfo" = {"Amperage"=0,"Flags"=5,"Capacity"=5603,
"Current"=5603,"Voltage"=12574,"Cycle Count"=1}
    | |           "DesignCapacity" = 5400
ujp:~ mars$
 MaxCapacityが5603なのだが,DesignCapacityは5400となっている.設計より容量は大きいようだ.
 "Cycle Count"=1となっているが,これは今後もそんなに増えないのだろうと思う.付けっ放しなので.

hexoをインストール

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2019/4/19 0:26
 静的コンテンツ生成ツールで,以前HUGOを試して見たけれど,今回はHexo(ヘクソ)を試して見る.名前が,声に出して言いにくいなぁ...

 まずは,最初にnode.jsのバージョンを確認.
$ node -v🆑
v11.14.0
$ npm -v🆑
6.7.0
$
 npmを使って,インストールを実施.

$ npm install hexo-cli -g🆑
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied🈁, access '/usr/local/lib/node_modules'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR!   stack:
npm ERR!    "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as
 the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please
 double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/server/.npm/_logs/2019-04-18T15_06_08_043Z-debug.log
$
 権限不足らしい.sudoで実行.
$ sudo npm install hexo-cli -g🆑

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
/usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo-cli/bin/hexo

> fsevents@1.2.8 install /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
> node install

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.8 and node@11.14.0
 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied,
 mkdir '/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents/lib'
gyp WARN EACCES user "root" does not have permission to access the dev dir
 "/Users/server/.node-gyp/11.14.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir
 "/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir
 '/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents/.node-gyp'
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/bin/node"
 "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
 "configure" "--fallback-to-build"
 "--module=/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
/lib/binding/Release/node-v67-darwin-x64/fse.node"
 "--module_name=fse" "--module_path=/usr/local/lib/node_modules/hexo-cli
/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64"
 "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0"
 "--node_napi_label=node-v67"
gyp ERR! cwd /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
gyp ERR! node -v v11.14.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node
 /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
 configure --fallback-to-build
 --module=/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse
 --module_path=/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
/lib/binding/Release/node-v67-darwin-x64 --napi_version=4
 --node_abi_napi=napi --napi_build_version=0
 --node_napi_label=node-v67' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous>
 (/usr/local/lib/node_modules/hexo-cli/node_modules
/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:999:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit
 (internal/child_process.js:266:5)
node-pre-gyp ERR! System Darwin 15.6.0
node-pre-gyp ERR! command "/usr/local/bin/node"
 "/usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
/node_modules/node-pre-gyp/bin/node-pre-gyp" "install"
 "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
node-pre-gyp ERR! node -v v11.14.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm
/node_modules/node-gyp/bin/node-gyp.js
 configure --fallback-to-build --module=/usr/local/lib/node_modules
/hexo-cli/node_modules/fsevents/lib/binding/Release
/node-v67-darwin-x64/fse.node --module_name=fse
 --module_path=/usr/local/lib/node_modules/hexo-cli/node_modules
/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4
 --node_abi_napi=napi --napi_build_version=0
 --node_napi_label=node-v67' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8
 (node_modules/hexo-cli/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8
 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ hexo-cli@1.1.0
added 225 packages from 434 contributors in 11.876s
$
 まだまだエラー出ているなぁ...
 unsafe-permオプションをつける.
$ sudo npm install hexo-cli -g --unsafe-perm🆑
/usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo-cli/bin/hexo

> fsevents@1.2.8 install /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
> node install

node-pre-gyp WARN Using needle for node-pre-gyp https download
[fsevents] Success: "/usr/local/lib/node_modules
/hexo-cli/node_modules/fsevents/lib/binding/Release
/node-v67-darwin-x64/fse.node" is installed via remote
+ hexo-cli@1.1.0
added 68 packages from 33 contributors and updated 1 package in 6.508s
$
 問題なくインストール完了した模様.

 ちなみに,最初からsudoのunsafe-permオプションつけて実行したものがこちら.

$ sudo npm install hexo-cli -g --unsafe-perm🆑
Password:🆑
/usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo-cli/bin/hexo

> fsevents@1.2.8 install /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
> node install

node-pre-gyp WARN Using needle for node-pre-gyp https download
[fsevents] Success: "/usr/local/lib/node_modules/hexo-cli/node_modules
/fsevents/lib/binding/Release/node-v67-darwin-x64
/fse.node" is installed via remote
+ hexo-cli@1.1.0
added 293 packages from 458 contributors in 11.245s
$
 軽くワーニング出ているけど,まぁいいか.

Node.js 11.14.0 インストール

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2019/4/19 0:04
 作業ログ的な.

https://nodejs.org/ja/













 インストールを確認.
$ node -v🆑
v11.14.0🈁
$ npm -v🆑
6.7.0🈁
$

pokemonsay

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2019/4/18 23:49
 やりすぎだと思うは,この世界.SLコマンドあたりから相当な発展?が行われているようだ.

 cowsayのポケモン版があるというので.流石に?Brewには入ってなかったので,Githubからクローンしてインストール.
$ git clone http://github.com/possatti/pokemonsay🆑
Cloning into 'pokemonsay'...
warning: redirecting to https://github.com/possatti/pokemonsay/
remote: Enumerating objects: 423, done.
remote: Total 423 (delta 0), reused 0 (delta 0), pack-reused 423
Receiving objects: 100% (423/423), 257.11 KiB | 87.00 KiB/s, done.
Resolving deltas: 100% (358/358), done.
$
 無事クローンできたので,インストール.
$ cd pokemonsay🆑
$ ./install.sh🆑
The files were installed to '/Users/server/.pokemonsay/'.
A 'pokemonsay' script was created in '/Users/server/bin/'.
A uninstall script was created in '/Users/server/.pokemonsay/'.
It may be necessary to logout and login back again in order to have the
 'pokemonsay' available in your path.
$
 /usr/local/binじゃなくて,ユーザのローカルに入るのね.ご利用に注意ってことかなぁ.
 そして実行して見る.
$ ~/bin/pokemonsay Hello🆑
 _______
< Hello >
 -------
           \
            \
             \
              \
   ▄▄▄▄▄▄▄▄
 ▄▄
 ▄▄▄ ▄▄▄
 ▀▄▄▄▄▄▄▄▄▄▀
▄▄▄▄▄▄▄▄▄▄▄▀
▀▄▄▄▄▄▄▄▄▄
   ▄▄▄▄
   ▀▄▄▄ ▄▀
     ▀▄▄▀

Kakuna
$ ~/bin/pokemonsay Hello🆑
 _______
< Hello >
 -------
           \
            \
             \
              \
             ▄▄▄
            ▄▄ ▄▄▄
     ▄▄▄       ▄▄▀
   ▄▄  ▄▄▄▄▄▄▄▄▄▀
    ▄ ▄▄▄▄ ▄▄▄  ▄▄
     ▄▄▄▄   ▄    ▄▄
  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄  ▄  ▄▀
 ▀▀▀  ▄▄▄▄▄▄ ▄   ▄ ▄▄
          ▄▄▄▄▄▄▄▀
     ▀▄▄▄▄ ▄▀▀   ▄▄▄▀
       ▀▀ ▀▀     ▀▄▀

Magikarp
$
 おおおお.ランダムか.


 英語でスペルを知っていれば,-pオプションで指定できるそうだ...

asciiquarium

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2019/4/18 23:31
 いいのを教えてもらった第2弾.これは実用的ではない,とおもうけど.

 まずは,どんなものか確認.
$ brew info asciiquarium🆑
asciiquarium: stable 1.1 (bottled)
Aquarium animation in ASCII art
https://robobunny.com/projects/asciiquarium/html/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/asciiquarium.rb
==> Analytics
install: 203 (30 days), 628 (90 days), 2,189 (365 days)
install_on_request: 201 (30 days), 626 (90 days), 2,166 (365 days)
build_error: 0 (30 days)
$
 これもサクッとHomeBrewでインストール.
$ brew install asciiquarium🆑
Warning: You are using macOS 10.11.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience, as you are running this old version.

==> Downloading https://homebrew.bintray.com
/bottles/asciiquarium-1.1_1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring asciiquarium-1.1_1.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/asciiquarium/1.1_1: 17 files, 369.2KB
$
 実行して見る.


 んー,動いてないと寂しい...海上や海中に時より特殊生物やイベントが発生したりして,意外と目が離せないよ.

figlet

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2019/4/18 23:26
 いいのを教えてもらった.このツール.
$ brew info figlet🆑
figlet: stable 2.2.5 (bottled)
Banner-like program prints strings as ASCII art
http://www.figlet.org/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/figlet.rb
==> Analytics
install: 1,327 (30 days), 4,256 (90 days), 13,780 (365 days)
install_on_request: 1,317 (30 days), 4,237 (90 days), 13,732 (365 days)
build_error: 0 (30 days)
$
 brewに対応しているのでサクッとインストール.
$ brew install figlet🆑
Updating Homebrew...
==> Auto-updated Homebrew!

〜略〜

==> Downloading https://homebrew.bintray.com/bottles/figlet-2.2.5.el_capitan.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/94/943067dae95de58518b20334aec4
01cf5fd24866ff77315c0d7bd8b5d4ab0011?__gda__=exp=1555597549~hm
######################################################################## 100.0%
==> Pouring figlet-2.2.5.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/figlet/2.2.5: 676 files, 9.4MB
$
 パスを確認して.
$ which figlet🆑
/usr/local/bin/figlet🈁
$
 早速使って見る.
$ figlet Hello🆑
 _   _      _ _
| | | | ___| | | ___
| |_| |/ _ \ | |/ _ \
|  _  |  __/ | | (_) |
|_| |_|\___|_|_|\___/

$
 昔,いや今もbannerコマンドというのがあって,こういうアスキーアートをログイン前画面に出していたりしたけれど,現在の?bannerコマンドだと横断幕印刷用みたいな感じになってしまう.
$ /usr/local/bin/figlet `hostname`🆑
       _       _         _                 _
 _ __ | |_   _| |_ ___  | | ___   ___ __ _| |
| '_ \| | | | | __/ _ \ | |/ _ \ / __/ _` | |
| |_) | | |_| | || (_) || | (_) | (_| (_| | |
| .__/|_|\__,_|\__\___(_)_|\___/ \___\__,_|_|
|_|
$
 NetCommons3をインストルしようとしたのだけれど,エラーが.
$ cd /netcommons/htdocs/app/Console🆑
$ ./cake install.install🆑
---------------------------------------------------------------
NetCommons Install
---------------------------------------------------------------
[S]tart
[H]elp
[Q]uit
What would you like to do? (S/H/Q)
[Q] > S🆑
Please entry base url.
> netcommons.test.jp🆑
Current language? (en/ja)
[ja] > ja🆑
Success: PHP(7.2.17) 正常
Success: pdo_mysql(7.2.17) 正常
Database configuration's datasource? (Mysql)
[Mysql] >🆑
Database configuration's host?
[localhost] >🆑
Database configuration's port?
[3306] >🆑
Database configuration's database?
[nc3] >🆑
Database configuration's prefix?
[] >🆑
Database configuration's login?
> root🆑
Database configuration's password?
> password🆑
2019-04-14 14:35:29 Info: DB Connected
2019-04-14 14:35:29 Info: Database nc3 for Database/Mysql created successfully
2019-04-14 14:35:29 Info: [Migrations.migration] Start migrating all plugins
2019-04-14 14:35:29 Info: [migration] Start migrating "Files" for master connection
2019-04-14 14:35:29 Info: [migration]   cd /netcommons/htdocs/app &&
 Console/cake Migrations.migration run all -p Files -c master -i master 2>&1
2019-04-14 14:35:30 Info: [migration]   Cake Migration Shell
2019-04-14 14:35:30 Info: [migration]   -------------------------------------------
--------------------
2019-04-14 14:35:30 Info: [migration]   PHP Fatal error:
  Cannot use 'object' as class name as it is reserved in
 /netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Core/Object.php on line 18
2019-04-14 14:35:30 Info: [migration]   Fatal Error Error: Cannot use 'object'
 as class name as it is reserved in [/netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Core/Object.php, line 18]
2019-04-14 14:35:30 Info: [migration]
2019-04-14 14:35:30 Info: [migration]   2019-04-14 14:35:30 Error: Cannot use
 'object' as class name as it is reserved in [/netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Core/Object.php, line 18]
2019-04-14 14:35:30 Info: [migration]
2019-04-14 14:35:30 Info: [migration] Failure migrated "Files" for master connection
2019-04-14 14:35:30 Info: [migration] Start migrating "Users" for master connection

〜略〜

2019-04-14 14:35:42 Info: [migration]
   2019-04-14 14:35:42 Error: Cannot use 'object' as class name as it is reserved in
 [/netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Core/Object.php, line 18]
2019-04-14 14:35:42 Info: [migration]
2019-04-14 14:35:42 Info: [migration] Failure migrated "Wysiwyg" for master connection
Error: SQLSTATE[42S02]: Base table or view not found: 1146 Table
 'nc3.site_settings' doesn't exist
#0
/netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Model/Datasource/DboSource.php(502):
 PDOStatement->execute(Array)
#1 /netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Model/Datasource/Database/Mysql.php
(348): DboSource->_execute('SHOW FULL COLUM...')
#2 /netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Model/Model.php(1397):
 Mysql->describe(Object(SiteSetting))
#3 /netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Model/Datasource/DboSource.php(2199):
 Model->schema()
#4 /netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Model/Datasource/Database/Mysql.php
(409): DboSource->_prepareUpdateFields(Object(SiteSetting), Array, false, true)
#5 /netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Model/Model.php(2672):
 Mysql->update(Object(SiteSetting), Array, NULL, Array)
#6 /netcommons/htdocs/app/Plugin/Install/Utility/InstallUtil.php(616):
 Model->updateAll(Array, Array)
#7 /netcommons/htdocs/app/Plugin/Install/Console/Command/Task/InstallMigrationsTask.php(48):
 InstallUtil->installMigrations('master', Array)
#8 /netcommons/htdocs/app/Plugin/Install/Console/Command/InstallShell.php(90):
 InstallMigrationsTask->execute()
#9 /netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Console/Shell.php(462):
 InstallShell->main()
#10 
/netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Console/ShellDispatcher.php(219):
 Shell->runCommand(NULL, Array)
#11 
/netcommons/htdocs/vendors/cakephp/cakephp/lib/Cake/Console/ShellDispatcher.php(66):
 ShellDispatcher->dispatch()
#12 /netcommons/htdocs/app/Console/cake.php(35): ShellDispatcher::run(Array)
#13 {main}
$
 これはNetCommons3が使っているフレームワーク,CakePHP2のクラス名が重複してしまっているからだそうです.  これは,次のファイルを編集.
app/Plugin/Migrations/Lib/CakeMigration.php
 この変更.
  1 <?php
  2 /**
  3  * Copyright 2009 - 2014, Cake Development Corporation (http://cakedc.com)
  4  *
  5  * Licensed under The MIT License
  6  * Redistributions of files must retain the above copyright notice.
  7  *
  8  * @copyright Copyright 2009 - 2014, Cake Development Corporation (http://cakedc.com)
  9  * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
 10  */
 11
 12 App::uses('CakeSchema', 'Model');
 13
 14 /**
 15  * Base Class for Migration management
 16  */
 17 class CakeMigration extends CakeObject { 🈁 ObjectからCakeObjectに変更した
 18
 19 /**
 インストールをリトライしてみる.
2019-04-15 13:37:19 Info: [bower] Successfully bower install angular-nvd3#>=0.1.1 for Registrations
2019-04-15 13:37:19 Info: [bower] Start bower install visualcaptcha.jquery#>=0.0.5 for VisualCaptcha
sh: --allow-root: command not found
<?php
2019-04-15 13:37:19 Info: [bower] Successfully bower install visualcaptcha.jquery#>=0.0.5 for VisualCaptcha
2019-04-15 13:37:19 Info: [bower] Start bower install components/MathJax#>=2.6 for Wysiwyg
sh: --allow-root: command not found
2019-04-15 13:37:19 Info: [bower] Successfully bower install components/MathJax#>=2.6 for Wysiwyg
2019-04-15 13:37:19 Info: [bower] Start bower install jquery.simplePagination#* for Wysiwyg
sh: --allow-root: command not found
2019-04-15 13:37:19 Info: [bower] Successfully bower install jquery.simplePagination#* for Wysiwyg
NetCommons Login id?
> administrator🆑
NetCommons Login password?
> password🆑
Actival languages? (en,ja/en/ja)
[ja] > ja🆑
<?php
Warning Error: get_class() expects parameter 1 to be object, null given in
 [/netcommons/htdocs/app/Plugin/Auth/Model/AutoUserRegistMail.php, line 54]

2019-04-15 13:38:32 Warning: get_class() expects parameter 1 to be object, null given in
 [/netcommons/htdocs/app/Plugin/Auth/Model/AutoUserRegistMail.php, line 54]
Install success.
$
 いくつかワーニングは出ているけれど,インストールはできた模様.

mysql_secure_installationを実行する

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2019/4/11 23:19
 Rasberry Piにmariadbをインストールした時にも実行したmysql_secure_installationを実行する.
 まずはコマンドの場所を確認.
$ find /usr/local/Cellar/mariadb/10.3.14|grep secure🆑
/usr/local/Cellar/mariadb/10.3.14/bin/mysql_secure_installation🈁
/usr/local/Cellar/mariadb/10.3.14/share/man/man1/mysql_secure_installation.1
$
 あった.
$ /usr/local/Cellar/mariadb/10.3.14/bin/mysql_secure_installation🆑

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):🈁
 rootのパスワードを入力.インストール直後は入ってないので,カラでエンター.
Enter current password for root (enter for none):🆑
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n]🈁
 rootユーザのパスワードをセットするので,yを返答.
Set root password? [Y/n] y🆑
New password:🆑
Re-enter new password:🆑
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]🈁
 匿名ユーザがあるらしいので,それを削除する.
Remove anonymous users? [Y/n] y🆑
 ... Success!🈁

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]🈁
 rootユーザはリモートから接続できないようにするので,yを選択.
Disallow root login remotely? [Y/n] y🆑
 ... Success!🈁

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
 testという名前のデータベースがあるようなので,削除するのでyを選択.
Remove test database and access to it? [Y/n] y🆑
 - Dropping test database...
 ... Success!🈁
 - Removing privileges on test database...
 ... Success!🈁

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
 testデータベースを削除した際に,権限も削除したので権限情報をリロードするというので,yを選択.
Reload privilege tables now? [Y/n] y🆑
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!🈁
$
 最低限のセキュアセットアップができた模様.
 接続してみる.
$ mysql -uroot -p🆑
Enter password:🆑
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 10.3.14-MariaDB Homebrew

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
 存在しているデータベースを確認.
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.003 sec)

MariaDB [(none)]>
 ユーザを確認.
MariaDB [(none)]> select host,user from user;
ERROR 1046 (3D000): No database selected
MariaDB [(none)]>
 データベースが選択されてないとエラーが.データベースを指定して実行.
MariaDB [(none)]> select host,user from mysql.user;
+-----------+------+
| host      | user |
+-----------+------+
| 127.0.0.1 | root |
| ::1       | root |
| localhost | root |
+-----------+------+
3 rows in set (0.010 sec)

MariaDB [(none)]>
 それでプロンプトがnoneになっているのか.
 ではデータベースを変更してもう一回.
MariaDB [(none)]> use mysql🆑
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [mysql]> select host,user from user;🆑
+-----------+------+
| host      | user |
+-----------+------+
| 127.0.0.1 | root |
| ::1       | root |
| localhost | root |
+-----------+------+
3 rows in set (0.008 sec)

MariaDB [mysql]>
 抜けて終了.
MariaDB [mysql]> quit🆑
Bye
$
 前回はパスワード長の指定などがあったけれど今回はそれがありませんでした.今時のトレンドなのかな.

MacBook 2008 LateにSSD(CSSD-S6i512HG7V)を増設する

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2019/4/8 0:02
 カミさん専用で2009年に購入したMacBook 2008 Lateですが,ずっと眠っているのでテコ入れすることに.再活性化か.
 それで,メモリは最大の8GBに搭載済みだったので,HDDをSSDしてみることに.


 特にこだわりはなかったのだけれど,秋葉原のTSUKUMOで一番安かったCFDのもので512GBが7,538円(税込)でした.1GBあたり14.7円でした.店頭で「中身は,まんまIntelです」と書いてあったけれど,実際インテルでした.
 内容物は本体以外に,7.5mm→9.5mmスペーサーと2.5インチを3.5インチに変換する金属製のマウンターも.デスクトップ用として買うにも良いってことか.


 MacBook 2008のハードディスクの交換は,バッテリパックのケースを外して,固定している3本のネジをとるだけだけど,PH000というドライバが必要です.
 取り出してみたHDDと今回購入したSSDを比べてみたけれど,サイズに差がありました.重量も差がある.SSDは軽い.


 1〜2年前に秋葉原で購入したデジタルノギスを取り出してみました.SR44という電池が2つ付属.早速測ってみます.


 写真左上からHDDが9.67mm,SSDが6.15mm.HDDは9.5mmサイズの中ではオーバー気味で,SSDは7.5mmより小さいと言うことでした.
 スペーサは2.4mmで,SSDにスペーサを取り付けても8.5mmでした.


 HDDについていたネジをSSDに移植して再度セットして蓋を閉めたら終了.

USBコネクタを接続したら電力不足になった模様

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2016/9/2 0:56
 2008年モデルのMacBookに接続しているLaCieのポルシェデザイン320GB 2.5インチ HDDで2010年に購入したLCH-PT320Uを,L型コネクタを使って接続してみた.


 黒いL型のコネクタも,白いクネクネコネクタも,Mac側の2つのポートどちらに挿しても,HDDを認識しなかった.認識しないというか,明らかにハードディスクから回転できません的な音が.危険!

 LCH-PT320Uの仕様を調べてみたら,電源投入時 (ピーク時) :4W(320GB) Rand W/R時 定格 :3W 待機時 (アイドル時) :2Wとなっていて,この電源投入時の5Wに対応してないという事だな.

 ちなみに,TRANCENDの512GB SSDをつけたら認識したので,電力消費量が高いUSB機器の場合,認識できなくなる可能性があるという事だね.

 ケーブリングをすっきりさせるために買ったのに全部無駄になったな.今回は.

CPU温度とHDD温度の考察 その2

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2015/11/12 12:50
 Time Machineの動作時間を毎時から毎日へ変更した事で,CPU温度に変化があるか確認.


変更後

 朝方,温度が上がっている事が判る.


変更前

 あとは,こうして見るとHDDの温度グラフ(青色線)部分が,ギザギザしてない事が確認できる.

CPU温度とHDD温度の考察

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2015/11/11 16:23
 Webサーバとして利用しているMacBook Late 2008ですがCPU温度について調べてみました.

 これが直近1日分.最大温度が80度になっています.朝方からボコボコしなくなったのは,Time Machineによるバックアップの頻度を変更したからです.朝8時くらいが最低温度で,日中にかけて温度が上がっていますね.気温と連動という感じでしょうか.
 ハードディスクの温度は一定に保たれていますね.ファンが動作しているからかな.

 1年間のグラフで確認してみると,季節変動がある事がわかります.4月に温度が高いのは,不正な大量アクセスを受けていたから.9月から温度が上がっているのは,エアコンを使わなくなったからかな.

MacBook (late2008) のメモリを増設完了

カテゴリ : 
Apple » MacBook » 2008 13inch 1
ブロガー : 
ujpblog 2010/10/19 13:58
 サーバとして動いているMacBook(late2008)ですが,メモリを追加しました.



 2スロットあるので2GBx2枚で合計4GBです.これでメモリスワップ等が発生しなくなるのか,検証を続けたいと思っています.

新MacBook・MacBook Proのメモリーを交換しよう
http://ascii.jp/elem/000/000/186/186030/index-2.html

広告スペース
Google