unable to install lighttpd

Added by tapas_mishra over 3 years ago

I have followed all the steps exactly as mentioned on your documentation.
http://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource
I logged in as Root on a Ubuntu system
and then
cd /opt
svn checkout svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x/
cd lighttpd-1.4.x
./autogen.sh
./configure
make
make install

lighttpd_step1.txt Magnifier - ./configure (11.4 KB)

lighttpd_step2.txt Magnifier - make (3.7 KB)

lighttpd_step3.txt Magnifier - make install (48.3 KB)


Replies (11)

RE: unable to install lighttpd - Added by crushmaster over 3 years ago

You have to install the init script manually. Take a look at http://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource#Init-script again. Maybe you have to change the path to your lighty installation in the init file.

But better not build software as root! Run these commands as a non-root user
./autogen.sh
./configure
make
or use a chroot environment. Only "make install" needs root privileges.

RE: unable to install lighttpd - Added by tapas_mishra over 3 years ago

I have tried a script given here
http://redmine.lighttpd.net/projects/lighttpd/wiki/ScriptsUbuntu
and changed the server root to my directory but this has also not worked.

I checked the script
@
#!/bin/sh

USER=lighttpd
GROUP=lighttpd
PATH=/sbin:/bin:/usr/sbin:/usr/bin
LIGHTY_DAEMON=/usr/sbin/lighttpd
LIGHTY_OPTS="-f /etc/lighttpd/lighttpd.conf"
LIGHTY_NAME=lighttpd
LIGHTY_PIDFILE=/var/run/$LIGHTY_NAME.pid
SCRIPTNAME=/etc/init.d/$LIGHTY_NAME
SSD="/sbin/start-stop-daemon"
PHP_FCGI_CHILDREN=10
PHP_FCGI_MAX_REQUESTS=1000
RETVAL=0

FCGI_DAEMON="/usr/bin/spawn-fcgi"
FCGI_PROGRAM="/usr/bin/php-cgi"
FCGI_PORT="4050"
FCGI_SOCKET="/tmp/php-fastcgi.sock"
FCGI_PIDFILE="/var/run/spawn-fcgi.pid"

test -x $LIGHTY_DAEMON || exit 0

set -e

export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS

. /lib/lsb/init-functions

case "$1" in
start)
log_daemon_msg "Starting $LIGHTY_NAME"
if ! $SSD --quiet --start --pidfile $LIGHTY_PIDFILE --exec $LIGHTY_DAEMON -- $LIGHTY_OPTS 2> /dev/null; then
log_end_msg 1
else
log_end_msg 0
fi
log_daemon_msg "Starting spawn-fcgi"
if ! $FCGI_DAEMON s $FCGI_SOCKET -f $FCGI_PROGRAM -u $USER -g $GROUP -C $PHP_FCGI_CHILDREN -P $FCGI_PIDFILE; then
log_end_msg 1
else
log_end_msg 0
fi
RETVAL=$?
;;
stop)
log_daemon_msg "Stopping $LIGHTY_NAME"
if $SSD --quiet --stop --oknodo --retry=0/30/KILL/5 --exec $LIGHTY_DAEMON; then
rm -f $LIGHTY_PIDFILE $FCGI_PIDFILE $FCGI_SOCKET
log_end_msg 0
else
log_end_msg 1
fi
log_daemon_msg "Killing all spawn-fcgi processes"
if killall --signal 2 php-cgi > /dev/null 2> /dev/null; then
log_end_msg 0
else
log_end_msg 1
fi
RETVAL=$?
;;
reload)
log_daemon_msg "Reloading $LIGHTY_NAME configuration"
if $SSD --stop --signal 2 --oknodo --quiet --pidfile $LIGHTY_PIDFILE --exec $LIGHTY_DAEMON; then
if $SSD --start --quiet --pidfile $LIGHTY_PIDFILE --exec $LIGHTY_DAEMON -
$LIGHTY_OPTS ; then
log_end_msg 0
else
log_end_msg 1
fi
else
log_end_msg 1
fi
RETVAL=$?
;;
restart|force-reload)
$0 stop
[ -r $LIGHTY_PIDFILE ] && while pidof lighttpd |\
grep -q `cat $LIGHTY_PIDFILE 2>/dev/null` 2>/dev/null ; do sleep 1; done
$0 start
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac

exit $RETVAL
@

I checked spawn-fcgi mentioned above

dpkg -s spawn-fcgi
Package: spawn-fcgi
Status: install ok installed
Priority: extra
Section: web
Installed-Size: 100
Maintainer: Jérémy Lal <>
Architecture: i386
Version: 1.6.3-1~ppa1~karmic1
Depends: libc6 (>= 2.4)
Description: A fastcgi process spawner
spawn-fcgi allows fcgi processes to be separated from web server process : * Easy creation of chmoded socket. * Privilege separation without needing a suid-binary,
or running a server as root. * You can restart your web server and the FastCGI applications
without restarting the others. * You can run them in different chroot()s. * Running your FastCGI applications doesn’t depend on the web server
you are running, which allows for easier testing of/migration
to other web servers.
Homepage: http://redmine.lighttpd.net/projects/spawn-fcgi

but when I type

@root@tapas-laptop:/etc/init.d# spawn-fcgi
The program 'spawn-fcgi' can be found in the following packages: * cherokee * lighttpd
Try: apt-get install <selected package>
-su: spawn-fcgi: command not found
@

What next to do ?

RE: unable to install lighttpd - Added by crushmaster over 3 years ago

You do not have to use spawn-fcgi to run lighty 1.4.x and PHP. The script available at http://redmine.lighttpd.net/projects/lighttpd/wiki/ScriptsUbuntu is not an LSB conforming init script. Try this: http://pastebin.com/7HKKCTmt If you have configured lighty without a prefix (e.g. ./configure --prefix=/path) it will be installed into /usr/local. Take a look at /usr/local/sbin/lighttpd, /usr/local/etc ...

Follow the FastCGI setup as described in the TutorialLighttpdAndPHP and lighty will start all PHP processes for you with this config:

fastcgi.server = ( ".php" => (( 
                     "bin-path" => "/usr/bin/php-cgi",
                     "socket" => "/tmp/php.socket",
                     "max-procs" => 1,
                     "bin-environment" => ( 
                       "PHP_FCGI_CHILDREN" => "8",
                       "PHP_FCGI_MAX_REQUESTS" => "10000" 
                     ),
                     "bin-copy-environment" => (
                       "PATH", "SHELL", "USER" 
                     ),
                     "broken-scriptfilename" => "enable" 
                 )))

RE: unable to install lighttpd - Added by tapas_mishra over 3 years ago

Well I checked the script you gave me
http://pastebin.com/7HKKCTmt
at line no 19 CONFIG_FILE that config file does not exist as the script says to run.
/usr/local/etc is completely blank
I did not used a prefix for ./configure
also what is the difference between LSB thing and this normal one ?
I had Googled LSB.

Also line 29
/etc/default/lighttpd does not exist in my case.

I had done make install will that not work for any thing installed from svn I executed all the commands from

/usr/src/lighttpd-1.4.x
./autogen.sh
./configure
make
make install

also in /etc/init.d/lighttpd was not present do you want to copy it.
The instructions given on the page http://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource
do not seem relevant for svn setups since in /doc there was no script as lighttpd

RE: unable to install lighttpd - Added by crushmaster over 3 years ago

/usr/local/etc is completely blank

Yes that's true for both svn and source-tarball installation. You have to create subfolder and config file /usr/local/etc/lighttpd/lighttpd.conf manually. A sample config file can be found at doc/lighttpd.conf in your source tree. Take this file and modify it for your needs.

also what is the difference between LSB thing and this normal one?

LSB means Linux Standard Base. It's a specification to ensure compatibility among Linux distributions. In this case the init script needs a comment block like that: http://refspecs.freestandards.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/tocsysinit.html

Note that you do not have to use an init script in order to start lighty. It just makes things easier. You can also execute it directly using -f followed by the path to your config

/usr/local/sbin/lighttpd -f /path/to/your.conf

/etc/default/lighttpd does not exist in my case

unimportant

in /doc there was no script as lighttpd

Take a look at lighttpd-1.4.x/doc. There should be a script called rc.lighttpd and some other useful things.

Not all of the parts from InstallFromSource are related to svn install and probably they are outdated.

The init-script that is shipped with the source-tarball is meant to...

You have to read and understand the documentation and configuration options otherwise it would be better to install lighty from your distributions software archive. This can also be used to install config files and build the directory structure.

apt-get install lighttpd

will install the package and create all config files in /etc/lighttpd/. Just backup these files - remove the package
apt-get remove lighttpd

afterwards use the config for your own svn version.

RE: unable to install lighttpd - Added by tapas_mishra over 3 years ago

Thanks for such a detailed reply.I had checked this page now.I will try what you mentioned.

RE: unable to install lighttpd - Added by tapas_mishra over 3 years ago

Ok I tried deleted all the previous lighttpd related files

  1. /usr/local/sbin/lighttpd -f /opt/lighttpd-1.4.x/doc/configlighttpd.conf

I did not got any message.
I created a directory as /var/lighttpd/htdocs and had kept an html page in it.

I was able to install via apt-get this method I want to try to the latest thing so I am asking,

RE: unable to install lighttpd - Added by tapas_mishra over 3 years ago

I did all the steps from starting again.Deleted all the files which lighttpd had installed and repeated the steps as in the first post of mine.
Also I checked

find / -wholename /home -prune -o -name lighttpd -print

I executed the above command after make install
the result was

/usr/local/sbin/lighttpd
/opt/lighttpd-1.4.x/src/lighttpd

Then I created four directories

/var/log/lighttpd
/var/log/lighttpd/htdocs
/var/lighttpd
/etc/lighttpd

The config file after you do make install

is in

/opt/lighttpd-1.4.x/doc/config/lighttpd.conf

The values of lighttpd.conf as above are here
http://pastebin.com/vUwhBzuJ
If you do not wish to go through the complete file
I only changed the following
var.server_root = "/var/lighttpd"

In the orignial file it is
var.server_root = "/srv/www"

Now this time I did
/usr/local/sbin/lighttpd -f /opt/lighttpd-1.4.x/doc/config/lighttpd.conf

There was no message on screen.

Then I copied

cp /opt/lighttpd-1.4.x/src/lighttpd /usr/sbin

to
Also I created a directory
/etc/lighttpd/
and then

cp /opt/lighttpd-1.4.x/doc/config/lighttpd.conf /etc/lighttpd/

and now on terminal did
lighttpd -f /etc/lighttpd/lighttpd.conf

Got following

2010-08-07 11:45:49: (configfile.c.953) opening configfile /etc/lighttpd/modules.conf failed: No such file or directory
2010-08-07 11:45:49: (configfile.c.907) source: /etc/lighttpd/lighttpd.conf line: 88 pos: 12 parser failed somehow near here: (EOL)

after this I did

cp /opt/lighttpd-1.4.x/doc/config/modules.conf /etc/lighttpd/
cp -rp /opt/lighttpd-1.4.x/doc/config/doc/config/conf.d /etc/lighttpd

so the above error was gone.
but still lighttpd did not started as a process
if I try to do
lighttpd start
2010-08-07 16:07:19: (server.c.583) No configuration available. Try using -f option.

and if try

root@tapas-laptop:~# lighttpd -f /etc/lighttpd/lighttpd.conf start

There is no error message but it does not start also.
do I need to do some thing else.
Please tell what else is needed to do to be able to install from svn I will try all the steps.

RE: unable to install lighttpd - Added by tapas_mishra over 3 years ago

Here is the strace log
of
strace /usr/local/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

[[http://pastebin.com/aCWE5ppe]]


execve("/usr/local/sbin/lighttpd", ["/usr/local/sbin/lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"], [/* 18 vars /]) = 0
brk(0) = 0x9ad4000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f04000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=91966, ...}) = 0
mmap2(NULL, 91966, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7eed000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libpcre.so.3", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\17\0\0004\0\0\0\34"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=197892, ...}) = 0
mmap2(NULL, 200788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ebb000
mmap2(0xb7eeb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2f) = 0xb7eeb000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \n\0\0004\0\0\0D"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9676, ...}) = 0
mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7eb7000
mmap2(0xb7eb9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7eb9000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320h\1\0004\0\0\0\344"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1442180, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eb6000
mmap2(NULL, 1451632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d53000
mprotect(0xb7eaf000, 4096, PROT_NONE) = 0
mmap2(0xb7eb0000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15c) = 0xb7eb0000
mmap2(0xb7eb3000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7eb3000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d52000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d526c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
open("/dev/urandom", O_RDONLY) = 3
read(3, "\215p)\232"..., 4) = 4
close(3) = 0
mprotect(0xb7eb0000, 8192, PROT_READ) = 0
mprotect(0xb7eb9000, 4096, PROT_READ) = 0
mprotect(0xb7eeb000, 4096, PROT_READ) = 0
mprotect(0x806f000, 4096, PROT_READ) = 0
mprotect(0xb7f23000, 4096, PROT_READ) = 0
munmap(0xb7eed000, 91966) = 0
brk(0) = 0x9ad4000
brk(0x9af5000) = 0x9af5000
open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfa23d40) = -1 EINVAL (Invalid argument)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f03000
read(3, "\233
\243\366\366kB\311\276\335\6\203\313\2457\336\341\375[\316\262\223\316_\363\326d\377\244@\f\202("..., 4096) = 4096
close(3) = 0
munmap(0xb7f03000, 4096) = 0
time(NULL) = 1281199130
getuid32() = 0
getpid() = 11002
getcwd("/etc/lighttpd"..., 1087) = 14
stat64("/etc/lighttpd/lighttpd.conf", {st_mode=S_IFREG|0644, st_size=9944, ...}) = 0
open("/etc/lighttpd/lighttpd.conf", O_RDONLY|O_LARGEFILE) = 3
mmap2(NULL, 9944, PROT_READ, MAP_SHARED, 3, 0) = 0xb7f01000
close(3) = 0
stat64("/etc/lighttpd/modules.conf", {st_mode=S_IFREG|0644, st_size=3235, ...}) = 0
open("/etc/lighttpd/modules.conf", O_RDONLY|O_LARGEFILE) = 3
mmap2(NULL, 3235, PROT_READ, MAP_SHARED, 3, 0) = 0xb7f00000
close(3) = 0
munmap(0xb7f00000, 3235) = 0
stat64("/etc/lighttpd/conf.d/access_log.conf", {st_mode=S_IFREG|0644, st_size=714, ...}) = 0
open("/etc/lighttpd/conf.d/access_log.conf", O_RDONLY|O_LARGEFILE) = 3
mmap2(NULL, 714, PROT_READ, MAP_SHARED, 3, 0) = 0xb7f00000
close(3) = 0
munmap(0xb7f00000, 714) = 0
stat64("/etc/lighttpd/conf.d/debug.conf", {st_mode=S_IFREG|0644, st_size=967, ...}) = 0
open("/etc/lighttpd/conf.d/debug.conf", O_RDONLY|O_LARGEFILE) = 3
mmap2(NULL, 967, PROT_READ, MAP_SHARED, 3, 0) = 0xb7f00000
close(3) = 0
munmap(0xb7f00000, 967) = 0
stat64("/etc/lighttpd/conf.d/mime.conf", {st_mode=S_IFREG|0644, st_size=2965, ...}) = 0
open("/etc/lighttpd/conf.d/mime.conf", O_RDONLY|O_LARGEFILE) = 3
mmap2(NULL, 2965, PROT_READ, MAP_SHARED, 3, 0) = 0xb7f00000
close(3) = 0
munmap(0xb7f00000, 2965) = 0
stat64("/etc/lighttpd/conf.d/dirlisting.conf", {st_mode=S_IFREG|0644, st_size=1382, ...}) = 0
open("/etc/lighttpd/conf.d/dirlisting.conf", O_RDONLY|O_LARGEFILE) = 3
mmap2(NULL, 1382, PROT_READ, MAP_SHARED, 3, 0) = 0xb7f00000
close(3) = 0
munmap(0xb7f00000, 1382) = 0
munmap(0xb7f01000, 9944) = 0
close(0) = 0
open("/dev/null", O_RDWR|O_LARGEFILE) = 0
close(1) = 0
open("/dev/null", O_RDWR|O_LARGEFILE) = 1
stat64("/var/lighttpd/htdocs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/var/lighttpd/htdocs", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/VAR/LIGHTTPD/HTDOCS", 0xbfa23de4) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mod_indexfile.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\7\0\0004\0\0\0t"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=33671, ...}) = 0
mmap2(NULL, 8280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f01000
mmap2(0xb7f02000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7f02000
close(3) = 0
mprotect(0xb7f02000, 4096, PROT_READ) = 0
open("/usr/local/lib/mod_access.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\6\0\0004\0\0\0\334"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=28424, ...}) = 0
mmap2(NULL, 8256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7efe000
mmap2(0xb7eff000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xb7eff000
close(3) = 0
mprotect(0xb7eff000, 4096, PROT_READ) = 0
open("/usr/local/lib/mod_accesslog.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\r\0\0004\0\0\0L"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=45181, ...}) = 0
mmap2(NULL, 16552, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ef9000
mmap2(0xb7efc000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7efc000
close(3) = 0
mprotect(0xb7efc000, 4096, PROT_READ) = 0
open("/usr/local/lib/mod_dirlisting.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\17\0\0004\0\0\0\360"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=52559, ...}) = 0
mmap2(NULL, 20684, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ef3000
mmap2(0xb7ef7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb7ef7000
close(3) = 0
mprotect(0xb7ef7000, 4096, PROT_READ) = 0
open("/usr/local/lib/mod_staticfile.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\f\0\0004\0\0\0\254"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=42588, ...}) = 0
mmap2(NULL, 16540, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7eee000
mmap2(0xb7ef1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7ef1000
close(3) = 0
mprotect(0xb7ef1000, 4096, PROT_READ) = 0
open("/var/run/lighttpd.pid", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0644) = -1 EEXIST (File exists)
stat64("/var/run/lighttpd.pid", {st_mode=S_IFREG|0644, st_size=6, ...}) = 0
open("/var/run/lighttpd.pid", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0644) = 3
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
setrlimit(RLIMIT_NOFILE, {rlim_cur=2*1024, rlim_max=2*1024}) = 0
socket(PF_FILE, 0x80801 /* SOCK_??? /, 0) = 4
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
socket(PF_FILE, 0x80801 /
SOCK_??? /, 0) = 4
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=513, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eed000
read(4, "# /etc/nsswitch.conf\n#\n# Example "..., 4096) = 513
read(4, ""..., 4096) = 0
close(4) = 0
munmap(0xb7eed000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=91966, ...}) = 0
mmap2(NULL, 91966, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7d3b000
close(4) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libnss_compat.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\16\0\0004\0\0\0\204"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0644, st_size=30436, ...}) = 0
mmap2(NULL, 33356, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7d32000
mmap2(0xb7d39000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x6) = 0xb7d39000
close(4) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libnsl.so.1", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p1\0\0004\0\0\0\234"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0644, st_size=87804, ...}) = 0
mmap2(NULL, 100328, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7d19000
mmap2(0xb7d2e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x14) = 0xb7d2e000
mmap2(0xb7d30000, 6120, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7d30000
close(4) = 0
mprotect(0xb7d2e000, 4096, PROT_READ) = 0
mprotect(0xb7d39000, 4096, PROT_READ) = 0
munmap(0xb7d3b000, 91966) = 0
open("/etc/ld.so.cache", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=91966, ...}) = 0
mmap2(NULL, 91966, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7d3b000
close(4) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libnss_nis.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\31\0\0004\0\0\0\314"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0644, st_size=38444, ...}) = 0
mmap2(NULL, 41532, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7d0e000
mmap2(0xb7d17000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x8) = 0xb7d17000
close(4) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libnss_files.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\31\0\0004\0\0\0\250"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0644, st_size=42504, ...}) = 0
mmap2(NULL, 45720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7d02000
mmap2(0xb7d0c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x9) = 0xb7d0c000
close(4) = 0
mprotect(0xb7d0c000, 4096, PROT_READ) = 0
mprotect(0xb7d17000, 4096, PROT_READ) = 0
munmap(0xb7d3b000, 91966) = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 4
fcntl64(4, F_GETFD) = 0x1 (flags FD_CLOEXEC)
llseek(4, 0, [0], SEEK_CUR) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=1736, ...}) = 0
mmap2(NULL, 1736, PROT_READ, MAP_SHARED, 4, 0) = 0xb7eed000
_llseek(4, 1736, [1736], SEEK_SET) = 0
munmap(0xb7eed000, 1736) = 0
close(4) = 0
socket(PF_FILE, 0x80801 /
SOCK??? /, 0) = 4
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
socket(PF_FILE, 0x80801 /
SOCK_??? */, 0) = 4
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
open("/etc/group", O_RDONLY|O_CLOEXEC) = 4
_llseek(4, 0, [0], SEEK_CUR) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=974, ...}) = 0
mmap2(NULL, 974, PROT_READ, MAP_SHARED, 4, 0) = 0xb7eed000
_llseek(4, 974, [974], SEEK_SET) = 0
munmap(0xb7eed000, 974) = 0
close(4) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(4, {sa_family=AF_INET6, sin6_port=htons(8080), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
listen(4, 1024) = 0
setgid32(1002) = 0
setgroups32(0, []) = 0
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 5
read(5, "65536\n"..., 31) = 6
close(5) = 0
open("/etc/group", O_RDONLY|O_CLOEXEC) = 5
_llseek(5, 0, [0], SEEK_CUR) = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=974, ...}) = 0
mmap2(NULL, 974, PROT_READ, MAP_SHARED, 5, 0) = 0xb7eed000
_llseek(5, 974, [974], SEEK_SET) = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=974, ...}) = 0
munmap(0xb7eed000, 974) = 0
close(5) = 0
setgroups32(1, [1002]) = 0
setuid32(1002) = 0
getgid32() = 1002
getuid32() = 1002
write(3, "11002\n"..., 6) = 6
close(3) = 0
open("/var/log/lighttpd/error.log", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0644) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
open("/etc/localtime", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=265, ...}) = 0
fstat64(5, {st_mode=S_IFREG|0644, st_size=265, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eed000
read(5, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0\0"..., 4096) = 265
_llseek(5, -10, [255], SEEK_CUR) = 0
read(5, "\nIST-5:30\n"..., 4096) = 10
close(5) = 0
munmap(0xb7eed000, 4096) = 0
write(3, "2010-08-07 22:08:50: (log.c.166) "..., 49) = 49
open("/var/log/lighttpd/access.log", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0644) = -1 EACCES (Permission denied)
write(3, "2010-08-07 22:08:50: (log.c.118) "..., 107) = 107
write(3, "2010-08-07 22:08:50: (server.c.93"..., 82) = 82
munmap(0xb7f01000, 8280) = 0
munmap(0xb7efe000, 8256) = 0
munmap(0xb7ef9000, 16552) = 0
munmap(0xb7ef3000, 20684) = 0
munmap(0xb7eee000, 16540) = 0
close(4) = 0
exit_group(-1) = ?

RE: unable to install lighttpd - Added by crushmaster over 3 years ago

Please do not post the strace output twice (Pastebin is actually enough). Lighttpd does not recognize a "start" parameter. Only your init script accepts that. Try lighttpd --help for usage information.

What about

open("/var/log/lighttpd/access.log", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0644) = -1 EACCES (Permission denied)

RE: unable to install lighttpd - Added by tapas_mishra over 3 years ago

Thanks ya that was the problem.
I have written all the steps to install from svn please post these to your how to

it will help others.


cd /opt
svn checkout svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x/
cd lighttpd-1.4.x
./autogen.sh
./configure
make
make install

Then create four directories

/var/log/lighttpd
/var/log/lighttpd/htdocs
/var/lighttpd
/etc/lighttpd

and ls -l for following is

@drwxr-xr-x 2 lighttpd lighttpd 4096 2010-08-07 22:30 /var/log/lighttpd
drwxr-xr-x 2 lighttpd lighttpd 4096 2010-08-07 22:30 /var/lighttpd

drwxr-xr-x 2 lighttpd lighttpd 4096 2010-08-07 22:30 /var/log/lighttpd/htdocs
@

so permissions are correct upto here.
Then
cp /opt/lighttpd-1.4.x/doc/config/lighttpd.conf /etc/lighttpd/

and in /etc/lighttpd/lighttpd.conf
changed the following to

var.server_root = "/srv/www"

to
var.server_root = "/var/lighttpd"

Then

cp /opt/lighttpd-1.4.x/src/lighttpd /usr/sbin

Now I run

lighttpd -D -f /etc/lighttpd/lighttpd.conf

I can see

ps -el | grep lighttpd

lighttpd is running.

(1-11/11)