2009/06/17 (Wed)

写真の明るさについて

嫁が暗い写真を連発しているので、僕が知っているだけの情報を伝えたいと思う。 間違ってたらごめんなさい。

撮影モードについて

カメラには、幾つかのモードがあるけれど、その中で以下の二つを取り上げる。

  • Sモード(シャッタースピード優先AE)

    ジョグで変えられるのは シャッタースピード

  • Aモード(絞り優先AE)

    ジョグで変えられるのは 絞り値(F値)

明るさについて

明るさは、基本的にレンズに入る光の量で決まる。ISO感度を上げるというのもあるが、それに関してはまた今度とする。

要素

レンズに入る光の量を決定する要素は、光が入る時間もしくは光を受け止める広さの2つになる。

  • シャッタースピード

    光の入る時間を調整する。 シャッターを切る長さが長ければ長いほど光を集められる。

    シャッタースピードの上げ方

    1. Sモードでジョグを操作する。

      例) 1/30 → 1/125

  • 絞り

    レンズを通す光の量を調節する。 絞りを開放(光の通る穴を開く)すればするほど明るくなる

    絞りの開き方

    1. Aモードでジョグを操作する。

      例) F5.6 → F1.4

手ブレ

  • シャッターを切る間にカメラが動くもしくは被写体が動くと発生。

    シャッターを切る時間が短ければブレにくい。

    つまりシャッタースピードが速ければブレにくい

  • シャッタースピードが遅くてもブレたくない。

    三脚を使用したりしてカメラを固定する。

被写体がうごく!

シャッタースピードを早くしないといけない

→暗くなりやすい

→光をもっと確保する

  • フラッシュ
  • 絞りを開放する
  • カメラは固定する
Posted at 21:04 in camera | WriteBacks (2961) | Edit

RedMine環境の構築

Ruby のインストール

# yum install ruby-devel ruby-rdoc ruby-irb
# yum install rubygems

# gem update --system
# gem install rubygems-update
# update_rubygems
# gem install rake

ImageMagick のインストール

新しいのが必要なので、yumだと古かった。

$ tar xzvf ImageMagick.tar.gz 
$ cd ImageMagick-6.4.2
$ ./configure
$ make 
# make install

# gem install rmagick

MySQLのインストール

# yum install mysql-server

Rails のインストール

# gem install -v=2.2.2 rails
# gem install mysql -- --with-mysql-dir=/usr/lib/mysql --with-mysql-config

RedMineのインストール

$ svn co http://redmine.rubyforge.org/svn/trunk redmine

設定のファイルを修正

config/database.yml

production:
  adapter: mysql
  database: redmine
  host: localhost
  username: redmine
  password: 
  encoding: utf8
  socket: /var/lib/mysql/mysql.sock

MySQLにRedMineアカウントを追加

mysql> GRANT ALL PRIVILEGES ON *.* TO 'redmine'@'%';
    -> IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'redmine'@'localhost';
    -> IDENTIFIED BY 'password' WITH GRANT OPTION;

DBの移行

$ mysqladmin create --default-character-set=utf8 redmine
$ mysql -u redmine -p redmine < redmine.dump.sql

DBのmigrate

$ rake db:migrate RAILS_NEW="production"

fileの移行

$ scp from.localnet:~redmine/redmine/files/* ./files/

起動テスト

$ ruby script/server -e production

w3m http://localhost:3000/

Internal Server Error とか出たら、log/production.log を確認
config.action_controller.session = { :session_key => "_myapp_session", :secret => "some secret phrase of at least 30 characters" }
を config/environment.rb に設定しろとか書いてあったりする。

Passenger のインストール

$ gem install passenger
 2. fastthread 1.0.1 (ruby)

$ export PATH=$PATH:/usr/local/apache2/bin
$ export APXS2=/usr/local/apache2/bin/apxs
$ export APR_CONFIG=/usr/local/apache2/bin/apr-1-config
$ passenger-install-apache2-module
  1. The Apache 2 module will be installed for you. 足りないものを入れる。gppとか

Apache の設定

  LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2
   PassengerRuby /usr/bin/ruby
   <VirtualHost *:80>
      ServerName redmine.xxxxxxxx.jp
      DocumentRoot /opt/redmine/redmine/public
   </VirtualHost>

Apache2 の 403とかだと Deny from allをチェック

2009/03/31 (Tue)

SELinuxの無効化

SELinuxの状態確認

# getenforce
Enforcing

SELinux無効化

# setenforce 0

# getenforce
Permissive

SELinux設定ファイル編集

# vi /etc/sysconfig/selinux
SELINUX=enforcing
↓
SELINUX=disabled

iptables の停止

# /etc/init.d/iptables stop

iptables を停止せず、httpを通す設定を追加する場合。 /etc/sysconfig/iptables を編集

-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT 
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT 
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

真ん中の行を追加する。

Apacheの起動スクリプト

#!/bin/sh
# chkconfig: 345 98 20
# description: This shell script tabke care of starting and stopping httpd.
# processname: httpd
#
# httpd         This shell script takes care of starting and stopping
#               httpd.
#
# 

RETVAL=0
prog="/usr/local/apache2/bin/apachectl"

# See how we were called.
case "$1" in
  start)
        $prog startssl
        RETVAL=$?
        ;;
  stop)
        $prog stop
        RETVAL=$?
        ;;
  status)
        $prog status
        RETVAL=$?
        ;;
  restart|reload)
        $prog restart
        RETVAL=$?
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|status}"
        exit 1
esac

exit $RETVAL

chkconfigで自作の起動スクリプトを登録

# chkconfig: 345 98 20
# description: This shell script tabke care of starting and stopping httpd.
# processname: httpd

起動スクリプトのヘッダにchkconfig用の記述をする。 上から、ランレベル、起動優先順位、停止優先順位

/sbin/chkconfig --add httpd
/sbin/chkconfig --level 345 httpd on
/sbin/chkconfig --list