新しいブログに移動しました。
9ensanのLifeHack
こちらの記事も必要に応じて新しいブログに移動させる予定です。
今後ともよろしくお願い致します。

HOME > 

サーバー

httpd.confのOptionsの備忘録

  • 2011.01.07 (金) 14:35
  • 設定

 httpd.confのOptionsの内容をいつも忘れるので備忘録

 

機能 内容
ExecCGI CGIの実行を許可する
FollowSymLinks 設定しているディレクトリ以下にあるファイルやディレクトリへのリンクを有効にする
Includes SSIの実行を許可する
IncludesNOEXEC SSIを有効にするが、EXEC命令(CGIプログラムを実行する命令)は無効にする
Indexes 指定されたファイルが存在しない場合にファイル一覧を表示する
MultiViews コンテンツ・ネゴシエーションで適切な言語のHTMLや画像が選択されるようにする
SymLinksIfOwnerMatch リンク先の所有者がディレクトリの所有者と同一の場合にリンクを有効にする
All MultiViews以外を有効にする
None 全て無効にする

 

Macでの開発環境の設定 〜 PHPの設定 〜

  • 2010.09.18 (土) 23:02
  • Mac,設定

 MacへのPHPの設定です。

とりあえずconfigureの内容

 

1
./configure --prefix=/Users/hashizume/apps/app/php/5.2 --with-apxs2=/Users/hashizume/apps/app/httpd/bin/apxs --with-config-file-path=/Users/hashizume/apps/var/php/conf/5.2 --with-config-file-scan-dir=/Users/hashizume/apps/var/php/conf.d/5.2 --with-libxml-dir --with-openssl --with-openssl-dir --with-zlib --with-zlib-dir --with-bz2 --enable-calendar --with-curl --enable-exif --enable-ftp --with-gd --with-jpeg-dir=/Users/hashizume/apps/app/jpeg --with-png-dir=/Users/hashizume/apps/app/png --with-xpm-dir --with-ttf --with-freetype-dir=/Users/hashizume/apps/app/freetype --with-t1lib=/Users/hashizume/apps/app/t1lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext=/Users/hashizume/apps/app/gettext --enable-mbstring --with-mcrypt=/Users/hashizume/apps/app/mcrypt --with-mysql=/Users/hashizume/apps/app/mysql --with-mysqli=/Users/hashizume/apps/app/mysql/bin/mysql_config --enable-pcntl --enable-pdo --with-pdo-mysql=/Users/hashizume/apps/app/mysql --enable-zip --with-xsl

これで、make、make installで完了!!

Macでの開発環境の設定 〜 apacheの設定 〜

  • 2010.09.18 (土) 22:17
  • Mac,設定

 Macにapacheをインストールした時の設定です。

ソースからコンパイルした時のconfigureは以下になります。

 

1
./configure --prefix=/Users/hashizume/apps/app/httpd/

 

Macでの開発環境の設定 〜 MySQLの設定 〜

  • 2010.09.18 (土) 22:13
  • Mac,設定

 Macに開発環境Apache、PHP、MySQLを構築するのにまずは

MySQLから、インストールしてみました。

で、Macの環境が汚れるのがいやなのでなるべく汚さないように考えて

  1. ソースファイルからのコンパイル
  2. prefixを設定して特定のフォルダにインストールする

という決まりでインストールするようにしました。

MySQLをインストールしたときのconfigureの内容です。

 

1
./configure --prefix=/Users/hashizume/apps/app/mysql/ --with-plugins=partition,innobase,innodb_plugin,myisam --with-fast-mutexes

 

後は、make、make installでインストールできるのですが

開発環境でも、念のためにmaster、slave環境にしたかったので

mysql_install_dbのコマンドの2つのフォルダに対して実行しました。

1
2
./mysql_install_db --user=mysql --datadir=/Users/hashizume/apps/var/mysql/master
./mysql_install_db --user=mysql --datadir=/Users/hashizume/apps/var/mysql/slave

 こんな風に

で、mysqld_multiを使って2つのmysqldサービスを管理しようしたのですが、

mysql-5.1.50をインストールして使ってみたのですがどうもうまくいかない・・・

理由がわからん

ということで、mysqld_safeを使って別ポートでの起動をかければ同じことなのでいいやということで簡単にmysqld_safeを使って別ポートで起動するためのcnfファイルを2つ作成

それがこれ

 

1
2
3
4
5
6
7
8
9
10
[mysqld]
server-id = 1
log-bin
 
[mysqld_safe]
socket     = /tmp/mysql_master.sock
port       = 3307
pid-file   = /Users/hashizume/apps/var/mysql/master/mysql.pid
datadir    = /Users/hashizume/apps/var/mysql/master
language   = /Users/hashizume/apps/app/mysql/share/mysql/japanese

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[mysqld]
server-id  = 2
read_only
master-host=127.0.0.1
master-port=3307
master-user=repl
master-password=slavepass
report-host=slave
 
[mysqld_safe]
socket     = /tmp/mysql_slave.sock
port       = 3308
pid-file   = /Users/hashizume/apps/var/mysql/slave/mysql.pid
datadir    = /Users/hashizume/apps/var/mysql/slave
language   = /Users/hashizume/apps/app/mysql/share/mysql/japanese

 それぞれのcnfファイルを使って起動するためのコマンドがこちら

 

1
2
mysqld_safe --defaults-extra-file=/Users/hashizume/apps/var/mysql/etc/my_master.cnf &
mysqld_safe --defaults-extra-file=/Users/hashizume/apps/var/mysql/etc/my_slave.cnf &

あとは、レプリケーションの設定をすれば終了!!

Macでの開発環境の設定 〜 screen 〜

  • 2010.09.18 (土) 21:53
  • Mac,設定

 Macで開発するのにもう1つ必須なものですが、screenです。

使いこなせてないですが・・・

 

自分が使っている.screenrcをさらします。

これは、どこからとってきたのか全く覚えてないです

以下が、使っている.screenrcです

続きを見る…

お薦めのレンタルサーバー
広告
お薦めの書籍
HOME > 

サーバー