$Id: howto-freevsd-prepare-vhost.txt,v 1.3 2002/02/11 02:58:43 cvsjoko Exp $ $Log: howto-freevsd-prepare-vhost.txt,v $ Revision 1.3 2002/02/11 02:58:43 cvsjoko + mini annotiation Revision 1.2 2002/02/11 02:45:25 cvsjoko + added info about perl-versions: "replace old perl version through new one" Revision 1.1.1.1 2002/02/11 01:22:17 cvsjoko first checkin' ============================================================ part 1 - minimum config ============================================================ - create vhost with "vsdtool-config.pl" (see example-output in "howto-freevsd-prepare-vhost-(test-run-of-vsdtool-config.pl).txt") - start vhost with "vsboot --start " - modify accounts - bevs -r - passwd admin - enter - useradd service - passwd service - enter - create /home/service/.ssh as user "service" - useradd - passwd - enter - modify authorization - cd /etc/pam.d/ - edit "sshd", comment out "auth required /lib/security/pam_vsd.so priv=login" - edit "ftp", comment out "auth required /lib/security/pam_vsd.so priv=ftp" - logout (CTRL + D) --> skel-patch-status: done!!! - test access to server - login as "admin" and "user" via ssh - login as "user" via ftp - point your browser to http:// - restrict anonymous ftp-access - in "/etc/proftpd.conf" - comment out "UserAlias anonymous ftp" --> skel-patch-status: already in skel? - ready!? ============================================================ part 2 - extended config / tuning / troubleshooting ============================================================ - login to vhost - bevs -r - watch running processes (ps -ax) - is all right? (apache, mysql, sshd) - make apache listen on port "80" and disable "vsdredirect"s - see http://www.fubra.com/vsdfaq/index.html#apache ;) - edit "/etc/rc" and comment out calls to "vsdredirect" - see http://www.fubra.com/vsdfaq/index.html#apache and do steps described there: --- snip --- (Q) Apache listens on port 8080. How can I get it to listen on port 80? (A) It is set to listen on 8080 because of the issue described in security.txt. Unless you really need it to listen on port 80, don't worry (vsdredirect should redirect all requests to 80 to 8080.) To get it to start on port 80, you need to modify `rc' and `rc.vsd', located in /usr/share/freevsd/skel-repo/etc. Add the following lines to rc, just before the `exit 0'. # Start Apache web server (as root) httpd_enable="YES" if [ "${httpd_enable}" = "YES" ]; then echo -n 'starting web server: ' if [ -x "/bin/httpd" ]; then httpd_path="/bin/httpd"; fi if [ -x "/usr/sbin/httpd" ]; then httpd_path="/usr/sbin/httpd"; fi if [ -x "/usr/libexec/httpd" ]; then httpd_path="/usr/libexec/httpd"; fi ${httpd_path} -D SSL & echo 'httpd' fi Then comment out the following lines in rc.vsd: # Start Apache web server if [ "${httpd_enable}" = "YES" ]; then echo -n 'starting web server: ' if [ -x "/bin/httpd" ]; then httpd_path="/bin/httpd"; fi if [ -x "/usr/sbin/httpd" ]; then httpd_path="/usr/sbin/httpd"; fi if [ -x "/usr/libexec/httpd" ]; then httpd_path="/usr/libexec/httpd"; fi su - web -c "${httpd_path} -D SSL" & echo 'httpd' fi Once you have done that, delete your virtual servers, re-create the skel (using vsd-genskel.pl) and re-create your virtual servers NB: Please read the next question for more info on port 80 and 8080... - change /etc/httpd/conf/httpd.conf --- snip --- - apache/suexec - see http://www.fubra.com/vsdfaq/index.html#apache and do steps described there: --- snip --- (Q) How do I enable Apache's suexec wrapper? (A) By default Apache is installed with the suexec wrapper disabled. It is left as an exercise for the administrator to enable it by setting the appropriate permissions. Prior to creating the skel, fix the permissions with: chmod 4711 /usr/sbin/suexec If you have already created the skel, use: chmod 4711 /path/to/skel/usr/sbin/suexec --- snip --- - enable apache serving /home/*/public_html - in /etc/httpd/conf/httpd.conf - activate phpMyAdmin at http:///~service/phpMyAdmin/ - useradd service - mkdir /home/service/public_html - cd /home/service/public_html - ln -s /home/httpd/docs/phpMyAdmin . - configure at least hostname in /home/httpd/docs/phpMyAdmin/config.inc.php3 - activate webalizer-stats at http:///~service/webalizer/ - cd /home/service/public_html - ln -s /home/httpd/docs/webalizer . - install kerberos-libraries - A. setup rpm - download rpm 3.0 - no problems ;) - from ftp://ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/rpm-3.0.6.tar.gz - issue a "./configure && make && make install" - B. setup kerberos-libraries - download krb-libs from ftp://rpmfind.net/linux/redhat/updates/6.2/en/os/i386/krb5-libs-1.1.1-28.i386.rpm - become root!!! (e.g. via "bevs -r " from main-host) - mkdir -p /var/local/lib/rpm - rpm -i --nodeps krb5-libs-1.1.1-28.i386.rpm - cd /usr/lib - ln -s /usr/kerberos/lib/* . - C. todo: 16:08 <[joko]> 16:06 <[joko]> 1. setup "rpm": works as "admin" 16:08 <[joko]> 16:06 <[joko]> 2. setup "kerberos": to be done as "root" via "bevs -r " 16:08 <[joko]> 3. checkout how kerberos-libs can be set up as "admin" (e.g. modify installation-path to /usr/local) - enable "lastlogging" - create /var/log/lastlog and give owner to "admin.admin" - disable ssh-errors in /var/log/messages - create /etc/security/limits.conf by issuing a echo "" > /etc/security/limits.conf - replace old perl version through new one (if available) [root@martha1 bin]# cd / [root@martha1 /]# cd /usr/bin/ [root@martha1 bin]# mv perl perl perl5.00503 perlbug perlcc perldoc [root@martha1 bin]# mv perl perl.old [root@martha1 bin]# ln -s /usr/local/bin/perl . [root@martha1 bin]# cd /home/service/bin/ftpweblog/ [root@martha1 ftpweblog]# ./graphftpweblog Error opening file for inclusion: /home/service/ftpweblog/testlog.html [root@martha1 ftpweblog]#