OESF Portables Forum
Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: burao on January 07, 2005, 09:28:52 am
-
I have Apache/PHP/Mysql running on my 860 now as root.
The problem is that when I power down, the root user is killed.
I want to do development on my Z, but it is a pain to shut down the
process all the time.
I think what I want is a way to run Apache (and then Mysql) from
zaurus instead of root. Anyone know how?
It would also be nice to run both apps from an icon or possibly
start both during boot up.
Any help would be appreciated.
-
Here is some info that I posted about running MySQL under the userid daemon instead of root. https://www.oesf.org/forums/inde...c=9413&hl=mysql (https://www.oesf.org/forums/index.php?showtopic=9413&hl=mysql)
As far as a start up script, I have ones that "toggle" the application (start it if it's not running or shut it down if it is running). They use the Opie-Sh package to display a message box and they need the sudo package to allow the user zaurus start the apps.
You can put them in /home/QtPalmtop/bin/ and then create a new icon on one of your tabs using the Tab Manager. Just point it to the script that you saved.
Here's the one for Apache:
#!/bin/bash
#--------------------------------
# Toggle Apache on/off.
# 2003-06-07 - r.l. stoner
#--------------------------------
(
checkit=`ps -ef | grep http | grep -v grep | wc -l`
#echo $checkit
if [ $checkit -ne 0 ]
then
echo "Stopping Apache ..."
sudo killall httpd
opie-sh -m -w -t "Apache Toggled" -M "Apache has been terminated." -g
exit 0
else
echo "Starting Apache ..."
sudo /home/www/bin/httpd
opie-sh -m -I -t "Apache Toggled" -M "Apache has been started." -g
exit 0
fi
) > /tmp/doapach.log
#--- end of script ---#
And the one for MySQL:
#!/bin/bash
#--------------------------------
# Toggle MySQL on/off.
# 2003-06-23 - r.l. stoner
#--------------------------------
(
checkit=`ps -ef | grep mysql | grep -v grep | wc -l`
#echo $checkit
if [ $checkit -ne 0 ]
then
echo "Stopping MySQL ..."
sudo mysqlstop
opie-sh -m -w -t "MySQL Toggled" -M "MySQL has been terminated." -g
exit 0
else
echo "Starting MySQL ..."
sudo mysqlstart
opie-sh -m -I -t "MySQL Toggled" -M "MySQL has been started." -g
exit 0
fi
) > /tmp/domysql.log
#--- end of script ---#
-
Tehas,
Thank you for your reply. This sounds like what I want.
I am not sure about where best to get Opie-Sh.
Could you point me to a URL?
Also, what is the sudo package? If you send me a URL that explains it,
I will find out for myself.
Thanks again
-
The Opie-sh is on the Zaurus Software Index.
Opie-sh (http://www.killefiz.de/zaurus/showdetail.php?app=215)
sudo is also on the ZSI but the link is dead. You can get it off of te ZUG.
sudo on ZaurusUserGroup (http://www.zaurususergroup.com/UpDownload+index-req-viewsdownload-sid-22-orderby-titleD.phtml)
Sudo allows you to run things that would ordinarily require root to do. With sudo, you don't need to su to root and supply a password. On the ZUG download page, they have a link to the sudo homepage for a better description of what it does and how to configure it.