AWS / PHP / Python ちょいメモ

amazon web service , PHP, Python を使ったときのメモ。日本語でググってもわからなかった事を中心に。

管理時に欲しくなる yum オプションをまとめておく

ついつい忘れてググッてしまう。

インストール済み

  • yum list installed : インストール済みパッケージを一覧表示

過去の履歴

  • yum history list all : 過去に実施した yum の履歴を一覧を全件表示
  • yum history info : 特定のTransaction IDの詳細表示
  • yum history list <パッケージ名> : 特定のパッケージ名の履歴
続きを読む

php シェルを使って簡単に検証

ちょっとしたコードの動作を確認したい場合に使えると思う。というか使った。

インタラクティブ Shell便利ー

$ man php
...
-a Run PHP interactively. This lets you enter snippets of PHP code that directly get executed. When readline sup-
port is enabled you can edit the lines and also have history support.

使い方の例

$ php -a
Interactive shell

php > print("Hello World");
Hello World
php > print(phpversion());
5.5.21
php > $imagickVersion = phpversion('imagick');
php > print($imagickVersion) ;
3.4.3RC1
php > exit
$

続きを読む