10月 012010
 

やっつけだけど。
カタチにはなったので作業記録を備忘る。
晒すのもありかなと :oops:

とりあえず インストール編?

[用意するソースコード]
-5.1.50
-0.8.51
-5.3.3
-1.3.0

[yum]

yum -y install yum-priorities

vi /etc/yum/pluginconf.d/priorities.conf
[main]
enabled=1

vi /etc/yum.repos.d/CentOS-Base.repo
[base], [addons], [updates], [extras]
priority=1
[contrib], [centosplus]
priority=2

vi /etc/yum.repos.d/vz.repo
[vz-base]
name=OpenVZ Base
priority=6
[vz-updates]
name=OpenVZ Updates
priority=6

rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
wget 'http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm'
rpm -K rpmforge-release-0.5.1-1.el5.rf.i386.rpm
rpm -i rpmforge-release-0.5.1-1.el5.rf.i386.rpm
vi /etc/yum.repos.d/rpmforge.repo
priority=11
vi /etc/yum.repos.d/rpmforge-testing.repo
priority=12

yum check-update
yum update

yum install \
pkgconfig \
ncurses-devel \
libtool-ltdl-devel \
libtool-ltdl \
libxml2-devel \
zlib-devel \
openssl-devel \
e2fsprogs-devel \
keyutils-libs-devel \
krb5-devel \
libselinux-devel \
libsepol-devel \
curl curl-devel \
libcurl-devel \
libjpeg-devel \
libpng-devel \
libmcrypt \
libmcrypt-devel \
libevent-devel \
libevent \
pcre-devel \
autoconf \
imake \

[mariadb]

./ \
'--with-charset=utf8' \
'--with-extra-charsets=complex' \
'--with-mysqld-user=mysqld' \
'--prefix=/usr/local/mysqld' \
'--with-unix-socket-path=/var/run/mysqld/mysqld.sock' \
'--localstatedir=/home/mysqld/data' \
'--libexecdir=/usr/local/mysqld/bin' \
'--with-comment=(MariaDB - http://askmonty.org/)' \
'--enable-thread-safe-client' \
'--enable-local-infile' \
'--enable-assembler' \
'--enable-shared' \
'--with-debug' \
'--with-pic' \
'--with-fast-mutexes' \
'--with-client-ldflags=-static' \
'--with-mysqld-ldflags=-static' \
'--with-zlib-dir=bundled' \
'--with-big-tables' \
'--with-readline' \
'--with-libevent' \
'--with-embedded-server' \
'--with-plugins=' \
'--without-plugin-maria' \
'--without-plugin-archive' \
'--without-plugin-blackhole' \
'--without-plugin-daemon_example' \
'--without-plugin-example' \
'--without-plugin-federated' \
'--without-plugin-federatedx' \
'--without-plugin-ibmdb2i' \
'--without-plugin-_plugin' \
'--without-plugin-ndbcluster' \
'--without-plugin-' \


cp mariadb-5.1.50/support-files/mysql.server /etc/init.d/mysqld



./configure \
'--prefix=/usr/local/php5' \
'--with-config-file-scan-dir=/usr/local/php5/etc/php.d' \
'--without-sqlite' \
'--with-fpm-user=httpd' \
'--with-fpm-group=httpd' \
'--with-curl' \
'--with-openssl-dir' \
'--with-gd' \
'--with-jpeg-dir' \
'--with-png-dir' \
'--with-zlib-dir' \
'--with-gettext' \
'--with-mhash' \
'--with-libmbfl' \
'--with-onig' \
'--with-mcrypt' \
'--with-mysql=/usr/local/mysqld' \
'--with-mysql-sock=/var/run/mysqld/mysqld.sock' \
'--with-iconv-dir' \
'--disable-pdo' \
'--enable-fpm' \
'--enable-debug' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-gd-native-ttf' \
'--enable-gd-jis-conv' \
'--enable-mbstring' \
'--enable-embedded-mysqli' \
'--enable-soap' \
'--enable-sockets' \
'--enable-zip' \
'--enable-zend-multibyte' \


cp /usr/local/php5/etc/php-fpm.conf.default /usr/local/php5/etc/php-fpm.conf

/etc/init.d/php-fpm

#!/bin/sh
#
# Startup script for the PHP FPM server.
#
# chkconfig: 3 85 15
# description: PHP is an HTML-embedded scripting language
# processname: php-fpm
# Source function library.
. /etc/rc.d/init.d/functions

PHPFPM_BIN=/usr/local/php5/sbin/php-fpm
PHPFPM_CONF=/usr/local/php5/etc/php-fpm.conf
PHPINI=/usr/local/php5/etc/php.ini
PHPFPM_PID=/home/httpd/php/run/php-fpm.pid

opts="-c $PHPINI --fpm-config $PHPFPM_CONF"
prog=$(basename $PHPFPM_BIN)

lockfile=/var/lock/subsys/php-fpm

start() {
[ -x $PHPFPM_BIN ] || exit 5
[ -f $PHPFPM_CONF ] || exit 6
echo -n $"Starting $prog: "
daemon $PHPFPM_BIN $opts
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}

stop() {
echo -n $"Stopping $prog: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}

restart() {
stop
start
}

reload() {
echo -n $"Reloading $prog: "
killproc $PHPFPM_BIN -HUP
RETVAL=$?
echo
}

force_reload() {
restart
}

rh_status() {
status $prog
}

rh_status_q() {
rh_status >/dev/null 2>&1
}

case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
exit 2
esac

[nginx]

./configure \
'--prefix=/usr/local/nginx' \
'--error-log-path=/home/httpd/logs/error_log' \
'--pid-path=/var/run/nginx.pid' \
'--user=httpd' \
'--group=httpd' \
'--with-poll_module' \
'--with-ipv6' \
'--without-http_ssi_module' \
'--without-http_userid_module' \
'--without-http_auth_basic_module' \
'--without-http_autoindex_module' \
'--without-http_geo_module' \
'--without-http_limit_zone_module' \
'--without-mail_pop3_module' \
'--without-mail_imap_module' \
'--without-mail_smtp_module' \
'--with-http_ssl_module' \
'--with-http_addition_module' \
'--with-http_gzip_static_module' \
'--with-http_stub_status_module' \
'--with-sha1-asm' \
'--with-sha1=/usr' \
'--http-log-path=/home/httpd/logs/access_log' \
'--http-client-body-temp-path=/home/httpd/nginx/client_body' \
'--http-proxy-temp-path=/home/httpd/nginx/proxy' \
'--http--temp-path=/home/httpd/nginx/' \
'--http-uwsgi-temp-path=/home/httpd/nginx/uwsgi' \
'--http-scgi-temp-path=/home/httpd/nginx/scgi' \

/etc/init.d/nginx

#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: 3 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0

NGINX_BIN="/usr/local/nginx/sbin/nginx"
NGINX_CONF="/usr/local/nginx/conf/nginx.conf"

prog=$(basename $NGINX_BIN)

lockfile=/var/lock/subsys/nginx

start() {
[ -x $NGINX_BIN ] || exit 5
[ -f $NGINX_CONF ] || exit 6
echo -n $"Starting $prog: "
daemon $NGINX_BIN -c $NGINX_CONF
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}

stop() {
echo -n $"Stopping $prog: "
killproc $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}

restart() {
configtest || return $?
stop
start
}

reload() {
configtest || return $?
echo -n $"Reloading $prog: "
killproc $NGINX_BIN -HUP
RETVAL=$?
echo
}

force_reload() {
restart
}

configtest() {
$NGINX_BIN -t -c $NGINX_CONF
}

rh_status() {
status $prog
}

rh_status_q() {
rh_status >/dev/null 2>&1
}

case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart|configtest)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
exit 2
esac

[xcache]

/usr/local/php5/bin/phpize
 
./configure \
'--enable-xcache' \
'--enable-xcache-assembler' \
'--enable-xcache-optimizer' \
'--enable-xcache-coverager' \
'--enable-xcache-encoder' \
'--enable-xcache-decoder' \
'--with-php-config=/usr/local/php5/bin/php-config' \


cp xcache-1.3.0/xcache.ini /usr/local/php5/etc/php.d/xcache.ini

これでインストール は おわり。
設定編につづく?

現在コメント投稿は停止しております。