自動車保険をネットで契約してみる。
やはり安い。それに比較が簡単。
さて、まずは見積もるぞ。
ヘリコプター飛来
DTIサーバー構築29 「B・K・B?」
LAMPとは、Linux+Apache+MySQL+PHP(,Perl,Python)のこと。
まずはPHPをインストール。
$ sudo yum -y install php php-mysql php-mbstring
:
Installed:
php.x86_64 0:5.3.3-23.el6_4 php-mbstring.x86_64 0:5.3.3-23.el6_4
php-mysql.x86_64 0:5.3.3-23.el6_4
Dependency Installed:
php-cli.x86_64 0:5.3.3-23.el6_4 php-common.x86_64 0:5.3.3-23.el6_4
php-pdo.x86_64 0:5.3.3-23.el6_4
Complete!
$ sudo service httpd restart
httpd を停止中: [ OK ]
httpd を起動中: [ OK ]
次の1行のみのファイルを、/var/www/html/test.phpとしてファイル転送。
ブラウザで次のURLを開く。
http://yourdomain.com/test.php
なんだかんだ次のような表示がされればOK
![]() |
test.php |
ちょこっとPHPの設定を変更。
$ sudo vi /etc/php.ini
<?と?>タグでPHPが実行できるように。
#short_open_tag = Off
short_open_tag = On
#expose_php = On
expose_php = Off
default_charset = “UTF-8”
date.timezone = Asia/Tokyo
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.http_input = UTF-8
mbstring.http_output = pass
mbstring.encoding_translation = On
mbstring.detect_order = auto
mbstring.substitute_character = none;
$ sudo service httpd restart
httpd を停止中: [ OK ]
httpd を起動中: [ OK ]
DTIサーバー構築28 「みんな見て!」
メールサーバーの構築が大体出来たので、WEBサーバーの設定を行っていく。
といっても、SSLの設定は既にやったので、その他の基本的な部分。
Apacheのバージョンが1から2になったのは、もう何年も前。
昔はApache2と、2を強調しないといけなかったが、最近は、Apacheといえばバージョン2の事。
まずは、基本設定ファイルの編集。
$ sudo vi /etc/httpd/conf/httpd.conf
サーバーのOSを隠して、ソフト名だけを伝える。
#ServerTokens OS
ServerTokens Prod
接続状態の確認機能をON。
#KeepAlive Off
KeepAlive On
#ServerAdmin root@localhost
ServerAdmin webmaster@yourdomain.dom
サーバー名を変更。
ただし、VirtualHost機能を使うときは、コメントのままに。
ServerName yourdomain.com:80
フォルダのインデックス表示は、やめておく。
:
# Options Indexes FollowSymLinks
Options FollowSymlinks
:
ログのIPをDNSでホスト名に変換する。でも、処理が重いのでOffでいいかも。
#HostnameLookups Off
HostnameLookups On
NotFoundなどのページにサーバー名を入れないように。
#ServerSignature On
ServerSignature Off
アイコンフォルダもインデックス表示なしに。
# Options Indexes MultiViews FollowSymLinks
Options MultiViews FollowSymLinks
:
#LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
LanguagePriority ja en ca cs da de el eo es et fr he hr it ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
あと、余計な設定を読み込まないように改名。
$ sudo mv -i /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.org
とりあえず。
そろそろSource Treeを使ってみようか? 3
Mercurial(Gitも同じだろう)を使ってみて、
「なぜ、使うまでにこんなに時間がかかったのか?」
と感じた。
SVNとの大きな違いは、PUSH,PULLが有る事だと思うが、やはりそれが敷居を高くしていたのだろう。
だが、一旦その意味を理解した時点で、チーム作業に無くてはならない、もう戻れない機能だと感じた。
チーム内の履歴管理を勝手に変えられないあなたに朗報。
SVNとMercurialは、同時に同じフォルダで使用可能だ。
個人的にはMercurialで管理し、最終的にチームのレポジトリにはSVNでコミット。
なんて事が可能なのだ。
SVN止まりのあなた!
先延ばしにする?今から使いはじめる?
考えて答えを出そうよ。
「いつ使うの?」