# VHCS2 on Gentoo HowTo

## taskara

Update Nov 2005:

Try this newer howto. The one below is too old.

-c

Note

Gentoo has made Courier-imap version 4 stable, and has moved authentication back to /etc/courier. This is just after I've gone through and hacked all the Make and config files in the vhcs source to point to /etc/courier-imap so as to create the gentoo vhcs tarball. So if you want to try this, please follow the source part of this howto and skip my tarball atm - else you won't have any authentication working and all hell will break loose! Alternatively you could use my tarball and tell portage you want to use Courier-imap v 3.

This is a work in progress - I was trying to get it working on my system and thought I'd document it as I went in case I got it working  :Wink:  So please feel free to try it out and let me know what you find.. I'll be updating this as I learn more about it. Having said that, please give it a go!

Init script for Gentoo

I created a little init.d script, which you can use. Please see this thread here.

64bit daemon fix

If you are using 64bit like me (Opteron) the vhcs2_daemon will segfault. You need to re-compile it 64bit, see my howto here.

Guide

This guide is derived from Petzch's work in the VHCS Forums. Thank you!

If you see anything in square brackets through out this guide (ie [ipaddress]), then it is something you should be modifying for your network.

This guide assumes you extract the tarball to /root. If you have extracted it elsewhere, just replace /root/vhcs-2.4 with your location

This guide should give you the follow setup:

Apache2 for web

Postfix for MTA

Courier IMAP / POP3

MySQL for database

Bind for DNS

ProFTPd for FTP server

Sync your portage tree

First you may like to get a copy of the latest portage tree. If so, then

```
emerge --sync
```

USE flags

Now we need to ensure we have the correct USE flags. These are related to VHCS2 and based on my dual Opteron server, but feel free to change them based on your profile and other requirements.

```
USE="-* -X adns apache2 authdaemond berkdb bzlib crypt curl gd imap innodb maildir -mbox memlimit mime mmx mmx2 mysql php python sasl session sockets softquota sse sse2 ssl threads vhosts xml xml2 zlib"
```

NB: Please modify the CPU instruction sets above to reflect your system. ie, you may want to take out SSE2 unless you have an >= AMD64 / Opteron or Prescott P4 / PM (Centrino) / Xeon. Check output of cat /proc/cpuinfo

I also have the following custom USE flags under /etc/portage/package.use

```
dev-libs/cyrus-sasl pam

sys-devel/libperl ithreads

dev-lang/perl ithreads

dev-php/php jpeg png tiff truetype

dev-php/mod_php jpeg png tiff truetype

net-dns/bind bind-mysql

net-firewall/iptables extensions

mail-mta/postfix -postgres ssl sasl

media-libs/gd jpeg png truetype

net-ftp/proftpd shaper
```

Note: it appears that courier-imap does not like ldflags built into GCC

```
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../../i686-pc-linux-gnu/bin/ld: unrecognized option '-Wl'

!!! ERROR: net-libs/courier-authlib-0.55.20050320 failed.
```

I suggest at this stage that you do not build your system with LDFLAGS set in your make.conf.

Packages

Now let's get started with the packages.

Remove SSMTP (unless you have mailwrapper and need it)

```
emerge -C ssmtp
```

Install the required apps

```
emerge -av postfix apache Authen-DigestMD5 BerkeleyDB bind Class-DBI-mysql expect courier-imap Crypt-Blowfish crypt-cbc cyrus-sasl Date-Calc DateManip DBD-mysql dev-perl/libnet gawk gzip IO-stringy iptables libmcrypt libperl MailTools MD5 MIME-Base64 MIME-tools mod_php mysql Net-DNS Net-Netmask perl php procmail proftpd SNMP_Session tar TermReadKey TimeDate fcron
```

Add them to the default runlevel

```
for x in apache2 courier-imapd courier-pop3d courier-authlib mysql named postfix proftpd saslauthd fcron ; do rc-update add $x default ; done
```

Courier-IMAP V4 is now stable in portage, so it is used as the default in this howto. As of version 4, authentication is now handled by courier-authlib not authdaemond. If you have courier-imap <= version 3 then replace courier-authlib with authdaemond, else follow the howto.

Carefully check and update config files

```
etc-update
```

Configure services

Install MySQL database

```
/usr/bin/mysql_install_db ; /etc/init.d/mysql start
```

Now, set root's mysql password

```
mysqladmin password [password]
```

Copy proftp config file

```
cp /etc/proftpd/proftpd.conf.distrib /etc/proftpd/proftpd.conf
```

Add PHP and SSL support to Apache

```
nano -w /etc/conf.d/apache2
```

replace line with

```
APACHE2_OPTS="-D SSL -D PHP4"
```

Open apache2 config

```
nano -w /etc/apache2/conf/apache2.conf
```

set your fqdn in apache2.conf

```
ServerName [set your fqdn]
```

exit and save.

Configure VHCS

Now we need to start configuring VHCS2.

The configuration files that come with the tarball need to be changed to reflect our Gentoo base.

So I have already changed them all for you, and re-packaged it into a convenient tarball  :Smile: 

Download it here. 

```
sudo su - ; wget http://gensys.net.au/files/vhcs2/vhcs-2.4-gentoo-2005041801.tar.bz2
```

Extract the file to your home dir (ie /root)

```
tar -xvjpf vhcs-2.4-gentoo-2005041801.tar.bz2
```

If you want to use the source from VHCS.net, then you will need to extract the tarball and manually change to suit the Gentoo naming convention.

Edit the main config

If you are using my tarball, I have already gone through each and every file and replaced apache with apache2, courier with courier-imap etc, and pointed everything to the proper locations. I have also Gentoofied the vhcs2.conf file, however you will still need to edit it to suit your network.

Change anything that has a square bracket, ie [hostname].

```
cd /root/vhcs-gentoo-2.4/configs ; nano -w vhcs2.conf
```

If you are not using my tarball, then you can grab my config and overwrite the one that came with the source if you like

```
cd /root/vhcs-2.4/configs ; rm vhcs2.conf ; wget http://gensys.net.au/files/vhcs2/vhcs2.conf ; nano -w vhcs2.conf
```

exit and save the file.

For those doing it manually, most of the config is correct. Just make the following changes:

```
DEFAULT_ADMIN_ADDRES = [enter your email address here]

SERVER_HOSTNAME = [enter your server name here]

FTPD_CONF_FILE = /etc/proftpd/proftpd.conf

DATABASE_NAME = vhcs2

DATABASE_PASSWORD = [enter your password here]

ROOT_DIR = /var/www/localhost/htdocs/vhcs2

BIND_DB_DIR = /var/bind/pri

SECONDARY_DNS = [if you have one, add it here]

APACHE_WWW_DIR = /var/www/localhost/htdocs/virtual

APACHE_CONF_FILE = /etc/apache2/vhcs2.conf

GUI_ROOT_DIR = /var/www/localhost/htdocs/vhcs2/gui

PEAR_DIR = /usr/lib/php

APACHE_USER = apache

APACHE_GROUP =apache

MTA_LOCAL_MAIL_DIR = /var/spool/mail

MTA_VIRTUAL_MAIL_DIR = /var/spool/mail/virtual

MTA_LOCAL_ALIAS_HASH = /etc/mail/aliases

MTA_MAILBOX_MIN_UID = 1001

MTA_MAILBOX_UID = 1001

MTA_MAILBOX_GID = 12

MTA_SASLDB_LOCAL_DOMAIN = [enter your domain here]

MTA_SASLDB_FILE = /etc/sasl2/sasldb2

COURIER_CONF_DIR = /etc/courier-imap

BACKUP_ROOT_DIR = /var/www/localhost/htdocs/vhcs2/engine/backup

CMD_NAMED = /etc/init.d/named

CMD_HTTPD = /usr/sbin/apache2

CMD_AUTHD = /etc/init.d/courier-authlib

CMD_IMAP = /etc/init.d/courier-imapd

CMD_POP = /etc/init.d/courier-pop3d

QUOTA_ROOT_DIR = /var/www/localhost/htdocs/vhcs2/engine/quota

TRAFF_ROOT_DIR = /var/www/localhost/htdocs/vhcs2/engine/traffic

TOOLS_ROOT_DIR = /var/www/localhost/htdocs/vhcs2/engine/tools

FTP_USERNAME_SEPARATOR = -

FTP_HOMEDIR = /var/www/localhost/htdocs/virtual

```

Once again, if you are using <= courier-imap 3, then change CMD_AUTHD = /etc/init.d/courier-authlib to CMD_AUTHD = /etc/init.d/authdaemond.

Edit Postfix main.cf

I found the default postfix config a little restrictive (like not letting you email other domains outside your network), so I changed it. Either way you will need to edit the main.cf file so that it is compatible with your network.

If you used my tarball, main.cf will soon be changed to grab variables from the vhcs2.conf so you won't have to edit anything, but for now change anything in square brackets, else you can edit it manually.

```
nano -w /root/vhcs-gentoo-2.4/configs/postfix/main.cf
```

exit and save

Rebuild the daemon

You need to re-build the daemon so that it is Gentoo init compatible. See howto here.

If you are running 64bit OS, then use this howto here.

Let's continue.

Perl Modules

Now that you have the configs done there are a few more perl modules you need.

```
USE="-X" emerge -av lynx ftp gnupg ncftp unzip zip
```

Now we need to run cpan to download the modules

```
g-cpan.pl MIME::Entity MIME::Parser MIME::Base64 Crypt::CBC Crypt::Blowfish Term::ReadPassword
```

this should download and configure the missing modules while inserting them into portage.

Edit Courier DB location

The next thing you need to do is edit makeuserdb 

```
nano -w /usr/sbin/makeuserdb
```

and change any lines that say "/etc/courier" to "/etc/courier-imap". ie:

```
$dbfile="/etc/courier-imap/authlib/userdb";

$datfile="/etc/courier-imap/authlib/userdb.dat";

$lockfile="/etc/courier-imap/authlib/userdb.lock";

$shadowfile="/etc/courier-imap/authlib/userdbshadow.dat";

$tmpdir="/etc/courier-imap/authlib";
```

Save and exit the file.

Now we should now be ready to finalise the setup!

Backup

Let's back it all up  :Smile: 

```
mkdir ~/vhcs2.backup ; cp -R /root/vhcs-gentoo-2.4/* ~/vhcs2.backup/
```

Install

Now we run the installer which creates the files under /tmp/vhcs2

```
cd /root/vhcs-gentoo-2.4 ; make install ; cd /tmp/vhcs2
```

Now we move the files into the system

```
cp -R /tmp/vhcs2/* /
```

Symlinks

If you are using the source tarball (not my gentoo one) then you'll need to create some symlinks.

If you are using the gentoo tarball you can skip this step.

Web

```
mv /var/www/vhcs2 /var/www/localhost/htdocs/ ; ln -sf /var/www/localhost/htdocs/vhcs2 /var/www/vhcs2 ; mv /var/www/virtual /var/www/localhost/htdocs/ ; ln -sf /var/www/localhost/htdocs/virtual /var/www/virtual

```

Mail:

```
mv /var/mail /var/spool/mail ; ln -sf /var/spool/mail /var/mail ; ln -sf /etc/mail/aliases /etc/aliases ; ln -sf /etc/init.d/courier-imapd /etc/init.d/courier-imap ; ln -sf /etc/init.d/courier-pop3d /etc/init.d/courier-pop ; ln -sf /etc/init.d/courier-pop3d /etc/init.d/courier-popd ; mv /etc/courier/* /etc/courier-imap ; rmdir /etc/courier ; cp /etc/vhcs2/courier/authmodulelist /etc/courier-imap/ ; ln -sf /etc/courier-imap /etc/courier ; mv /usr/lib/courier/courier-authlib /usr/lib/courier-imap ; rmdir /usr/lib/courier ; ln -sf /usr/lib/courier-imap /usr/lib/courier ; ln -sf /etc/courier-imap /etc/courier-imap/authlib ; mkdir /var/run/courier
```

Setup

Now we need to run the setup program

```
cd /var/www/localhost/htdocs/vhcs2/engine/setup/ ; ./vhcs2-setup
```

and answer all the questions

Fix Bind

We need to tell Bind to listen on its external address, not local 127.0.0.1.

```
nano -w /etc/bind/named.conf
```

Edit the following IP section (replace 127.0.0.1 with your server's ip)

```
listen-on { 127.0.0.1; };
```

Also, if you have more than one cpu, you can set Bind to use SMP under /etc/conf.d/named with

```
CPU="2"
```

Apache

Finally we need to tell <=Apache 2.0.52 about our vhcs2.conf, so let's add it

```
echo "Include /etc/apache2/vhcs2.conf" >> /etc/apache2/conf/commonapache.conf
```

Or if >=Apache 2.0.53

```
echo "Include /etc/apache2/vhcs2.conf" >> /etc/apache2/httpd.conf
```

If you are using Apache 2.0.53 you will need a later version of mod_php

```
echo "=dev-php/mod_php-4.3.10-r1" >> /etc/portage/package.keywords ; emerge -av mod_php
```

Services

If you did not use the gentoo tarball, then you'll need to grab the init script I created, start it and add to default runlevel

```
cd /etc/init.d/ ; wget http://gensys.net.au/files/vhcs2/vhcs2 ; chmod 765 vhcs2 ; /etc/init.d/vhcs2 start ; rc-update add vhcs2 default
```

Let's start our services

```
for x in apache2 courier-imapd courier-pop3d courier-authlib mysql named postfix proftpd saslauthd fcron vhcs2 ; do /etc/init.d/$x start ; done ; rc-update add vhcs2 default
```

Don't forget if you are using <=Courier-IMAP v3, then substitute courier-authlib with authdaemond.

Assuming there were no errors, try and browse to your new setup at 

http://ipaddress/vhcs2/gui/index.php

Good Luck!

----------

## ZmiyGorinich

This is cool software. I search it for my local server much time.

Thanks you and don't stop make this documentation.

----------

## taskara

OK, I have created an init script, and a 64bit fix.

Any Gentooists out there willing to test for me?

ta!

----------

## j-m

Looks interesting, good luck. I will try when I have a test machine ready. 

One suggestion - use

```

g-cpan.pl MIME::Entity MIME::Parser MIME::Base64 Crypt::CBC Crypt::Blowfish Term::ReadPassword

```

This way the ebuilds are created in PORTDIR_OVERLAY and can be uninstalled via portage.

I will keep watching this thread and post my suggestions here.

----------

## taskara

thank you for the tip j-m, I have updated the howto.

I look forward to any other advice you can give me.. I have been messing around so much with my boxen getting vhcs2 working that I need a fresh Gentoo system to test on  :Smile: 

Once I am satisfied that the Howto works, I will write an ebuild.

Cheers

----------

## cyber007

Thanks for the creat tutorial!, i have plans to install vhcs2 on my gentoo production server.

it works fine on my test server

keep up the good work  :Smile: 

add this cronjob

```
0,30 * * * *  /var/www/vhcs2/engine/vhcs2-rqst-mngr
```

for the mdaemon in vhcs2 to update users and other changes

----------

## SpideriK

Hi, I'm testing this tutorial and I just finish do the first emerge apps... and I do all the rc-udpate but i'm missing authdeamond.. it's ok or I do something wrong?

Thx

----------

## SpideriK

Hi, I'm testing this tutorial and I just finish do the first emerge apps... and I do all the rc-udpate but i'm missing authdeamond.. it's ok or I do something wrong?

Thx

----------

## cyber007

if you use courier-imap version 4 and higer, do this

```
/etc/init.d/courier-authlib start
```

----------

## SpideriK

Thx...

Another error here, hope it's not another miss reading thing...  :Wink: 

I do cpan thing and when I start the setup... the setup tells me that i don't have any of this module on my computer... MIME:: and CRYPT:: thing

Do I do something wrong here... surely yes but what?

Thx

Edit: I reemerge all  and check if it work

----------

## taskara

Anyone else getting

```
vmware setup # /etc/init.d/saslauthd start

 * Starting saslauthd...

saslauthd[11344] :set_auth_mech   : unknown authentication mechanism: pam  [ !! ]

```

when starting saslauthd?

/etc/sasl2/smtpd.conf has pam, but if I change that to saslauthd it still complains about pam.. I can't think straight..

update: I think I took out pam USE flag.. trying again with

update2: yep, silly me. I built cyrus-sasl without pam USE flag  :Confused:  all fixed

----------

## taskara

has anyone yet followed my howto and has feedback on if it actually works?

things that you had to change?

tips?

I just re-built a system under vmware using my gentoo tarball and I can log into the web gui but it won't actually create any domains.

cheers

----------

## SpideriK

I'm trying right now but I'm stuck with emerge entity... 

```

*** Warning: This library needs some functionality provided by -lpython2.0.

*** I have the capability to make that library automatically link in when

*** you link to this library.  But I can only do this if you have a

*** shared version of the library, which you do not appear to have.

*** Warning: libtool could not satisfy all declared inter-library

*** dependencies of module librendnjs.  Therefore, libtool will create

*** a static module, that should work as long as the dlopening

*** application is linked with the -dlopen flag.

ar cru .libs/librendnjs.a js-embed.lo js-ENode.lo js-ENodeAttrib.lo

ranlib .libs/librendnjs.a

creating librendnjs.la

(cd .libs && rm -f librendnjs.la && ln -s ../librendnjs.la librendnjs.la)

make[3]: Leaving directory `/var/tmp/portage/entity-0.7.2/work/entity-0.7.2/renderers/javascript'

Making all in gtkglarea

make[3]: Entering directory `/var/tmp/portage/entity-0.7.2/work/entity-0.7.2/renderers/gtkglarea'

/bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../g-extensions              -I../../entity           -I../../expat-1.1                        -DENTITYDATA=\"/usr/lib/entity\"    -O2 -march=pentium3 -fomit-frame-pointer -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -Wall  -I/usr/local/ssl/include/ -L/usr/local/ssl/lib/ -c rendgtkgl.c

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../g-extensions -I../../entity -I../../expat-1.1 -DENTITYDATA=\"/usr/lib/entity\" -O2 -march=pentium3 -fomit-frame-pointer -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -Wall -I/usr/local/ssl/include/ -L/usr/local/ssl/lib/ -c rendgtkgl.c  -fPIC -DPIC -o rendgtkgl.lo

rendgtkgl.c:6:21: GL/glut.h: No such file or directory

rendgtkgl.c: In function `rendgtkgl_text_render':

rendgtkgl.c:291: warning: implicit declaration of function `glutBitmapCharacter'

rendgtkgl.c:291: error: `GLUT_BITMAP_TIMES_ROMAN_24' undeclared (first use in this function)

rendgtkgl.c:291: error: (Each undeclared identifier is reported only once

rendgtkgl.c:291: error: for each function it appears in.)

rendgtkgl.c: In function `rendgtkgl_cube_render':

rendgtkgl.c:334: warning: implicit declaration of function `glutSolidCube'

rendgtkgl.c: In function `rendgtkgl_sphere_render':

rendgtkgl.c:352: warning: implicit declaration of function `glutSolidSphere'

make[3]: *** [rendgtkgl.lo] Error 1

make[3]: Leaving directory `/var/tmp/portage/entity-0.7.2/work/entity-0.7.2/renderers/gtkglarea'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/var/tmp/portage/entity-0.7.2/work/entity-0.7.2/renderers'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/entity-0.7.2/work/entity-0.7.2'

make: *** [all-recursive-am] Error 2

!!! ERROR: dev-lang/entity-0.7.2 failed.

!!! Function src_compile, Line 65, Exitcode 2

!!! (no error message)

!!! If you need support, post the topmost build error, NOT this status message.

```

I do an emerge glut and it do the tricks but now i'm stuck with some kind of -lpython... tryng an emerge right now and post what i get

now this:

```
1.1                                     -DRESOLVER_BIN=\"/usr/lib/entity/csink_dns_resolve\"                    -DENTITY_EMBED    -O2 -march=pentium3 -fomit-frame-pointer -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -Wall  -I/usr/local/ssl/include/ -L/usr/local/ssl/lib/ -c resolve.c

/bin/sh ../../libtool --mode=link gcc  -O2 -march=pentium3 -fomit-frame-pointer -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -Wall  -I/usr/local/ssl/include/ -L/usr/local/ssl/lib/ -L/usr/lib/python2.0/config/ -lpython2.0 -lpython2.3 -lm -L/usr/lib/python2.3/config  -o csink_dns_resolve -lnsl resolve.o  

gcc -O2 -march=pentium3 -fomit-frame-pointer -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -Wall -I/usr/local/ssl/include/ -L/usr/local/ssl/lib/ -L/usr/lib/python2.0/config/ -lpython2.0 -lpython2.3 -lm -L/usr/lib/python2.3/config -o csink_dns_resolve -lnsl resolve.o

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lpython2.0

collect2: ld returned 1 exit status

make[3]: *** [csink_dns_resolve] Error 1

make[3]: Leaving directory `/var/tmp/portage/entity-0.7.2-r1/work/entity-0.7.2/renderers/csink'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/var/tmp/portage/entity-0.7.2-r1/work/entity-0.7.2/renderers'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/entity-0.7.2-r1/work/entity-0.7.2'

make: *** [all-recursive-am] Error 2

!!! ERROR: dev-lang/entity-0.7.2-r1 failed.

!!! Function src_compile, Line 65, Exitcode 2

!!! (no error message)

!!! If you need support, post the topmost build error, NOT this status message.

```

----------

## cyber007

I have vhcs2 installed.

used vmware and it works fine.

i have only trouble with my production server.

with courier-pop

i can't login

Your tutorial is great.

vhcs2 have it's own daemon, and he make the domains active and other thing in vhcs2.

so you must add the vhcs2 daemon in cron

----------

## SpideriK

Cyber, what do u do for ENTITY? Do u do an emerge entity? if yes do u have the python2.0 lib in your /usr/lib?

I'm stuck at error as show in my post before..

Thx

----------

## taskara

 *cyber007 wrote:*   

> I have vhcs2 installed.
> 
> used vmware and it works fine.
> 
> i have only trouble with my production server.
> ...

 

I re-created the daemon to run in an init (as per my howto) so I have the daemon running without cron.

Did you use my tarball? or the source from vhcs2?

what version of courier? authlib? or authdaemond?

...........

SpideriK, you might want to search the forums for that error - it doesn't *seem* vhcs related. Perhaps there is a fix out there that will enable you to get past that point. I don't seem to have ENTITY emerged on my system at all, although I DO have python use flag. havey ou tried a newer version from portage?

----------

## SpideriK

Well, im doin a perl-update cause I can't even emerge MIME-tools... I don't how u install entity cause u really need it to run vhcs2.4-setup...

So I know my error is not vhcs related but in some kind of way it is cause we need it... I think I can do something with MIME-tools... but I'll have to read cause I never used it...

When I pass this step of MIME::Entity it will all install and maybe  :Wink:  running  :Very Happy: 

edit: Ok it's running now  :Very Happy:  I can add a resseler... add a user but cant get his status other than waiting to be added....  :Sad: 

----------

## cyber007

I think that authmysql isn't configure well,

it seems that he can't connect to the wright database.

to change the status of an item run this

```
/var/www/vhcs2/engine/vhcs2-rqst-mngr
```

and this is my error when i try to connect with my mail server, it is pop3, i use courier-imap 4

```
-ERR pop3login requires exactly two arguments.
```

i used your tar

----------

## cyber007

 *SpideriK wrote:*   

> Cyber, what do u do for ENTITY? Do u do an emerge entity? if yes do u have the python2.0 lib in your /usr/lib?
> 
> I'm stuck at error as show in my post before..
> 
> Thx

 

Yes i have python

libpython2.3.so.1.0

----------

## RUDIII

I'm working on a chroot VHCS... I'll tell more later.

----------

## Master One

Any progress? I would have loved to have an ebuild for this package, before I give it a first try. This way I'll also have to join the manual installation procedure.

Anyone got it fully working on a Gentoo setup by now?

----------

## Vyeperman

Sorry to bring back old threads but... I had an issue.

I posted it on rafb to save post space, but for some reason it's have troubling finding modules that are supposed to be there.

http://rafb.net/paste/results/PC1Ye876.html

Then when I try to make the modules again it says they already exist

----------

## taskara

I haven't had time to work on vhcs.. but others can feel free to  :Smile: 

anyhoo Vyeperman, looks like it's saying there is already an ebuild for some of them.

perhaps you can try the direct ebuild?

```
emerge -av MIME-tools MIME-Base64 Crypt-Blowfish Term-ReadPassword
```

and perhaps

```
g-cpan.pl DBI DBD::mysql
```

or some sort of mixture there..

----------

## Master One

taskara, what happened? Did you loose interest in VHCS2?

I am just checking your work on VHCS2 for Gentoo, but there are some thinks, I don't quite understand:

1. Is the USE flag "authdaemond" still necessary when using courier-imap V4? cyrus-sasl is the only package, listening to this USE flag.

2. I made a diff between the original package and your vhcs-2.4-gentoo-2005041801 package. I don't quite understand, how that comes, but the original package from the VHCS website is dated with 23rd April, so how comes your package is from 18th?

3. How comes, you have an older version of phpmyadmin included in your package? Can't phpmyadmin be left out, and emerged through portage instead, as it is done with pflogsumm?

4. I am not quite sure about the nessary changes to be applied to the original package concerning the use of courier-imap V4. Is it enough to change the CMD_AUTHD line in vhcs2.conf, or are there changes necessary in vhcs-2.4/configs/courier/Makefile necessary as well??? As it looks like, "courier-imap" is the valid dir in most cases, except when it is about authentication, which means "courier/authlib" then. But it's only about two files (authdaemonrc & authmodulelist), whereas authdaemonrc does not show any major differences, and authmodulelist even seems to be not needed.

I'd appreciate clearification for that matters, as I'd like to use the original package and apply a patch for Gentooification.

----------

## taskara

 *Master One wrote:*   

> taskara, what happened? Did you loose interest in VHCS2?

 

yes, to a degree - it does not really do everything I want, but it IS promising. The main issue is time. I run two IT companies and in my spare time I'm trying to organise a new webserver for myself. I was hoping someone else might be able to contribute..

 *Master One wrote:*   

> I am just checking your work on VHCS2 for Gentoo, but there are some thinks, I don't quite understand:
> 
> 1. Is the USE flag "authdaemond" still necessary when using courier-imap V4? cyrus-sasl is the only package, listening to this USE flag.

 

this should NOT be needed, but having it will not affect courier v4 if it doesn't use that flag

 *Master One wrote:*   

> 2. I made a diff between the original package and your vhcs-2.4-gentoo-2005041801 package. I don't quite understand, how that comes, but the original package from the VHCS website is dated with 23rd April, so how comes your package is from 18th?

 

I guess they have actually done an update to their tarball and called it the same version.. 

 *Master One wrote:*   

> 3. How comes, you have an older version of phpmyadmin included in your package? Can't phpmyadmin be left out, and emerged through portage instead, as it is done with pflogsumm?

 

umm.. I don't remember including phpmyadmin in my tarball (it was prob from the original vhcs2 tarball), but yes, you could remove it and emerge it yourself

 *Master One wrote:*   

> 4. I am not quite sure about the nessary changes to be applied to the original package concerning the use of courier-imap V4. Is it enough to change the CMD_AUTHD line in vhcs2.conf, or are there changes necessary in vhcs-2.4/configs/courier/Makefile necessary as well??? As it looks like, "courier-imap" is the valid dir in most cases, except when it is about authentication, which means "courier/authlib" then. But it's only about two files (authdaemonrc & authmodulelist), whereas authdaemonrc does not show any major differences, and authmodulelist even seems to be not needed.

 

this is part of the deal.. the original tarball is not designed for gentoo, but for debian - and as such a lot of the components don't point to the right places.

Originally I got vhcs working by using a plethora of symlinks - you should be able to do this too. it should be much easier now with courier v4 because it is now pointing parts back to /etc/courier, whereas for courier3 I had to change every single make file in the program to point it ot another location.. very tedious!

 *Master One wrote:*   

> 
> 
> I'd appreciate clearification for that matters, as I'd like to use the original package and apply a patch for Gentooification.

 

Go for it! I was hoping someone else would be able to contribute some changes.. I didn't get it all working. I think we should use the original tarball and use symlinks or what not to get it working under gentoo.. else it's a lot of work for each subsequent version release..

----------

## Master One

 *taskara wrote:*   

>  *Master One wrote:*   taskara, what happened? Did you loose interest in VHCS2? 
> 
> yes, to a degree - it does not really do everything I want, but it IS promising.

 

Hm, is there anything else than VHCS2 out there, doing a better job?

 *taskara wrote:*   

>  *Master One wrote:*   I am not quite sure about the nessary changes to be applied to the original package concerning the use of courier-imap V4. Is it enough to change the CMD_AUTHD line in vhcs2.conf, or are there changes necessary in vhcs-2.4/configs/courier/Makefile necessary as well??? As it looks like, "courier-imap" is the valid dir in most cases, except when it is about authentication, which means "courier/authlib" then. But it's only about two files (authdaemonrc & authmodulelist), whereas authdaemonrc does not show any major differences, and authmodulelist even seems to be not needed. 
> 
> this is part of the deal.. the original tarball is not designed for gentoo, but for debian - and as such a lot of the components don't point to the right places.
> 
> Originally I got vhcs working by using a plethora of symlinks - you should be able to do this too. it should be much easier now with courier v4 because it is now pointing parts back to /etc/courier, whereas for courier3 I had to change every single make file in the program to point it ot another location.. very tedious!

 

I don't really understand. With courier4 the config files are as well in /etc/courier-imap, and /etc/courier only has the authlib dir (with the files authdaemonrc, authdaemonrc.dist, authmysqlrc, authmysqlrc.dist), but nothing else. So all of your modifications for /etc/courier-imap, instead of /etc/courier, are still valid. I just don't know about the two files "authdaemonrc" and "authmodulelist", which show up in vhcs-2.4/configs/courier/Makefile for /etc/courier-imap as well (whereas I would put them into /etc/courier/authlib). Except the modules line in authdaemonrc, there are not any other changes, so those two files probably do not matter at all.

If this is alright, I would just apply all the location changes by using a patchfile on the original tarball, I think this is less hassle, than to apply all those symlinks. On the other hand, using the full set of symlinks would make it easier to upgrade in the future, as long as there is no ebuild available for it.

 *taskara wrote:*   

>  *Master One wrote:*   I'd appreciate clearification for that matters, as I'd like to use the original package and apply a patch for Gentooification. 
> 
> Go for it! I was hoping someone else would be able to contribute some changes.. I didn't get it all working. I think we should use the original tarball and use symlinks or what not to get it working under gentoo.. else it's a lot of work for each subsequent version release..

 

It's a pitty, that you couldn't find the time to proceed, you surely were already close to the best possible implementation. I still wonder if anybody got it fully working by now in Gentoo.

----------

## Vyeperman

Well, that fixed half of it, it seems that g-cpan.pl doesn't want to install them. so what are the portage names for DBI and DBD/mysql?

```
root@Kazami setup # g-cpan.pl DBI DBD::mysql

CPAN: Storable loaded ok

Going to read /root/.cpan/Metadata

  Database was generated on Wed, 11 May 2005 08:54:45 GMT

CPAN: LWP::UserAgent loaded ok

Fetching with LWP:

  ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz

Going to read /root/.cpan/sources/authors/01mailrc.txt.gz

Fetching with LWP:

  ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz

Going to read /root/.cpan/sources/modules/02packages.details.txt.gz

  Database was generated on Fri, 13 May 2005 09:55:54 GMT

Fetching with LWP:

  ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz

Going to read /root/.cpan/sources/modules/03modlist.data.gz

Going to write /root/.cpan/Metadata

************************************************************************

*

*

*  Ebuild already exists for 'DBI': DBI

*

*

************************************************************************

************************************************************************

*

*

*  Ebuild already exists for 'DBD::mysql': DBD-mysql

*

*

************************************************************************

root@Kazami setup # ./vhcs2-setup 

CRITICAL ERROR: Module [DBI] WAS NOT FOUND !

CRITICAL ERROR: Module [DBD::mysql] WAS NOT FOUND !

Modules [DBI, DBD::mysql] WAS NOT FOUND in your system...
```

----------

## Master One

It's obvious, Vyeperman, the script is already telling you: DBI and DBD-mysql.

I got it installed yesterday, played arround with it, but already dropped the idea of using VHCS2 again. It looks pretty nice, and has most of the needed standard features and more, but it does not play well with SSL, there is a lot of manual work to do when SSL is needed. The other thing is, there was still something wrong with my installation, it couldn't add a user, also the shown shellcommand was correct. And at last it got too confusing, because I didn't want to use bind, as I am already using dnsmasq for the local nameserving on another machine, and the virtual mailsystem was also an overkill, since I want to implement a groupware solution with embedded mailserver. I'll go back to a manual and simple handling for this webserver. 

I know, this is OT, but anyone can suggest 'standalone' traffic / access analysing tools, which can be compared to the ones from VHCS2, and which can be added to a standard apache + mod_php + mysql setup the easy way?

----------

## taskara

Master One, something like this? http://gentoo-wiki.com/HOWTO_Apache_2_bandwidth_limiting

Vyeperman, 

```
josiah ~ # emerge -av DBI DBD-mysql

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild     U ] dev-perl/DBI-1.46 [1.38-r1] 0 kB

[ebuild     U ] dev-perl/DBD-mysql-2.9003 [2.1027] 110 kB

Total size of downloads: 110 kB

Do you want me to merge these packages? [Yes/No]

```

there are a lot of holes in vhcs2 for gentoo atm.. it needs a lot of work, especially to work out the userdb and courier stuff..

----------

## Master One

 *taskara wrote:*   

> Master One, something like this? http://gentoo-wiki.com/HOWTO_Apache_2_bandwidth_limiting

 

No, I don't want traffic shaping, but just something to analyse the traffic and access for a website. I already searched, and awstats seems to be the most promising project.

----------

## taskara

 *Master One wrote:*   

>  *taskara wrote:*   Master One, something like this? http://gentoo-wiki.com/HOWTO_Apache_2_bandwidth_limiting 
> 
> No, I don't want traffic shaping, but just something to analyse the traffic and access for a website. I already searched, and awstats seems to be the most promising project.

 

oh sorry, misunderstood.

awstats is pretty good, there is also webalizer

----------

## RUDIII

Same error here. What to do now?

```
web setup # cd /var/www/localhost/htdocs/vhcs2/engine/setup/ ; ./vhcs2-setup

CRITICAL ERROR: Module [MIME::Entity] WAS NOT FOUND !

CRITICAL ERROR: Module [Crypt::Blowfish] WAS NOT FOUND !

Modules [MIME::Entity, Crypt::Blowfish] WAS NOT FOUND in your system...
```

 *Vyeperman wrote:*   

> Well, that fixed half of it, it seems that g-cpan.pl doesn't want to install them. so what are the portage names for DBI and DBD/mysql?
> 
> ```
> root@Kazami setup # g-cpan.pl DBI DBD::mysql
> 
> ...

 

----------

## taskara

```
emerge -av DBD-mysql DBI
```

they are already in the portage tree

----------

## RUDIII

And how to get "MIME::Entity" ?

----------

## taskara

did you run 

```
g-cpan.pl MIME::Entity
```

  :Question: 

----------

## RUDIII

Of course!

```

web / # g-cpan.pl MIME::Entity

CPAN: Storable loaded ok

Going to read /root/.cpan/Metadata

  Database was generated on Mon, 13 Jun 2005 00:57:13 GMT

************************************************************************

*

*

*  Ebuild already exists for 'MIME::Entity': MIME-tools

*

*

************************************************************************

```

----------

## taskara

so, what is it telling you?...

----------

## RUDIII

 *taskara wrote:*   

> so, what is it telling you?...

 

That it already exists. But the setup of vhcs2 has another opinion  :Wink: 

----------

## taskara

 *RUDIII wrote:*   

>  *taskara wrote:*   so, what is it telling you?... 
> 
> That it already exists. But the setup of vhcs2 has another opinion 

 

lol

look carefully

 *Quote:*   

> Ebuild already exists for 'MIME::Entity': MIME-tools 

 

what is that saying? it's the same thing as the other ones... common.. u can do it!  :Wink: 

----------

## taskara

OK, here you are:

Ebuild already exists for 'DBI': DBI

Ebuild already exists for 'DBD::mysql': DBD-mysql

Ebuild already exists for 'MIME::Entity': MIME-tools

so

```
emerge -av MIME-tools
```

(just like the other ones you did)

told you, it was starring you in the face!  :Smile: 

-c

----------

## RUDIII

Oh, I unterstand. But I've already done it. And it didn't solve the problem. Thats the problem  :Wink: 

```

web / # emerge -av MIME-tools

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] dev-perl/MIME-tools-5.415  0 kB 

....merging...

>>> dev-perl/MIME-tools-5.415 merged.

....

web setup # ./vhcs2-setup 

CRITICAL ERROR: Module [MIME::Entity] WAS NOT FOUND !

Modules [MIME::Entity] WAS NOT FOUND in your system...

```

----------

## taskara

Hmm well, I C... my apologies!!

I'll have to look into this later on... anyone else have any ideas?

I need to test the non-beta vhcs2 soon anyway..

----------

## SpideriK

I'll say that I got same kind of problem and I had to do this and it's very long

```
/usr/portage/dev-lang/perl/files/libperl_rebuilder
```

good Luck

----------

## taskara

Thanks SpideriK.

RUDIII, could you please give that a try?

Danke!

----------

## RUDIII

 *taskara wrote:*   

> Thanks SpideriK.
> 
> RUDIII, could you please give that a try?
> 
> Danke!

 

Yes, it takes a while...

It's still merging  :Wink: 

----------

## j-m

 *SpideriK wrote:*   

> I'll say that I got same kind of problem and I had to do this and it's very long
> 
> ```
> /usr/portage/dev-lang/perl/files/libperl_rebuilder
> ```
> ...

 

Bah, don´t use that one next time!  :Shocked: 

```

/usr/portage/dev-lang/perl/files/perl-cleaner

```

it what you want. Waaay much faster, saner and better!  :Cool: 

There is also a separate ebuild now - app-admin/perl-cleaner

----------

## RUDIII

now i've vhcs2 on a sarge subsystem and im happy.

thanks for help! i hope it helps other users with this problem...

----------

## mino

Hello Guys,

i did the HowTo Step by Step but i have a big problem with the vhcs installation script, i cant figure out where the script of you have a problem.

```
    Please enter admininistrator email address: huhu@huhu.de

Use of uninitialized value in concatenation (.) or string at /var/www/localhost/                                                                  htdocs/vhcs2/engine/vhcs2_common_code.pl line 629, <STDIN> line 9.

ERROR: Undefined input data, dname: ||, duid: |root|, dgid: |root|, dperms: |493                                                                  | !

```

and i already test to setup a gentoo installation of vhcs2 with the newest version but the apache reload doesnt work at all. If i add a new web account the apache reload, if i kill a user the apache doesnt reload very well. If i go on my ip I see everytime the homepage of my last added user and not the vhcs panel  :Sad: 

----------

## RUDIII

 *mino wrote:*   

> If i go on my ip I see everytime the homepage of my last added user and not the vhcs panel 

 

Look at your vhost settings. I thinks thats because vhcs2 writes the last added user at first in the vhost.

Does your bind runs?

----------

## minaural

Is there a reason to use "threads"?  Will it break anything if I -threads in the USE flags?

The reason I am asking is because whenever i have threads enabled, apache2 (2.0.54) becomes a huge memory hog and spawns like ~60 processess at 12M memory each.  I checked the mpm_worker settings at it doesnt appear to be using the limits.

----------

## viper26

hi,

i had a problem, i installed vhcs2 with your howto, 

i can add a reseller but then i a enduser the status of the domain is only in progress.

in my logs i have some errors:

DEBUG: push_el() sub_name: del_file(), msg: Starting...

DEBUG: push_el() sub_name: del_file(), msg: Ending...

DEBUG: push_el() sub_name: check_master(), msg: ERROR: Master manager process is not running !

DEBUG: pop_el() sub_name: check_master(), msg: ERROR: Master manager process is not running !

DEBUG: pop_el() sub_name: del_file(), msg: Ending...

taht does it means? an why?

an another error:

DEBUG: push_el() sub_name: sys_command(), msg: ERROR: External command '/var/www/localhost/htdocs/vhcs2/engine/vhcs2-dmn-mngr 2 1>/var/log/vhcs2/vhcs2-dmn-mngr.stdout 2>/var/log/vhcs2/vhcs2-dmn-mngr.stderr' returned '1' status !

DEBUG: pop_el() sub_name: sys_command(), msg: ERROR: External command '/var/www/localhost/htdocs/vhcs2/engine/vhcs2-dmn-mngr 2 1>/var/log/vhcs2/vhcs2-dmn-mngr.stdout 2>/var/log/vhcs2/vhcs2-dmn-mngr.stderr' returned '1' status !

who can help`?

thanks

----------

## joshua

So far, did anyone manage to get a production-ready installation of

VHCS running under gentoo?

If not, what software did you switch to?

----------

## bswenson

Hello all,

First I would like to thank taskara and everyone else who has contributed to vhcs for gentoo. Without this post I would not have been able to get this far. I have updated allot of the makefiles, most of the config files and a few of the perl scripts all with the guidance of this post. I have set up a readme

file that anyone can get to. Please try it out and let me know how it goes. There are quite a few things that are still not working, but the ebuild will install vhcs properly (i think). Here is the readme/install script url:

http://www.blackdove.tv/vhcsfiles/gentoo-vhcs-readme.txt

Here is an excerpt of the readme listing some open issues:

```

# The tarball/ebuild script is pretty rough but it 

# seems to work...mostly. The tarball consists of a

# vhcs directory the goes in /usr/local/portage

# In the files/ dir of the tarball you will

# find another tarball that containd an updated

# version of the configs/ directory found in

# the vhcs source. Most all the changes to vhcs

# for gentoo were in the configs/ dir. There

# have been a few bugs in some of the perl

# scripts, but nothing major. If you find a 

# problem with one of the config files please

# let me know so I can update the tarball and 

# the ebuild as any problems are reported and 

# corrected. Please send me an email if you 

# find an issue.

# There are a number of things that are not

# working for me out of the box yet...if 

# at all. If you find a fix for any of the

# items below please update me:

# 1.  NO LOGGING!!AHH!! For some reason the vhcs2

#     daemon log files are rotating, but are zero

#     bytes in size. Really could use some help with

#     this one please!

# 1.  After a reseller creates a domain the new

#     domain will not change status to started.

#     It seems to be updating bind, and the dbs

#     but not apache, and not sure about postfix

#     and courier yet.

# 2.  Pretty sure config file for postfix is no

#     good. Local mail not even working for me,

#     but is at least queueing. I haven't used

#     postfix in a while so it might be simple

#     to fix. Getting this in /var/log/messages:

#

#Nov 11 04:28:17 hosting01 postfix/smtp[14273]: fatal: unknown service:

#smtp/tcp

#Nov 11 04:28:17 hosting01 postfix/smtp[14274]: fatal: unknown service:

#smtp/tcp

#Nov 11 09:28:18 hosting01 postfix/qmgr[13645]: warning: premature end-of-input

#on private/smtp socket while reading input attribute name

#Nov 11 09:28:18 hosting01 postfix/qmgr[13645]: warning: private/smtp socket:

#malformed response

#Nov 11 09:28:18 hosting01 postfix/qmgr[13645]: warning: transport smtp failure

#-- see a previous warning/fatal/panic logfile record for the problem descr

#iption

#Nov 11 09:28:18 hosting01 postfix/qmgr[13645]: warning: premature end-of-input

#on private/smtp socket while reading input attribute name

#Nov 11 09:28:18 hosting01 postfix/qmgr[13645]: warning: private/smtp socket:

#malformed response

#Nov 11 09:28:18 hosting01 postfix/qmgr[13645]: warning: transport smtp failure

#-- see a previous warning/fatal/panic logfile record for the problem descr

#iption

#Nov 11 04:28:18 hosting01 postfix/master[13625]: warning: process

#/usr/lib/postfix/smtp pid 14273 exit status 1

#Nov 11 04:28:18 hosting01 postfix/master[13625]: warning:

#/usr/lib/postfix/smtp: bad command startup -- throttling

#Nov 11 04:28:18 hosting01 postfix/master[13625]: warning: process

#/usr/lib/postfix/smtp pid 14274 exit status 1

```

Any clues anyone?

Bram.

----------

## joshua

Hehe, it was last night, I got it working manually for the first time.

Damn it, I should have waited.

Still, thank you all, I would not have get it done without your howtos

and comments.

----------

## taskara

 *joshua wrote:*   

> Hehe, it was last night, I got it working manually for the first time.
> 
> Damn it, I should have waited.
> 
> Still, thank you all, I would not have get it done without your howtos
> ...

 

Wow you're the first person I've seen who has actually got the whole thing up and running  :Smile: 

Perhaps you could shed some light for bswenson and the rest of us on some tricky areas, if you're willing?

Cheers,

Chris

----------

## bswenson

joshua,

could you provide all of the config files you used...maybe a tarball of your /etc/vhcs2/ would do it...

i think it would

Thanks in advance.

B.

----------

## joshua

Huh, I thought in the meanwhile all your systems we're running fine with

vhcs and everyone forgot about this thread ...

It's really hard to provide a full list of changes I did, because I did

actually not just change config files but some perls and other stuff,

too. What I did not change is most of the courier locations. The only

thing I did there was bcaking up /etc/courier/authlib and symlinking

/etc/courier/authlib -> /etc/courier . If that helps anyone. And running

postfix with vhcs in a chroot seemed to be too hard work, so it's using

config files in /etc/postfix, not /var/spool/postfix/etc/...

I am not sure about relevant config files. I guess I'll just post my

vhcs.conf and if you get in further trouble or need some more

details, go on and ask. I guess, that would've helped me, too, some

days ago.

```
vhcs.conf

#

# Misc config variables;

#

BuildDate = 20.08.2005

# DFtpDir = /var/www/virtual/

# FtpShell = /bin/bash

Version = 2.4.6.2

VersionH = 2.4 Spartacus

LOGIN_TIME_OUT = 20

DEFAULT_ADMIN_ADDRES = [my email]

SERVER_HOSTNAME = [fqdn of my server]

BASE_SERVER_IP = [server ip]

MR_LOCK_FILE = /tmp/vhcs2.lock

CMD_HOSTNAME = /bin/hostname

CMD_IFCONFIG = /sbin/ifconfig

CMD_USERADD = /usr/sbin/useradd

CMD_USERDEL = /usr/sbin/userdel

CMD_GROUPADD = /usr/sbin/groupadd

CMD_GROUPDEL = /usr/sbin/groupdel

CMD_MYSQL = /usr/bin/mysql

FTPD_CONF_FILE = /etc/proftpd/proftpd.conf

CMD_CHOWN = /bin/chown

#

# SQL backend variables;

#

DATABASE_TYPE = mysql

DATABASE_HOST = localhost

DATABASE_NAME = vhcs2

DATABASE_PASSWORD = [password]

DATABASE_USER = root

#

# Main situation variables;

#

ROOT_DIR = /var/www/vhcs2

CONF_DIR = /etc/vhcs2

LOG_DIR = /var/log/vhcs2

#

# BIND data.

#

BIND_CONF_FILE = /etc/bind/named.conf

BIND_DB_DIR = /var/bind/pri

SECONDARY_DNS = [my secondary dns]

#

# APACHE data.

#

#

# APACHE config data.

#

APACHE_CMD = /usr/sbin/apache2

APACHE_NAME = apache2

APACHE_RESTART_TRY = 3

APACHE_WWW_DIR = /var/www/virtual

APACHE_LOG_DIR = /var/log/apache2

APACHE_USERS_LOG_DIR = /var/log/apache2/users

APACHE_BACKUP_LOG_DIR = /var/log/apache2/backup

APACHE_CONF_FILE = /etc/apache2/vhcs2.conf

GUI_ROOT_DIR = /var/www/vhcs2/gui

PEAR_DIR = /usr/lib/php

CMD_PS = /bin/ps

CMD_WC = /usr/bin/wc

APACHE_SUEXEC_MIN_UID = 2000

APACHE_SUEXEC_MIN_GID = 2000

APACHE_SUEXEC_USER_PREF = vu

#

# APACHE directory data.

#

APACHE_USER = apache

APACHE_GROUP = apache

#

# Postfix MTA Data.

#

POSTFIX_CONF_FILE = /etc/postfix/main.cf

POSTFIX_MASTER_CONF_FILE = /etc/postfix/master.cf

MTA_LOCAL_MAIL_DIR = /var/spool/mail

MTA_VIRTUAL_MAIL_DIR = /var/spool/mail/virtual

MTA_LOCAL_ALIAS_HASH = /etc/mail/aliases

MTA_VIRTUAL_CONF_DIR = /etc/postfix/vhcs2

MTA_VIRTUAL_ALIAS_HASH = /etc/postfix/vhcs2/aliases

MTA_VIRTUAL_DMN_HASH = /etc/postfix/vhcs2/domains

MTA_VIRTUAL_MAILBOX_HASH = /etc/postfix/vhcs2/mailboxes

MTA_TRANSPORT_HASH = /etc/postfix/vhcs2/transport

MTA_SENDER_ACCESS_HASH = /etc/postfix/vhcs2/sender-access

MTA_MAILBOX_MIN_UID = 1000

MTA_MAILBOX_UID = 1000 

MTA_MAILBOX_UID_NAME = vmail

MTA_MAILBOX_GID = 12 

MTA_MAILBOX_GID_NAME = mail

MTA_SASLDB_LOCAL_DOMAIN = [my server's local domain]

MTA_SASLDB_FILE = /etc/sasl2/sasldb2

CMD_SASLDB_PASSWD2 = /usr/sbin/saslpasswd2

CMD_POSTMAP = /usr/sbin/postmap

CMD_NEWALIASES = /usr/bin/newaliases

CMD_ECHO = /bin/echo

CMD_LN = /bin/ln

#

# Courier IMAP/POP3 Data.

#

COURIER_CONF_DIR = /etc/courier

CMD_MAKEUSERDB = /usr/sbin/makeuserdb

#

# Crontab delayed tasks.

#

BACKUP_HOUR = 23

BACKUP_MINUTE = 40

BACKUP_ROOT_DIR = /var/www/vhcs2/engine/backup

CMD_CRONTAB = /usr/bin/crontab

#

# Backup tasks manager.

#

CMD_TAR = /bin/tar

CMD_MV = /bin/mv

CMD_RM = /bin/rm

CMD_DU = /usr/bin/du

#

# Service manager.

#

CMD_NAMED = /etc/init.d/named

CMD_MTA = /etc/init.d/postfix

CMD_HTTPD = /usr/sbin/apache2

CMD_AUTHD = /etc/init.d/courier-authlib

CMD_IMAP = /etc/init.d/courier-imapd

CMD_POP = /etc/init.d/courier-pop3d

CMD_FTPD = /etc/init.d/proftpd

CMD_VHCS2D = /etc/init.d/vhcs2      

# beware: not changing the previous line made vhcs re-setup my firewall and

# prevented me from logging into my server by closing the ssh-port

#

# Server traffic manager.

#

CMD_IPTABLES = /sbin/iptables

#

# Virtual traffic manager.

#

CMD_CP = /bin/cp

CMD_DIFF = /usr/bin/diff

CMD_GREP = /bin/grep

CMD_CAT = /bin/cat

CMD_AWK = /usr/bin/awk

CMD_PFLOGSUMM = /usr/sbin/maillogconvert.pl

TRAFF_LOG_DIR = /var/log

FTP_TRAFF_LOG = ftp_traff.log

MAIL_TRAFF_LOG = mail.log

QUOTA_ROOT_DIR = /var/www/vhcs2/engine/quota

TRAFF_ROOT_DIR = /var/www/vhcs2/engine/traffic

TOOLS_ROOT_DIR = /var/www/vhcs2/engine/tools

#

USER_INITIAL_LANG = lang_English

USER_INITIAL_THEME = modern_blue

USER_INITIAL_THEME_COLOR = blue

USER_LAYOUT_ID = 1

VHCS_LICENSE = VHCS<sup>&reg;</sup> Pro v2.4.6.2<br>build: 2005-08-21<br>Spartacus

MINIMAL_FTP_UID = 2000

MINIMAL_FTP_GID = 2000

FTP_USERNAME_SEPARATOR = @

FTP_HOMEDIR = /var/www/virtual

FTP_SHELL = /bin/bash

IPS_LOGO_PATH = ../themes/user_logos

VHCS_SUPPORT_SYSTEM = yes  

VHCS_SUPPORT_SYSTEM_PATH = support_system.php

VHCS_SUPPORT_SYSTEM_TARGET =

MYSQL_PREFIX = yes

MYSQL_PREFIX_TYPE =

WEBMAIL_PATH = ../tools/webmail/

WEBMAIL_TARGET = _blank

PMA_PATH = ../tools/pma/

PMA_TARGET = _blank

FILEMANAGER_PATH = ../tools/filemanager/

FILEMANAGER_TARGET = _blank

DATE_FORMAT = d.m.Y

#

# htaccess management (21.04.2005).

#

HTACCESS_USERS_FILE_NAME = .htpasswd

HTACCESS_GROUPS_FILE_NAME = .htgroup

HTPASSWD_CMD = /usr/bin/htpasswd2

#

# backup management (16.05.2005).

#

BACKUP_FILE_DIR = /var/www/vhcs2/backups

```

Hope, I did not forget to blank out all the passwords ...

Some notes:

 don't move any system files or directories around, no need for that

 remove /var/mail before merging files from /tmp/vhcs2 to /

 afterwards move contents from (new) /var/mail to /var/spool/mail and symlink /var/mail -> /var/spool/mail

 generating keys during "make install" took a hell of a long time, because it depends on hardware activity an I did not have any mouse or keyboard connected, so during that stage "cat /dev/sda >/dev/null" speeded it up a lot

As I wasn't quite sure about the paths in /usr/sbin/makeuserdb I post the first lines

of mine, too:

```

use Fcntl ':flock';

$prefix="/usr";

$exec_prefix="${prefix}";

$bindir="${exec_prefix}/bin";

$ENV{'PATH'}="${exec_prefix}/bin:/usr/bin:/usr/local/bin:/bin";

$dbfile="/etc/courier/userdb";

$datfile="/etc/courier/userdb.dat";

$lockfile="/etc/courier/userdb.lock";

$shadowfile="/etc/courier/userdbshadow.dat";

$tmpdir="/etc/courier";

$tmpdatfile="$tmpdir/userdb.tmp";

$tmpshadowfile="$tmpdir/userdbshadow.tmp";

$makedat="/usr/lib/courier/courier-authlib/makedatprog";

.

.

.

```

Good luck and ask if you need more hints or config files ...

----------

## taskara

Update Nov 2005:

Try this newer howto. The one below is too old.

-c

----------

## apryan

Kind of wished VHCS had exim for mail server support. Anyone willing to help me modify it to use exim instead of courier? 

thx

----------

## SeJo

Just for info

i got it working perfectly also, it runs gentoo.be as virtual host fex... 

nice app, shame it won't be integrated into an ebuild easely...

greets

----------

## joshua

Congrats!

Does anyone know how to most easily make logrotate rotate all

customers access logs (in /var/www/virtual/*/logs/) ?

----------

## spottraining

Hello

I am trying to install the latest VHCS in Gentoo server. This is absolute fresh install. I have fallow this HOWTO in VHCS Forum, and now I have some problems. First - I cant restart any more apache. I get fallowing error:

```

localhost htdocs # /etc/init.d/apache2 restart

/etc/conf.d/apache2: line 48: unexpected EOF while looking for matching `"'

/etc/conf.d/apache2: line 50: syntax error: unexpected end of file

 * Apache2 has detected a syntax error in your configuration files:

Syntax error on line 22 of /etc/apache2/vhcs2.conf:

Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration

localhost htdocs #                                 

```

Also - when I pointing in brauser my server Ip/vhcs2, I get error, that thats is not found:

```

Not Found

The requested URL /vhcs2 was not found on this server.

```

So something is missing, but I dont know - what. I have look to my /var/www and there is vhcs2 and evrything, what whas placed after install. Setup script dont shows also any errors.

So maybe can me help with this instalation. I dont want use  Webmin anymore  :Smile: 

And also - sorry about very bad english

----------

## joshua

 *spottraining wrote:*   

> 
> 
> ```
> 
> localhost htdocs # /etc/init.d/apache2 restart
> ...

 

Are you sure, you have PHP installed (preferably dev-lang/php) and "-D PHP" in

your /etc/conf.d/apache2 like e.g. this?

```
APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D PHP5"

```

----------

## spottraining

 *joshua wrote:*   

>  *spottraining wrote:*   
> 
> ```
> 
> localhost htdocs # /etc/init.d/apache2 restart
> ...

 

thanks for tip  :Smile: 

I want to install PHP4 and so I mask the PHP5 in package.mask file. Now I update my PHP and I get the VHCS2 login screen  :Smile: 

But this dev-lang/php installs many unneeded packages. I make list of them and now I need to remove manualy Xorg and many others unneeded packages...

----------

## spottraining

Hello

I have now problem with postfix and vhcs. I have using this Gentoo instalation guide. Evrything work fine, but its impossible to send out any mails.

VHCS debuger shows me two errors:

Domain error is:

```
sys_command() | ERROR: External command '/usr/sbin/postmap /etc/postfix/vhcs2/domains' returned '1' status !
```

And Mail account error is:

```
info@domain.com

sys_command() | ERROR: External command '/bin/echo "********" | /usr/sbin/saslpasswd2 -p -c -f -u domain.com info && /bin/cp /etc/sasl2/sasldb2' returned '1' status !
```

Also, when I look to /var/log/messages, then I see:

```
Feb  5 13:42:18 one postfix/smtp[13958]: fatal: unknown service: smtp/tcp

Feb  5 11:42:19 one postfix/qmgr[13056]: warning: premature end-of-input on private/smtp socket while reading input attribute name

Feb  5 11:42:19 one postfix/qmgr[13056]: warning: private/smtp socket: malformed response

Feb  5 11:42:19 one postfix/qmgr[13056]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description

Feb  5 13:42:19 one postfix/master[13046]: warning: process /usr/lib/postfix/smtp pid 13957 exit status 1

Feb  5 13:42:19 one postfix/master[13046]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling

Feb  5 11:42:19 one postfix/qmgr[13056]: warning: premature end-of-input on private/smtp socket while reading input attribute name

Feb  5 11:42:19 one postfix/qmgr[13056]: warning: private/smtp socket: malformed response

Feb  5 11:42:19 one postfix/qmgr[13056]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description

Feb  5 13:42:19 one postfix/master[13046]: warning: process /usr/lib/postfix/smtp pid 13958 exit status 1
```

Maybe someone can help.

----------

## thoand

I have exactly the same problem and I found out, that in the /etc/postfix/main.cf stands 

```

#

# Delivering virtual messages parameters;

#

virtual_mailbox_base = {MTA_VIRTUAL_MAIL_DIR}

virtual_mailbox_limit = 0

virtual_mailbox_domains = hash:{MTA_VIRTUAL_DMN_HASH}

virtual_mailbox_maps = hash:{MTA_VIRTUAL_MAILBOX_HASH}

virtual_alias_maps = hash:{MTA_VIRTUAL_ALIAS_HASH}

virtual_minimum_uid = {MTA_MAILBOX_MIN_UID}

virtual_uid_maps = static:{MTA_MAILBOX_UID}

```

and so on, I thought vhcs should change it to the real paths? I have no idea, why it does not.

----------

## spottraining

I have this section in main.cf ok.

```
# Delivering virtual messages parameters;

#

virtual_mailbox_base = /var/spool/mail/virtual

virtual_mailbox_limit = 0

virtual_mailbox_domains = hash:/etc/postfix/vhcs2/domains

virtual_mailbox_maps = hash:/etc/postfix/vhcs2/mailboxes

virtual_alias_maps = hash:/etc/postfix/vhcs2/aliases

virtual_minimum_uid = 1000

virtual_uid_maps = static:1000

virtual_gid_maps = static:12

```

roblem is somewhere in smtpd conf  :Confused:   So its impossible to send mails....

----------

## thoand

heh  :Wink:  I changed the main.cf by hand, now I have the same problem like you.

----------

## thoand

now it works, vbut I have to go to school now, I could write how to in the evening.

thoand

----------

## thoand

yesterday there came new postfix configs and sasl cofigs with dispatch-conf. I took them. then it was possible to login via webmail and send mails. then I changed the postfix configs back, and it workt too. so the problem is in /etc/sasl2/smtpd.conf the update  wrote 

```
pwcheck_method:pam
```

 in there. but there are still some problems, it is possible to add new accounts, but I could not delete them. also the status of the entrys in "mail_users" does not change, I set them manually to "change" and they stay on "change". so there is something to do.

----------

## spottraining

I get this also work

I change lot of things inside the master.cf

right now is problem that its not sending meils inside server. But I hope this also soon get to work  :Smile: 

Thanks for your tips. One thing what is important - in master.cf is neede to set smtp chroot to n.

----------

## thoand

are you able to delete mail accounts? if yes, please post your main.cf, mastercf and smtpd.conf. thank you. (of course you could do so, if they do not work.) an easy way is to "emerge nopaste" and then "nopaste /etc/postfic/main.cf" that will post your config in the internet and give you a link.

----------

## spottraining

 *thoand wrote:*   

> are you able to delete mail accounts? if yes, please post your main.cf, mastercf and smtpd.conf. thank you. (of course you could do so, if they do not work.) an easy way is to "emerge nopaste" and then "nopaste /etc/postfic/main.cf" that will post your config in the internet and give you a link.

 

no

not yet

mail accounts working, but in vhcs debuger are still errors

----------

## spottraining

I still geting errors when I add mails. In VHCS Debuger are lines:

 *Quote:*   

> sys_command() | ERROR: External command '/bin/echo "123456" | /usr/sbin/saslpasswd2 -p -c -f /etc/sasl2/sasldb2 -u domain.com test2 && /bin/cp -f /etc/sasl2/sasldb2 /etc/sasl2/sasldb2' returned '1' status !

 

And all mail users are unknow status - but its working - I can send and deliver mails.

Something is wrong, but where? I have find, that lines:

ETC_SASLDB_FILE = /etc/sasl2/sasldb2

and

CMD_SASLDB_LISTUSERS2 = /usr/sbin/sasldblistusers2

are missing, but after adding these lines I get still errors....

----------

## planet-admin

Which version of vhcs2 is this you are using? I myserf fixed this error today.

You're copying the file onto itself, and you're probably missing the line 

MTA_SASLDB_FILE = /var/spool/postfix/etc/sasl2/sasldb2

in your vhcs2 config file. 

See, it's supposed to write to sasldb2, and then copy it from where it is to two locations(or just one depending on the version of vhcs2) so that smtp auth will work.

 *Quote:*   

>  /bin/cp -f /etc/sasl2/sasldb2 /etc/sasl2/sasldb2' 

  is copying the file onto itself, and failing.

Once that's solved, then you need to manually edit the sql database....., and change the user's status to "ok", but you can get away with not doing it.

Michael

----------

## joshua

Don't use VHCS on production systems. For heaven's sake!

I actually do, but I need to get away from this ASAP, because

we've been hacked twice. Whoever wrote a couple of lines in

any programming language can easily find out in no more than

5 minutes that the quality of the VHCS source code is very poor.

I've seen it, it scared me, but lazyness won. At least up to now.

Besides that, the developers (at least one of them) don't seem

to be cooperative at all or even respectful in any way.

Read this:

http://www.rs-labs.com/adv/RS-Labs-Advisory-2006-1.txt

and this:

http://vhcs.net/new/modules/newbb/viewtopic.php?topic_id=4801&forum=1

in any order you like. It scares me, it disappoints me and it once

again makes me think about writing such a software by myself.

If you know any useful alternatives, please tell me.

Hava a nice and secure day ...

----------

## planet-admin

The hacks I'm sure were related to the very serious but recently patched vulnerability in login.php?

Michael

----------

## joshua

 *planet-admin wrote:*   

> The hacks I'm sure were related to the very serious but recently patched vulnerability in login.php?
> 
> Michael

 

Seems like, yes.

----------

## planet-admin

Sites randomly getting deleted without a user logging in to do it?

Michael

----------

## joshua

No, luckily it's by far not that bad. I guess it was just a warning,

someone created two admin accounts. Within a couple of minutes

I shut VHCS down and patched it.

Harmless. Still, if I think of what the intruder could have done ... uh.

----------

## planet-admin

Agreed, but that's the daily windows users' plight, that they're not even aware of.

I think vhcs2 is quite nifty, it just needs a LOT of modification from any how-to to get it locked down.

Michael

----------

## joshua

I can't imagine there's anybody, who wants to work with such a mess of code.

And now that I've seen how the development team reacts to such serious

situations I just want to get away from this ...

I do highly appreciate people giving their hard work away for free, but this is

simply embarrassing.

----------

## planet-admin

I was impressed with the newest version, 2.4.7, after fighting all day to upgrade, the code seems clean, but there are some issues.

My one and only unsolved issue right now is the protected areas feature.

It writes the password using the digest method, and that would work, except apache doesn't seem to want to use digest, and instead only works with basic (old school DES).

Ideas?

Michael

----------

## joshua

I'm sorry, Michael, I'm not that far yet. Currently it won't update my domains

and non-admins can't log in. Seems like perl has problems to connect to mysql.

----------

## planet-admin

I can probably help you with those issues, as vhcs is woring just about flawlessly on my side.

(after manually editing mysql tables, config files, and the like for the last 8 hours)

Can you be more specific?

Michael

----------

## joshua

Here's the relevant part of vhcs2-rqst-mngr:

```
DBI connect('vhcs2:localhost','vhcs2',...) failed: Access denied for user 'vhcs2'@'localhost' (using password: YES) at /var/www/vhcs2/engine//vhcs2_common_code.pl line 237

DEBUG: push_el() sub_name: doSQL(), msg: ERROR: Unable to connect SQL server !

DEBUG: pop_el() sub_name: doSQL(), msg: ERROR: Unable to connect SQL server !

```

PHP seems to connect fine, because I can login as admin via the web.

And running vhcs2-db-passwd gives me

```
Please Enter Your Current Password:

>>> Enterred password does not match. Please try again !

```

----------

## planet-admin

All right, so phpmyadmin works fine for that database, username, and password?

Michael

----------

## joshua

Yes, it does, it's just the perl, like it seems. Might this have to do with the

new mysql passwords (using 4.1)? I tried remerging all perl-mysql

packages I could find. Still no luck.

EDIT: fixed some typos (twice), it's 6:25 in the morning over hereLast edited by joshua on Wed Feb 22, 2006 5:37 am; edited 1 time in total

----------

## planet-admin

In /etc/vhcs2/vhcs2.conf , what does the line 

DATABASE_PASSWORD =

say?

(Well, does it say anything at all?)

Michael

----------

## joshua

It says

```
DATABASE_PASSWORD = {11 alphanumeric chars}=
```

----------

## planet-admin

OK, so it's actually got a password there.

Try logging into your database from a terminal, using mysql, the database name is vhcs2.

See if that works, because I'd like to track down where the error lies.

Michael

----------

## joshua

works!

----------

## joshua

Strange things happening here. The following script

```
use DBI();

$host="localhost";

$base="vhcs2";

$user="vhcs2";

$pass="MySuperSecretPassw0rd";

my $dbh = DBI->connect("DBI:mysql:database=$base;host=$host", $user, $pass, {'RaiseError' => 1});

```

gives

```
DBI connect('database=vhcs2;host=localhost','vhcs2',...) failed: Access denied for user 'vhcs2'@'localhost' (using password: YES) at ./test.pl line 10

```

The PHP-equivalent

```
<?php

$host="localhost";

$user="vhcs2";

$pass="MySuperSecretPassw0rd";

$h = mysql_connect($host, $user, $pass);

?>

```

says

```
Warning: mysql_connect(): Access denied for user 'vhcs2'@'localhost' (using password: YES) in /root/test.php on line 9
```

```
mysql -u vhcs2 -p
```

still works.

I can login over the web through login.php. How's that?

How can vhcs's PHP-files access the database while my

test.php can't? Is there a problem with mysql password

encryption? I'm running mysql-4.1.14 btw.

EDIT:

Stupid idiot as I am, I managed to c&p a hard to see typo into both

of the scripts. DOH! Actually I can connect through DBI and PHP,

but still vhcs2-rqst-mngr can't connect. I'm getting closer. I'm

almost sure my DATABASE_PASSWORD entry in vhcs2.conf is wrong.

Checking it.

----------

## nightcanton

I'm getting this error any ideas? 

```
Failed Test         Stat Wstat Total Fail  Failed  List of Failed

-------------------------------------------------------------------------------

t/10dsnlist.t         10  2560     9   17 188.89%  1-9

t/20createdrop.t      10  2560     5    9 180.00%  1-5

t/30insertfetch.t     10  2560    11   21 190.91%  1-11

t/35limit.t           10  2560   113  225 199.12%  1-113

t/40bindparam.t       10  2560    27   53 196.30%  1-27

t/40blobs.t           10  2560    11   21 190.91%  1-11

t/40listfields.t      10  2560    18   35 194.44%  1-18

t/40nulls.t           10  2560    11   21 190.91%  1-11

t/40numrows.t         10  2560    25   49 196.00%  1-25

t/41blobs_prepare.t   10  2560    24   47 195.83%  1-24

t/50chopblanks.t      10  2560    35   69 197.14%  1-35

t/50commit.t         255 65280    30   59 196.67%  1-30

t/ak-dbd.t           255 65280    90  175 194.44%  1 4-90

t/akmisc.t            10  2560   351  701 199.72%  1-351

t/dbdadmin.t          10  2560    21   41 195.24%  1-21

t/insertid.t         255 65280    12   24 200.00%  1-12

t/mysql.t                         ??   ??       %  ??

t/mysql2.t           255 65280    ??   ??       %  ??

1 test skipped.

Failed 18/20 test scripts, 10.00% okay. 859/866 subtests failed, 0.81% okay.

make: *** [test_dynamic] Error 255

  /usr/bin/make test -- NOT OK

Running make install

  make test had returned bad status, won't install without force

```

----------

## hurricane

 *taskara wrote:*   

> Update Nov 2005:
> 
> Try this newer howto. The one below is too old.
> 
> 

 

I'm sorry, but that guide does not nearly work on gentoo. Not even a bit.

- "dev-perl/libnet" does not exist (anymore), in:

  emerge -av postfix apache Authen-DigestMD5 BerkeleyDB bind Class-DBI-mysql expect courier-imap Crypt-Blowfish crypt-cbc cyrus-sasl Date-Calc DateManip DBD-mysql dev-perl/libnet gawk gzip IO-stringy iptables libmcrypt libperl MailTools MD5 MIME-Base64 MIME-tools dev-lang/php mysql Net-DNS Net-Netmask perl procmail proftpd SNMP_Session tar TermReadKey TimeDate vixie-cron

- "http://www.pure-dream.com/filez/vhcs2.conf" has some missing settings, in:

  For ~x86 gentoo i use this config: ...

- This are no perl-modules, right? In:

  USE="-X" emerge -av lynx ftp gnupg ncftp unzip zip

- "g-cpan.pl" does not exist, in:

  g-cpan.pl MIME::Entity MIME::Parser MIME::Base64 Crypt::CBC Crypt::Blowfish Term::ReadPassword

- vhcs does not install correctly. this does NOT work, because vhcs installs to "/tmp/vhcs2-*/":

  cd /var/www/localhost/htdocs/vhcs2/engine/setup/ ; ./vhcs2-setup

- even when i use "cd /tmp/vhcs2-*/var/www/vhcs2/engine/setup/ ; ./vhcs2-setup" i get errors about missing perl modules. (because above, "g-cpan.pl" did exist)

- Finally, please try to cut down the use flags and leave some room for people not wantign those flags. (but this is last prio)

So what do i have to do to get it running?

It would be REALLY nice if someone could automatize this into an ebuild!

.

----------

## spottraining

This Taskara guide is little old, but its still possible to get VHCS work. Its only needed some time and little work.

This libnet - I dont use this and I dont find that its needed

About vhcs.conf - some lines are mising yes. Its missing ETC_SLDAB I think. But you can easly add this.

For Perl modules:

first emerge g-cpan

and then You can using g-cpan install all needed Perl modules - its simple.

Also about instalation patch - when you are looking more this taskara guide, then script and installing first VHCS to tmp folder. After all is done, then you can copy this to right place.

----------

## Jovana

Someone know how to fix this problem:

I run ./vhcs2-setup. 

It start and it asked me a few questions. 

I give answer and after this question (I think it's the last one): "Please enter admininistrator email address" 

This error appeared: "ERROR: mkdir() returned '0' status !"

----------

## spottraining

 *Jovana wrote:*   

> Someone know how to fix this problem:
> 
> I run ./vhcs2-setup. 
> 
> It start and it asked me a few questions. 
> ...

 

look - have you in tmp folder some vhcs2 folder greated or not? When yes, then delete this.

----------

## Jovana

I run the setup from the /tmp folder. because after the make install al the stuff are copyed there.

----------

## spottraining

 *Jovana wrote:*   

> I run the setup from the /tmp folder. because after the make install al the stuff are copyed there.

 

In some reson script canot make some directory. Then its giving this error. Or you dont have premissions - but I think you run this script under root privileges.  Look to /var/www/ and when there is folder vhcs2, then delete it. Also in /etc/ is there directory vhcs2? Its can be the solution but I am not sure.

You can try to delite all vhcs2 from /tmp and then make new install and after this try again.

----------

## Mitusin

Hi everybody, I've downloade VHCS 2.4.7.1 and followed  this  instructions, but in the 9 step I get this errors:

```
./Makefile: line 29: OBJS: command not found

./Makefile: line 34: BUILD: command not found

./Makefile: line 36: COMPILE: command not found

./Makefile: line 38: STRIP: command not found

./Makefile: line 1: OBJS: command not found

./Makefile: line 40: vhcs2_daemon:: command not found

./Makefile: line 1: BUILD: command not found

./Makefile: line 1: OBJS: command not found

./Makefile: line 41: vhcs2_daemon: command not found

./Makefile: line 1: STRIP: command not found

./Makefile: line 42: vhcs2_daemon: command not found

./Makefile: line 44: vhcs_daemon.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 45: vhcs_daemon.o: command not found

./Makefile: line 47: daemon_init.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 48: daemon_init.o: command not found

./Makefile: line 50: message.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 51: message.o: command not found

./Makefile: line 53: say.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 54: say.o: command not found

./Makefile: line 56: signal-handlers.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 57: signal-handlers.o: command not found

./Makefile: line 59: receive_data.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 60: receive_data.o: command not found

./Makefile: line 62: send_data.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 63: send_data.o: command not found

./Makefile: line 65: take_connection.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 66: take_connection.o: command not found

./Makefile: line 68: send_line.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 69: send_line.o: command not found

./Makefile: line 71: recv_line.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 72: recv_line.o: command not found

./Makefile: line 74: helo_cmd.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 75: helo_cmd.o: command not found

./Makefile: line 77: helo_syntax.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 78: helo_syntax.o: command not found

./Makefile: line 80: lr_cmd.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 81: lr_cmd.o: command not found

./Makefile: line 83: lr_syntax.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 84: lr_syntax.o: command not found

./Makefile: line 86: bye_cmd.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 87: bye_cmd.o: command not found

./Makefile: line 89: bye_syntax.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 90: bye_syntax.o: command not found

./Makefile: line 92: query_license_server.o:: command not found

./Makefile: line 1: COMPILE: command not found

./Makefile: line 93: query_license_server.o: command not found

./Makefile: line 95: uninstall:: command not found

./Makefile: line 97: clean:: command not found

```

Can anybody help?

Thanks

Solved, do make instead ./Makefile Last edited by Mitusin on Tue Mar 28, 2006 10:48 pm; edited 1 time in total

----------

## thoand

hello,

I have a problem with the vhcs_deamon and restarting apache. I tried the default version and the "sys_command_rs("$cmd reload");" version, but both do not work. if I add a subdomain or something else I have to restart apache via ssh, because it does not come back again without that.

thoand

----------

## thoand

http://vhcs.net/new/modules/newbb/viewtopic.php?topic_id=4567&forum=18&post_id=25756#forumpost25756 <-- that worked for me

----------

## ruben-

Anyone who has an up to date how to that works? :\

- Ruben

----------

## planet-admin

this howto does in fact work, but there is also one at the vhcs2 forum. Use the versions it uses, and upgrade after the fact.

Michael

----------

## keola

Does anyone have any of the files needed to get this working? VHCS has no forum or (public)wiki at the moment. I can't even find an ebuild or anything. Everything leads me back to this thread. If VHCS is crap or too old, I could really use some help with finding something similar.

Thanks!

----------

## joshua

Well, VHCS2 turned out to be a kind of a mess. Bad gaping security holes, bad support, so I switched over to syscp which works pretty well. I higly recommend it over VHCS2.

Take a look: http://syscp.org/

Besk of luck

Daniel

----------

## planet-admin

 *joshua wrote:*   

> Well, VHCS2 turned out to be a kind of a mess. Bad gaping security holes, bad support, so I switched over to syscp which works pretty well. I higly recommend it over VHCS2.
> 
> Take a look: http://syscp.org/
> 
> Besk of luck
> ...

 

Actually, have you looked at ispcp-omega? It's a fork of vhcs2 that's actually maintained, and provides an upgrade path for stuck vhcs2 users. It has decent documentation. I'm using it currently (upgraded from vhcs2).

Michael

----------

