2010年3月8日月曜日

yumを可能に
# vi /etc/yum.conf
+ proxy=http://172.24.216.1:8080
# yum remove httpd
# yum update

httpdをアンインストール
# rpm -qa | grep httpd
# yum remove httpd-2.2.3-31.el5.centos

ruby インストール
# tar xfvz ruby-1.8.7-p249.tar.gz
# cd ruby-1.8.7-p249
# ./configure --prefix /usr/local/app/ruby-1.8.7
# make
# make install
# cd /usr/local/
# ln -s /usr/local/app/ruby-1.8.7 ruby1.8

java インストール
# cd /usr/local/app
# /usr/local/src/jdk-6u18-linux-i586.bin
# cd /usr/local/
# ln -s /usr/local/app/jdk1.6.0_18 jdk1.6

python インストール
# cd /usr/local/src
# tar xfvz Python-2.5.5.tgz
# cd Python-2.5.5
# ./configure --prefix=/usr/local/app/Python2.5.5
# make
# make install
# cd /usr/local
# ln -s /usr/local/app/Python2.5.5 Python2.5.5


apche2
# ./configure \
--prefix=/usr/local/app/httpd-2.2.14 \
--enable-mods-shared=most \
--enable-dav \
--enable-dav-fs \
--enable-dav-lock \
--enable-cgi \
--enable-cgid \
--enable-cache \
--enable-mem-cache \
--enable-proxy \
--enable-proxy-blancer \
--enable-rewrite \
--enable-so \
--with-included-apr
# make
# make install
# cd /usr/local
# ln -s /usr/local/app/httpd-2.2.14 apache2
# cd /usr/local/bin
# lin -s /usr/local/apache2/bin/apachectl

postgresインストール
# cd /usr/local/src
# tar xfvz postgresql-8.4.2.tar.gz
# cd postgresql-8.4.2
# ./configure --prefix=/usr/local/app/postgresql-8.4.2 \
--with-perl \
--with-python \
--with-openssl
# make
# make install
# groupadd postgres
# useradd postgres -g {postgresのID}
# passwd postgres
# chown -R postgres:postgres /usr/local/app/postgresql-8.4.2
# cd /usr/local
# ln -s /usr/local/app/postgresql-8.4.2 pgsql
# chown postgres:postgres /usr/local/pgsql

phpインストール
# tar xfvz php-5.3.1.tar.gz
# cd php-5.3.1
# yum install libjpeg-devel
# yum install libpng-devel
# yum install freetype-devel
# ./configure --prefix=/usr/local/app/php-5.3.1 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-mbstring \
--enable-mbregex \
--enable-pdo \
--with-pgsql=/usr/local/pgsql \
--with-zlib-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/lib \
--with-gd \
--enable-gd-native-ttf \
--with-pdo-pgsql=/usr/local/pgsql \
--with-pear
# make
# make install
# cd /usr/local/
# ln -s /usr/local/app/php-5.3.1 php
# cp /usr/local/src/php-5.3.1/php.ini-development /usr/local/php/lib/php.ini
# chcon -c -v -u system_u -r object_r -t textrel_shlib_t /usr/local/apache2/modules/libphp5.so
# vi /usr/local/apache2/conf/httpd.conf
AddType application/x-httpd-php .php
を最下行に追加。

環境変数追加
# vi ~/.bash_profile
====================================================================
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
PYTHON_HOME=/usr/local/python2.5
JAVA_HOME=/usr/local/jdk1.6
RUBY_HOME=/usr/local/ruby1.8
PHP_HOME=/usr/local/php
PATH=$PYTHON_HOME/bin:$JAVA_HOME/bin:$RUBY_HOME/bin:$PHP_HOME/bin:$PATH
export PYTHON_HOME JAVA_HOME RUBY_HOME PHP_HOME PATH
export PATH
unset USERNAME
====================================================================

mod_jkインストール
# tar xfvz tomcat-connectors-1.2.30-src.tar.gz
# cd tomcat-connectors-1.2.30-src/native
# ./configure --with-apxs=/usr/local/apache2/bin/apxs
# make
# ls -l apache-2.0/mod_jk.so
存在していることを確認
# ls -l /usr/local/apache2/modules/mod_jk.so
存在していないことを確認
# cd apache-2.0/
# /usr/local/apache2/bin/apxs -n jk -i mod_jk.so
# ls -l /usr/local/apache2/modules/mod_jk.so
存在していることを確認
# vi /usr/local/apache2/conf/workers.properties
  ====================================================================
  workers.tomcat_home=/home/quick/tomcat
  workers.java_home=/usr/local/jdk1.6
  ps=/
  worker.list=ajp13
  worker.ajp13.port=8009
  worker.ajp13.host=localhost
  worker.ajp13.type=ajp13
  ====================================================================

# vi /usr/local/apache2/conf/http.conf
  ====================================================================
JkWorkersFile /usr/local/apache2/conf/workers.properties
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkMount /* ajp13
JkUnMount /html/* ajp1
JkUnMount /images/* ajp13
====================================================================

ruby gems インストール
# tar xfvz rubygems-1.3.6.tgz
# cd rubygems-1.3.6
# ruby setup.rb config
# ruby setup.rb setup
# ruby setup.rb install