VectorLinux
October 26, 2014, 12:06:03 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Web server package for VL5.9 STD  (Read 3137 times)
hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« on: April 13, 2009, 09:00:49 pm »

Is there any webserver package for VL5.9 STD?
Logged
hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #1 on: April 14, 2009, 03:29:45 am »

I am looking at apache web server, maybe i can compile it for VL 5.9/6 STD. Smiley
Logged
kidd
Packager
Vectorian
****
Posts: 682


« Reply #2 on: April 14, 2009, 03:44:20 am »

I used lighttpd in my vl 5.9 but can't remember if I had to manually compile it or it was in the repos. lighttpd is much ( MUCH ) lighter than apache.

Depending on your needs you may really need apache, but lighttpd will give you better performance in case you don't need esoteric configs.

I'm no expert at all, I just set it up to test some webservice code I was writting, and it did the job for me.

HTH
Logged

hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #3 on: April 15, 2009, 06:49:40 am »

I try to recompile httpd for VL5.9 with the slackware slackbuild but encounter error...when i try to disable the enable-layout, it will prompt the same error for the next configure option.....

Quote
#!/usr/bin/bash
# This script assumes it will be launched within "/NAME/VERSION/src" dir.
# With all sources in "src" Your Vector Linux .tlz package, slack-desc,
# and slack-required will be found in "VERSION" dir. The extraction and
# build will be in a temp dir created in "NAME" dir, and then removed on exit.
# Comment out second to last line to keep this dir intact.


NAME="httpd"            #Enter package Name!
VERSION=${VERSION:-"2.2.11"}      #Enter package Version!
VL_PACKAGER=${VL_PACKAGER:-"hata_ph"}   #Enter your Name!


#SYSTEM VARIABLES
#----------------------------------------------------------------------------
BUILDNUM=${BUILDNUM:-"1"}
VL_VERSION=${VL_VERSION:-"$(ls /var/log/packages/|grep vlconfig2|cut -d "-" -f4|cut -c 2-5)"}
BUILD=${BUILD:-"$BUILDNUM""$VL_VERSION"}
ARCH=${ARCH:-$(uname -m)}
CONFIG_OPTIONS=${CONFIG_OPTIONS:-""}
LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
#----------------------------------------------------------------------------


#SETUP PACKAGING ENVIRONMENT
#--------------------------------------------
CWD=$(pwd)
cd ../
RELEASEDIR=$(pwd)
cd $CWD
mkdir -p $RELEASEDIR/tmp
TMP=$RELEASEDIR/tmp
PKG=$TMP/package-$NAME
#--------------------------------------------


if [ $UID != 0 ]; then
   echo "You are not authorized to run this script. Please login as root"
   exit 1
fi

if [ ! -x /usr/bin/requiredbuilder ]; then
   echo "Requiredbuilder not installed, or not executable."
   exit 1
fi

if [ $VL_PACKAGER = "YOURNAME" ]; then
   echo 'Who are you?
   Please edit VL_PACKAGER=${VL_PACKAGER:-YOURNAME} in this script.
   Change the word "YOURNAME" to your VectorLinux packager name.
   You may also export VL_PACKAGER, or call this script with
   VL_PACKAGER="YOUR NAME HERE"'
   exit 1
fi


#CFLAGS SETUP
#--------------------------------------------
if [[ "$ARCH" = i?86 ]]; then
  ARCH=i586
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  CONFIGURE_TRIPLET="i486-slackware-linux"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fpic"
  CONFIGURE_TRIPLET="x86_64-pc-linux"
fi

export CFLAGS="$SLKCFLAGS $CFLAG_OPTIONS"
export CXXFLAGS=$CFLAGS
export LDFLAGS="$LDFLAGS $LDFLAG_OPTIONS"
#--------------------------------------------


rm -rf $PKG
mkdir -p $PKG
cd $TMP
rm -rf $NAME-$VERSION


#EXTRACT SOURCES
#-----------------------------------------------------
echo "Extracting source..."
tar xvf $CWD/$NAME-$VERSION.tar.* || exit 1
#-----------------------------------------------------


cd $TMP/$NAME-$VERSION


#SET PERMISSIONS
#-----------------------------------------
echo "Setting permissions..."
chown -R root:root .
find . -perm 664 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
find . -perm 2777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 2755 -exec chmod 755 {} \;
find . -perm 774 -exec chmod 644 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 600 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;
find . -perm 400 -exec chmod 644 {} \;
find . -perm 440 -exec chmod 644 {} \;
find . -perm 511 -exec chmod 755 {} \;
find . -perm 711 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
#-----------------------------------------


#CONFIGURE & MAKE
#----------------------------------------------------------------------
# If you are building a KDE-related app, then change the following
# arguments in the script below:
# --prefix=$(kde-config -prefix) \
# --sysconfdir=/etc/kde \
#
# Making these changes will ensure that your package will build in the
# correct path and that it will work seamlessly within the KDE environment.
#
#-----------------------------------------------------------------------
echo "Configuring source..."
./configure --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --with-included-gettext \
  --disable-debug \
  --program-prefix="" \
  --program-suffix="" \
  --enable-layout=Slackware-FHS \
  --with-mpm=prefork \
  --with-apr=/usr \
  --with-apr-util=/usr \
  --enable-mods-shared=all \
  --enable-so \
  --enable-pie \
  --enable-cgi \
  --with-pcre \
  --enable-ssl \
  --enable-rewrite \
  --enable-vhost-alias \
  --enable-proxy \
  --enable-proxy-http \
  --enable-proxy-ftp \
  --enable-proxy-balancer \
  --enable-cache \
  --enable-mem-cache \
  --enable-file-cache \
  --enable-disk-cache \
  --disable-speling \
  --enable-dav \
  --enable-ldap \
  --enable-authnz-ldap \
  --enable-authn-anon \
  --enable-authn-alias \
  --build=$CONFIGURE_TRIPLET \
  $CONFIG_OPTIONS || exit 1

make || exit 1

make install DESTDIR=$PKG || exit

#######################################################################
#Miscellenious tweaks and things outside a normal ./configure go here #
#######################################################################

#mkdir -p $PKG/usr/share/applications
#cp $CWD/$NAME.desktop $PKG/usr/share/applications/$NAME.desktop
#mkdir -p $PKG/usr/share/pixmaps
#cp $CWD/$NAME.png $PKG/usr/share/pixmaps/$NAME.png

mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
   $PKG/usr/doc/$NAME-$VERSION
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild

#----------------------------------------------------------------------

if [ -d $PKG/usr/share/man ] ; then
  mkdir -p $PKG/usr/man
  mv $PKG/usr/share/man/* $PKG/usr/man
  rm  $PKG/usr/share/man
fi
find $PKG/usr/man -type f -exec gzip -9 {} \;

if [ -d $PKG/usr/share/info ] ; then
  mkdir -p $PKG/usr/info
  mv $PKG/usr/share/info/* $PKG/usr/info
  rm $PKG/usr/share/info
fi 
find $PKG/usr/info -type f -exec gzip -9 {} \;

mkdir -p $PKG/install

           # This creates the white space in front of "handy-ruler" in slack-desc below.

      LENGTH=$(expr length "$NAME")
      SPACES=0
      SHIM=""
      until [ "$SPACES" = "$LENGTH" ]; do
        SHIM="$SHIM "
        let SPACES=$SPACES+1
      done

# Fill in the package summary between the () below.
# Then package the description, License, Author and Website.
# There may be no more then 11 $NAME: lines in a valid slack-desc.

cat > $RELEASEDIR/slack-desc << EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.
   
$SHIM|-----handy-ruler------------------------------------------------------|
$NAME: $NAME (Apache HTTP WebServer)
$NAME:
$NAME: The Apache HTTP Server is a powerful and flexible HTTP/1.1 compliant
$NAME:  web server.  Originally designed as a replacement for the NCSA HTTP
$NAME:  Server, it has grown to be the most popular web server on the
$NAME:  Internet.
$NAME:
$NAME:
$NAME:
$NAME: License: Apache License V2.0
$NAME: Authors: The Apache Software Foundation
$NAME: Website: http://www.apache.org


#----------------------------------------
BUILDDATE: $(date)
PACKAGER:  $VL_PACKAGER
HOST:      $(uname -srm)
DISTRO:    $(cat /etc/vector-version)
CFLAGS:    $CFLAGS
LDFLAGS:   $LDFLAGS
CONFIGURE: $(awk "/\.\/configure\ /" $TMP/$NAME-$VERSION/config.log)

EOF

cat $RELEASEDIR/slack-desc > $PKG/install/slack-desc


#STRIPPING
#------------------------------------------------------------------------------------------------------------------
cd $PKG
echo " "
echo "Stripping...."
echo " "
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
#------------------------------------------------------------------------------------------------------------------


#FINISH PACKAGE
#--------------------------------------------------------------
echo "Finding dependencies..."
requiredbuilder -v -y -s $RELEASEDIR $PKG
echo "Creating package $NAME-$VERSION-$ARCH-$BUILD.tlz"
makepkg -l y -c n $RELEASEDIR/$NAME-$VERSION-$ARCH-$BUILD.tlz

cd $CWD
echo "Cleaning up temp files..." && rm -rf $TMP
echo "Package Complete"
#-------------------------------------------------------------

 
Logged
hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #4 on: April 16, 2009, 06:48:11 am »

Now i am trying to compile lighttpd web server for VL5.9 STD. It compile successfully but I want to create auto run the lighttpd server at start up. I know I can put the command /usr/sbin/lighttpd -D -f /etc/lighttpd.conf at /etc/rc.d/rc.local. But I want make it more standard, like create a script like /etc/init.d/lighttpd or /etc/rc.d/rc.lighttpd. I modify my /etc/init.d/samba to lighttpd but the lighttpd daemon cannot start. Do anyone have any idea?

Quote
#!/bin/sh
# description: lighttpd daemon
#
# GNU GPL (c) Eko M. Budi, 2004
#         (c) Vector Linux. 2004

# Include the functions declared in the /etc/rc.d/functions file
source /etc/rc.d/functions

#server name & description
LIGHTYSERVER="Lighty HTTP server"

LIGHTY=/usr/sbin/lighttpd
LIGHTYCONFIG=/etc/lighttpd.conf

case "$1" in
        start)
                echon "Starting $LIGHTYSERVER....."
                loadproc $LIGHTY -D -f $LIGHTYCONFIG
      #$LIGHTY -D -f $LIGHTYCONFIG
                ;;
        stop)
                echon "Stopping $LIGHTYSERVER....."
                killproc $LIGHTY
                ;;
   reload)
                echon "Reloading $LIGHTYSERVER....."
                reloadproc $LIGHTY
                ;;
        restart)
                $0 stop
                /bin/sleep 2
                $0 start
                ;;
        *)
                echo "Usage: $0 {start|stop|reload|restart}"
                exit 1
        ;;
esac

I find this example for lighttpd in slackware......not sure does it help or not lol..

http://slackbuilds.org/repository/12.2/network/lighttpd/

« Last Edit: April 16, 2009, 05:18:09 pm by hata_ph » Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3186



« Reply #5 on: April 16, 2009, 07:19:56 am »

Seems as if you missed a "\" in the script.
Logged

hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #6 on: April 16, 2009, 07:29:17 am »

Seems as if you missed a "\" in the script.

WHERE?
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3186



« Reply #7 on: April 16, 2009, 07:42:33 am »

Post the modified script for httpd
Logged

hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #8 on: April 16, 2009, 07:48:02 am »

Post the modified script for httpd

I am talking about lighttpd.......and I have post the /etc/init.d/lighttpd
Logged
rbistolfi
Packager
Vectorian
****
Posts: 2288


« Reply #9 on: April 16, 2009, 08:22:13 am »

hata_ph: do you get any error message, or is there something interesting in the logs?
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #10 on: April 16, 2009, 03:33:05 pm »

Logged
rbistolfi
Packager
Vectorian
****
Posts: 2288


« Reply #11 on: April 16, 2009, 04:35:25 pm »

Do you have a configuration file in /etc/lighttpd/lighttpd.conf ? it could be /etc/lighttpd.conf also, check for your --sysconfdir option in the configure line.
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #12 on: April 16, 2009, 05:17:44 pm »

Everything is there. I can run the command /usr/sbin/lighttpd -D -f /etc/lighttpd.conf without any problem. Just that the /etc/init.d/lighttpd not working.
Logged
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #13 on: April 17, 2009, 04:54:13 am »

doesnt look like you have a way to run loadproc in your script.

try adding a line like
Quote
. /etc/rc.d/functions
above the case block
Logged
hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #14 on: April 17, 2009, 07:24:19 am »

O...stupid me.....I should have run /etc/init.d/lighttpd start or ./lighttpd start to start the lighttpd daemon....hahahaha

EDIT: OK..the lighttpd server work so far but when i start the lighttpd daemon at boot time I am not able to logon to my system. It just stop at the boot screen showing after the network connection. Doesn't allow me to type in my username and password (in TUI and GUI login). I can login using SSH thou.....is this normal for web server?
« Last Edit: April 17, 2009, 09:04:58 am by hata_ph » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!