Amazon Linux で bundle が cannot load such file -- io/console (LoadError) となる
bundle を実行しようとしたらエラーとなった
$ bundle -v /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- io/console (LoadError) from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/lib/bundler/vendor/thor/lib/thor/shell/basic.rb:2:in `<top (required)>' from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/lib/bundler/vendor/thor/lib/thor/shell/color.rb:1:in `<top (required)>' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/lib/bundler/vendor/thor/lib/thor/shell.rb:17:in `shell' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/lib/bundler/ui/shell.rb:14:in `initialize' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/lib/bundler/cli.rb:12:in `new' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/lib/bundler/cli.rb:12:in `rescue in start' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/lib/bundler/cli.rb:10:in `start' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/exe/bundle:19:in `block in <top (required)>' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.11.2/exe/bundle:17:in `<top (required)>' from /home/ec2-user/bin/bundle:23:in `load' from /home/ec2-user/bin/bundle:23:in `<main>'
調べてみたところ、 ruby-devel か io/console のインストールが怪しそう。
ruby-devel から対応してみる。
$ sudo yum install -y ruby-devel 読み込んだプラグイン:priorities, update-motd, upgrade-helper amzn-main/latest | 2.1 kB 00:00 amzn-updates/latest | 2.3 kB 00:00 treasuredata/x86_64 | 2.5 kB 00:00 パッケージ 1:ruby-devel-2.0-0.3.amzn1.noarch はインストール済みか最新バージョンです 何もしません
最新だ。io-consoleを入れてみる。
$ gem install io-console Fetching: io-console-0.4.5.gem (100%) Building native extensions. This could take a while... Successfully installed io-console-0.4.5 Parsing documentation for io-console-0.4.5 Installing ri documentation for io-console-0.4.5 Done installing documentation for io-console after 0 seconds 1 gem installed
動いた。
$ bundle -v Bundler version 1.11.2
ウイルスバスターコーポレートエディション で 検知 したウイルスの侵入経路や侵入方法について
要望があったので調べた。メモ。
前提
- WindowsServer 2008 R2
- ウイルスバスター コーポレートエディション 11.0
確認方法
特にない。
ウイルスが侵入したタイミングやファイルアクセスのタイミングで検知している。
検出したタイミング、場所はわかるが、経路までは追えない。
ですよね!
参考URL
サーバの管理がツライのでクラウドにしたい…
トレンドマイクロ ウイルスバスター クラウド 10 3年版(最新・3台版)
- 出版社/メーカー: トレンドマイクロ
- 発売日: 2015/09/04
- メディア: DVD-ROM
- この商品を含むブログを見る
aws cli で AutoScaling を停止させた
忘れてたのでメモ
上記を参考に以下コマンドを実施した
$ aws autoscaling suspend-processes --auto-scaling-group-name <AutoScalingGroupName>
これで AutoScaling の以下のプロセスが全て停止する
- Launch :グループに新しい EC2 インスタンスを追加。
- Terminate :グループから EC2 インスタンスを削除。
- HealthCheck :インスタンスのヘルスチェック。
- ReplaceUnhealthy :ヘルスチェックで異常とマークされたインスタンスを終了し、新しいインスタンスを作成。
- AZRebalance :リージョンのアベイラビリティーゾーンで EC2 インスタンスの数のバランスをとる。
- AlarmNotification :関連付けられている CloudWatch アラームから通知を受ける。
- ScheduledActions :スケジュールされたアクションを実行。
- AddToLoadBalancer :インスタンスをロードバランサーに追加。
再開させる場合は以下
aws autoscaling resume-processes --auto-scaling-group-name <AutoScalingGroupName>
Amazon Web Services実践入門 (WEB+DB PRESS plus)
- 作者: 舘岡守,今井智明,永淵恭子,間瀬哲也,三浦悟,柳瀬任章
- 出版社/メーカー: 技術評論社
- 発売日: 2015/11/10
- メディア: 単行本(ソフトカバー)
- この商品を含むブログを見る
Ubuntu14.04 でセキュリティアップデートを自動適用する
セキュリティアップデート 自動化
自分の開発マシンをセキュリティアップデートかけるように設定。 こちらを参考
自動化する方法
GNOME Update Manager
を使うunattended-upgrades
パッケージを使うcron
に script を設定しaptitude
を呼び出すcron-apt
を使う
環境的に 2-4 。せっかくなので2でやってみる。
設定手順
1. 状態の確認
$ sudo dpkg -l unattended-upgrades 要望=(U)不明/(I)インストール/(R)削除/(P)完全削除/(H)保持 | 状態=(N)無/(I)インストール済/(C)設定/(U)展開/(F)設定失敗/(H)半インストール/(W)トリガ待ち/(T)トリガ保留 |/ エラー?=(空欄)無/(R)要再インストール (状態,エラーの大文字=異常) ||/ 名前 バージョン アーキテクチャ 説明 +++-=========================================================================-=========================================-=========================================-======================================================================================================================================================= ii unattended-upgrades 0.82.1ubuntu2.3 all automatic installation of security upgrades
む。入っておられる。。
動いてるか確認する。
有効化されていれば設定ファイルが作成されてるのでファイルを確認。
~$ sudo ls -l /etc/apt/apt.conf.d/20auto-upgrades ls: /etc/apt/apt.conf.d/20auto-upgrades にアクセスできません: そのようなファイルやディレクトリはありません
ないので有効化する。
2. 有効化
$ sudo dpkg-reconfigure --priority=low unattended-upgrades # Yes を選択する Creating config file /etc/apt/apt.conf.d/20auto-upgrades with new version
3. 設定確認
~$ sudo ls -l /etc/apt/apt.conf.d/20auto-upgrades -rw-r--r-- 1 root root 80 12月 7 2013 /etc/apt/apt.conf.d/20auto-upgrades ~$ ~$ sudo cat /etc/apt/apt.conf.d/20auto-upgrades APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Unattended-Upgrade "1";
これでひとまず完了。毎日セキュリティアップデートを確認してあれば適用してくれる。
ログは /var/log/unattended-upgrades
に出力される
補足
/etc/apt/apt.conf.d/20auto-upgrades
の内容については /etc/cron.daily/apt
のヘッダーに記載がある。
APT::Periodic::Update-Package-Lists "N";
N日毎に自動でapt-get update
を実施。0の場合無効。APT::Periodic::Unattended-Upgrade "N";
N日毎に自動でunattended-upgrade
を実施。0の場合無効。
設定ファイルの定義としては 1日毎に リポジトリを最新化し、 unattended-upgrade
を実行しているということ。
unattended-upgrade
は/etc/apt/apt.conf.d/50unattended-upgrades
で設定されており、
デフォルトでは セキュリティ関連のアップデートのみ更新するように設定されている。他パッケージに関してはコメントアウト。
あとはメール通知も設定したいところ
Ubuntu Server 実践バイブル 現場で即運用に役立つサービス設定のノウハウ (アスキー書籍)
- 作者: 吉田史
- 出版社/メーカー: KADOKAWA / アスキー・メディアワークス
- 発売日: 2014/08/21
- メディア: Kindle版
- この商品を含むブログ (2件) を見る
Excel 2010 で矢印キーが効かなくなった
矢印キー効かない問題
Excel 操作していると矢印キーでセル移動できなくなった。
めっちゃスクロールする。
な… 何を言ってるのか わからねーと思うが
おれも何をされたのかわからなかった…
頭がどうにかなりそうだった…
Jean-Pierre Polnareff
原因
調べてみるとScrollLockが効いているらしい。
Excel 2010 の画面下、ステータスバー部分を確認する。
ScrollLock と表示されていれば有効化されている。
※ちなみにここでScrollLockの解除はできない。
オン/オフ選択できそうだがそれは表示するかしないか。
何だこのやろう。手こずらせやがって楽勝じゃねーかバカヤロー
…ThinkPad ちゃんに ScrollLock キーないよ!!
解決
スクリーンキーボードを利用します
- スタート => すべてのプログラム => アクセサリ => コンピューターの簡単操作 を選択
- スクリーン キーボード をクリック
- スクリーン キーボード が画面に表示されたら、[ScrLk] キーをクリックする。
※Windows8だと[slk]キー
治っタ━(゚∀゚)━!
プレゼンについて
プレゼンの目的とは
相手を動かすこと
プレゼンを決定づけるためには
どう伝えるかは重要ではない。
大事なのは 何を伝えるか 。
そして明確にメッセージ化すること。
このシステムの導入で確実に業務が改善する。導入すべきです。
これくらいの明確なメッセージが必要。
何を伝えたいか決めた上で、どう伝えるかを考える。
大事なことは大事にしていきたい。
g++ commnd not found で eventmachine のインストールに失敗
Ubuntu14.04 で Ruby2.2.0 を利用して bundle install 中にエラー。
g++ が見つからずに eventmachine のインストールに失敗しているみたい。
エラー内容
$ bundle install --path vendor/bundle … compiling rubymain.cpp make: g++: コマンドが見つかりませんでした make: *** [rubymain.o] エラー 127 make failed, exit code 2 Gem files will remain installed in /home/hoge/app/vendor/bundle/ruby/2.2.0/gems/eventmachine-1.0.4 for inspection. Results logged to /home/hoge/app/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/eventmachine-1.0.4/gem_make.out An error occurred while installing eventmachine (1.0.4), and Bundler cannot continue. Make sure that `gem install eventmachine -v '1.0.4'` succeeds before bundling.
対応
g++ を導入する。
gcc は入れたんだけど。パラパラいれるのがよくないのか。。。
build-essential のインストールでよいみたいなので導入。
sudo apt-get install build-essential
再実行
$ bundle install --path vendor/bundle … Installing eventmachine 1.0.4 …
成功したよ!