nz install memo

# yum
yum install gcc
yum install gcc-c++
yum install make
yum install ncurses-devel
yum install readline-devel
yum install zlib-devel

# MySQL
tar xvfz mysql-5.0.92.tar.gz
cd mysql-5.0.92
./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=utf8 --with-extra-charsets=all --with-berkeley-db --with-innodb --without-readline
make
make install
cd /usr/local/mysql/share/mysql
cp my-huge.cnf /etc/my.cnf

vi /etc/my.cnf
# vi /etc/my.cnf
# log-bin=mysql-bin <- バイナリログを取らなくてよいのでコメントアウト
[mysqld]
default-character-set=utf8 #文字コードの指定
skip-character-set-client-handshake #自動変換をさせない

cd /usr/local/mysql/
./bin/mysql_install_db
chown -R mysql:mysql var
bin/mysqld_safe &
2) test
bin/mysql -uroot
show databases;
show variables like "char%";

# Apache
tar xvfz httpd-2.2.17.tar.gz
cd httpd-2.2.17/
./configure --enable-rewrite --enable-so
make
su
make install

vi /usr/local/apache2/conf/httpd.conf
User apache
Group apache
ServerName 172.16.1.231:80

/usr/local/apache2/bin/apachectl start

# Python
tar xvfz Python-2.7.1.tgz
cd Python-2.7.1
./configure CFLAGS=-fPIC --prefix=/usr/local

vi Modules/Setup
zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz

make
make install

# setuptools ( Python )
tar xvfz setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py install

# MySQL-python
tar xvfz MySQL-python-1.2.3.tar.gz
cd MySQL-python-1.2.3/

vi site.cfg
threadsafe = False
mysql_config = /usr/local/mysql/bin/mysql_config
python setup.py install

# mod_python
tar xvfz mod_python-3.3.1.tgz
cd mod_python-3.3.1
./configure CFLAGS="-O3 -m64 -fPIC" CXXFLAGS="-O3 -m64" --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/local/bin/python
vi src/connobject.c
L.142 の「APR_BRIGADE_SENTINEL(b)」を「APR_BRIGADE_SENTINEL(bb)」に変更
make
make install

# django
tar xvfz Django-1.2.5.tar.gz
cd Django-1.2.5/
python setup.py install

# Juman
tar xvfz juman-6.0.tar.gz
cd juman-6.0
CFLAGS=-fPIC ./configure
make
make install
juman -S

# nkf
tar xvfz nkf207_with_NkfPython.tgz

ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
ln -s /usr/local/lib/python2.7/site-packages/django/contrib/admin/media media