Page 1 of 5
webenvironment 0.4 (webserver,php,mysql,phpmyadmin)
Posted: Tue 31 Jan 2006, 10:38
by costal martignier
the first beta is available
i'm really proud to introduce to you the puppy webenvironment...
it contain the following software:
you can
donwload the file here
this pup will install everything automagicaly. you need first uninstall an old testversion with the dotpup.
have fun
regards
costal
next steps: (in no special order)
- run mysql and lighttpd under normal user (perhaps spot)
- add possibility to load automaticly cotent of webfolder an databse on startup (good for livecd's)
- ....
changelog:
webenv-0.4:
- fixed shutdown problems
- size:
~5MB
webenv-0.3:
- fixed all bugs from preview version (thx to MU for reporting)
- added a highly size optimized version of phpMyAdmin
- finished upgrade/uninstall script
- created a cool default webpage with tons of informations
- size:
~5MB
webenv-0.2:
- fixed all bugs from preview version (thx to raffy and MU for reporting)
- avoid reboot after install (a must, because we're running not winblows)
- added upgrade/uninstall script
- fresh compiled php and mysql and added correct default options
- size:
4.1MB
webenv-0.1:
- initial alpha testrelease
- mysql 4.1.16
- php 4.4.2
- lighttpd 1.4.9
- gmysqlcc 0.2.5
- size:
4.3MB
Posted: Tue 31 Jan 2006, 17:00
by MU
Fine
I ran it on a frugal install (Puppy starts from Harddisk, but no "real" Harddisk-install, just the files copied from CD).
PHP works, I did not check mySQL (but "ps" shows, that the mySQL-daemon is running).
One bug:
in /etc/rc.d/rc.webenv
The line
Code: Select all
/bin/ps | grep "lighttpd"> /dev/null 2>&1
should be
Code: Select all
/bin/ps | grep "lighttpd" |grep -v grep> /dev/null 2>&1
If it is not, it randomly fails, because it finds:
Code: Select all
# /bin/ps | grep "lighttpd"
23630 root 592 S grep lighttpd
So it believes, the server is running, but it is just the grep-entry it found in the process-list.
Very nice
Mark
First Try
Posted: Tue 31 Jan 2006, 17:07
by raffy
Hi, thanks for this super-compact server
My test environment is 1.0.7
- in hard disk install, all is well until i connect to mysql:
"Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)" -- with or without password in MySQL, this happens.
- in live CD run, I had to do another restart for index.php to load.
Thanks.
Posted: Tue 31 Jan 2006, 17:07
by MU
Code: Select all
# gmysqlcc
gmysqlcc: error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file or directory
# ldconfig
# gmysqlcc
Error file open : No such file or directory. -> read default configuration
Destruction Server window - nbrWnd : 1
Changed !
The database is test
Changed !
The database is mysql
Works, after I ran "ldconfig".
Mark
Posted: Tue 31 Jan 2006, 17:10
by MU
Raffy, you don't need to restart.
Use this script to start the Webserver, until the Dotpup is updated:
run-lighttpd
Code: Select all
#!/bin/bash
# start the webserver lighttpd if it is not allready running
# TODO: create a good default config
/bin/ps | grep "lighttpd" |grep -v grep
/bin/ps | grep "lighttpd" |grep -v grep> /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "start webserver with php"
/usr/local/bin/lighttpd -f /etc/lighttpd.conf &
fi
echo "webenvironment startet"
Mark
Posted: Tue 31 Jan 2006, 17:16
by costal martignier
@raffy,
how you connect to the server?
@mu
# gmysqlcc
gmysqlcc: error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file or directory
this is rather strange, because i added the ldconfig binary to the .sfs an run it on reboot in the rc.webenv script...
have no idea why it works here in all my testcases??
do you have an idea?
regards
costal
Posted: Tue 31 Jan 2006, 17:22
by costal martignier
MU wrote:Raffy, you don't need to restart.
Use this script to start the Webserver, until the Dotpup is updated:
run-lighttpd
Code: Select all
#!/bin/bash
# start the webserver lighttpd if it is not allready running
# TODO: create a good default config
/bin/ps | grep "lighttpd" |grep -v grep
/bin/ps | grep "lighttpd" |grep -v grep> /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "start webserver with php"
/usr/local/bin/lighttpd -f /etc/lighttpd.conf &
fi
echo "webenvironment startet"
Mark
thx, but i think i fix this otherwise, lighttpd is also creating a .pid file, i check for this...
thx and regards
costal
Posted: Tue 31 Jan 2006, 17:36
by MU
I already had /usr/local/lib in /etc/ld.so.conf
So your script did not run ldconfig.
Change:
Code: Select all
# check if ld.so.conf is allready upgraded, if not add entry and run ldconfig
cat /etc/ld.so.conf | grep "/usr/local/lib" > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo -e "\n/usr/local/lib\n" >> /etc/ld.so.conf
/usr/local/sbin/ldconfig
echo "added /usr/local/lib to /etc/ld.so.conf and updatet with ldconfig"
fi
to
Code: Select all
# check if ld.so.conf is allready upgraded, if not add entry and run ldconfig
cat /etc/ld.so.conf | grep "/usr/local/lib" > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo -e "\n/usr/local/lib\n" >> /etc/ld.so.conf
echo "added /usr/local/lib to /etc/ld.so.conf"
fi
/usr/local/sbin/ldconfig
echo "updated with ldconfig"
Mark
Posted: Tue 31 Jan 2006, 17:43
by costal martignier
MU wrote:I already had /usr/local/lib in /etc/ld.so.conf
ok thx, i missed this possibility.
i changed the code to the following:
Code: Select all
# check if ld.so.conf is allready upgraded, if not add entry and run ldconfig
cat /etc/ld.so.conf | grep "/usr/local/lib" > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo -e "\n/usr/local/lib\n" >> /etc/ld.so.conf
echo "added /usr/local/lib to /etc/ld.so.conf"
else
/usr/local/sbin/ldconfig
echo "updated with ldconfig"
fi
many thx and regards
costal
Posted: Tue 31 Jan 2006, 17:46
by MU
nono, your last change won't work.
Because it does not run ldconfig, when the first condition is met.
I think you must run ldconfig in any case.
Mark
Posted: Tue 31 Jan 2006, 17:51
by costal martignier
uuups, ok you're right
shame on me, but this is my very first bashscript
i like to optimize things, so i don't want to run ldconfig even if it is not needed..
u see?
but easy, it dosen't cost many [time|energy|money] to run it on each boot
i correct this ASAP.
thx and regards
costal
Socket
Posted: Tue 31 Jan 2006, 18:36
by raffy
Socket is in
/var/run/mysqld/mysqld.sock
but why this error?
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
The connection is done via mysql_connect() in php. Could it be the php.ini that has the problem ???
(Sorry, I have tried PHP-MySQL linking only once in the past
)
Re: Socket
Posted: Tue 31 Jan 2006, 18:40
by costal martignier
raffy wrote:Socket is in
/var/run/mysqld/mysqld.sock
but why this error?
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
The connection is done via mysql_connect() in php. Could it be the php.ini that has the problem ???
hmmm, yes it could, i haven't created a php configuration yet, and i think the default path is normaly /tmp/mysql.sock...
i check this and try to fix that...
thx and regards
costal
Posted: Tue 31 Jan 2006, 18:47
by costal martignier
ooooohh noooo!!!
it seems like i must recomile php, because this option is not changeble in php.ini
grrrrrrrrr
edit:
ok this is not correct, its changeble in php.ini, but i recompile it anyway...
Posted: Wed 01 Feb 2006, 09:38
by costal martignier
new version with many bugfixes and also new features...
please test as mutch as possible, on many puppyversions...
i've only tested on 1.07 hd install and usbstick install...
please report if it works on older puppy versions (unionfs must be supported)
you can find the new version in the first post of this thread, including changelog and todolist
regards
costal
Like a charm
Posted: Wed 01 Feb 2006, 12:16
by raffy
Works like a charm - I give it 5 winks rating:
In EmptyCrust option 4 (full RAM install), the server runs like a lightning in Dillo/Pentium II. I will keep using this and let you know if there are further suggestions.
A full-speed LLMP server in 41 MB - impossible but true
Thanks a lot!!!
Posted: Wed 01 Feb 2006, 12:42
by costal martignier
hey cool, glad to hear it's working for you...
this evening i will release version 0.3, it has additional bugfixes and a highliy sizeoptimzed phpmyadmin. normaly it takles more then 11MB, i shrinked it to 3MB and in the usr_webenv.sfs it takes only 500KB...
so the toal size of the pup is 4.7MB
i'm happy
best regards
costal
Even better
Posted: Thu 02 Feb 2006, 14:38
by _raffy_
That will be even better - many people (including me) are already accustomed to PHPmyAdmin. Thanks again
I have a question, though. If someone has built a website in the webserver, will a CD remaster be able to save and restore upon boot-up all the web pages and database content?
Posted: Thu 02 Feb 2006, 14:46
by costal martignier
please see the todo list in the first post of this thread!
because the web-, database folders and the usr_webenv.sfs are located in the /root folder they get IMHO included in the new puppy automagicaly...
i dont know if the startupscripts in /etc/rc.d and the config files in /etc will also go to the new remaster, perhaps someone other can clarify that!
in the endversion you should be able to do what you want
regards
costal
Posted: Thu 02 Feb 2006, 21:36
by costal martignier
ok, the next version is finished, please see the first post in this thread as usual...
i'm considering the package now as beta, and hoping really that some more of you giv it a chance and test it on as mutch possible computer and puppyenvironments as possible!
with the next release i want to give out the first final package...
see also the changelog in the first thread...
if your browser doesn't start after installing, tell it to me, and also start it and point it to
http://localhost there is now a nice little default webpage desfibing the whole package...
please excuse the many gramar failures in it...
regards
costal