Installing VHCS on CentOS 4.4
I found an installation guide of VHCS on CentOS 4.x in its wiki. It looks a bit complicate but not too bad for me. So I suggested my friend to give it a try. He installed CentOS 4.4 as usual and then I have to install further packages to meet the requirements of VHCS. This is a long, long story. In fact, VHCS doesn't support CentOS exactly. The only distributions supported by VHCS are just Debian-based and SUSE. That's why I have to make it work myself.
In order to install VHCS on CentOS 4.4, you have to follow above document until you have all requirements installed but VHCS itself and then follow below procedures.
-
Edit
Makefileby changingHOST_OStocentosHOST_OS=centos -
Edit
configs/Makefileto know aboutcentosdiff -ruN vhcs2-2.4.7.1.orig/configs/Makefile vhcs2-2.4.7.1/configs/Makefile --- vhcs2-2.4.7.1.orig/configs/Makefile 2005-12-31 18:13:02.000000000 +0700 +++ vhcs2-2.4.7.1/configs/Makefile 2006-09-26 21:40:21.000000000 +0700 @@ -16,6 +16,8 @@ cd ./logrotate && $(MAKE) install ; cd .. ; \ elif $(HOST_OS) == suse ; then \ cd ./dists/suse && $(MAKE) install ; \ + elif $(HOST_OS) == centos ; then \ + cd ./dists/centos && $(MAKE) install ; \ fi # elif $(HOST_OS) == redhat ; then \ @@ -37,6 +39,8 @@ cd ./logrotate && $(MAKE) uninstall ; cd .. ; \ elif $(HOST_OS) == suse ; then \ cd ./dists/suse && $(MAKE) uninstall ; \ + elif $(HOST_OS) == centos ; then \ + cd ./dists/centos && $(MAKE) uninstall ; \ fi # elif $(HOST_OS) == redhat ; then \ -
Then copy file from
susetocentosas a template.cd configs/dists cp -Rp suse centos -
Edit
Makefileandvhcs2.confinconfigs/dists/centos -
Edit
Makefile,httpd.conf,parts/vhcs2_base.tplandworking/vhcs2.confinconfigs/dists/centos/apache -
Edit
main.cfinconfigs/dists/centos/postfix/main.cfto make suresetgid_groupispostdropsetgid_group = postdrop -
Make sure that all paths in
configsare correctly set -
Edit
vhcs2_daemoninconfigs/dists/centos/init.das follow.#! /bin/sh # # skeleton example file to build /etc/init.d/ scripts. # This file should be used to construct scripts for /etc/init.d. # # Written by Miquel van Smoorenburg <>. # Modified for Debian GNU/Linux # by Ian Murdock <>. # Modified for SuSE # by Carsten Schoene <> # # Version: @(#)skeleton 1.8 03-Mar-1998 # # This file was automatically customized by dh-make on Mon, 22 Apr 2002 16:15:28 +0300 ### BEGIN INIT INFO # Provides: vhcs2_daemon # Required-Start: $network $remote_fs # Required-Stop: $network $remote_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Description: Start the vhcs2_daemon ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/var/www/vhcs2/daemon/vhcs2_daemon PID=/var/run/vhcs2-daemon.pid NAME=vhcs2_daemon DESC=vhcs2_daemon test -x $DAEMON || exit 5 #. /etc/rc.status . /etc/rc.d/init.d/functions # Shell functions sourced from /etc/rc.status: # rc_check check and set local and overall rc status # rc_status check and set local and overall rc status # rc_status -v ditto but be verbose in local rc status # rc_status -v -r ditto and clear the local rc status # rc_failed set local and overall rc status to failed # rc_reset clear local rc status (overall remains) # rc_exit exit appropriate to overall rc status # First reset status of this service #rc_reset case "$1" in start) echo -n "Starting $DESC: " daemon --check $NAME $DAEMON RETVAL=$? if [ $RETVAL -eq 0 ]; then success else failure fi; echo /etc/init.d/vhcs2_network ;; stop) echo -n "Stopping $DESC: " killproc $NAME RETVAL=$? if [ $RETVAL -eq 0 ]; then success else failure fi; echo ;; restart|force-reload) echo "Restarting $DESC: " $0 stop $0 start ;; status) echo "Checking for service $DESC: " status $DAEMON echo ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status}" exit 1 ;; esac #rc_exit -
Then run
make installandvhcs2-setupas usual
Then you have to restart all services again.
for i in httpd named courier postfix proftpd vhcs2_daemon; do \
chkconfig $i on; \
service $i restart; \
done
All done.
- sugree's blog
- 13302 reads


Did you forget to place a
that's all
hrm... No no extra
lol... after copying what i
fixed it.. eroneous
Post new comment