<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[运维进行时]]></title> 
<link>https://blog.liuts.com/index.php</link> 
<description><![CDATA[互联网运维与架构]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[运维进行时]]></copyright>
<item>
<link>https://blog.liuts.com/post/103/</link>
<title><![CDATA[配制lighttpd+fastcgi启动脚本]]></title> 
<author>root &lt;admin@yourname.com&gt;</author>
<category><![CDATA[Lighttpd]]></category>
<pubDate>Thu, 22 May 2008 08:48:12 +0000</pubDate> 
<guid>https://blog.liuts.com/post/103/</guid> 
<description>
<![CDATA[ 
	<strong>一、vi /etc/init.d/webserver</strong><br/><textarea name="code" class="shell" rows="15" cols="100">
#!/bin/bash
# chkconfig: 35 95 1
# description: script to start/stop/restart webserver

case $1 in
start)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd /www/webserver && /usr/local/bin/python ./manage.py runfcgi method=threaded host=127.0.0.1 port=3033
;;
stop)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;killall lighttpd
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kill -9 `ps -ef&#124;grep manage.py&#124;grep -v grep&#124;awk &#123;'print $2'&#125;`
;;
restart)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;killall lighttpd
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kill -9 `ps -ef&#124;grep manage.py&#124;grep -v grep&#124;awk &#123;'print $2'&#125;`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sleep 1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd /www/webserver && /usr/local/bin/python ./manage.py runfcgi method=threaded host=127.0.0.1 port=3033
;;
*)
echo "Usage: $0 (start&#124;stop&#124;restart)"
;;
esac
</textarea><br/><strong>二、配置成服务</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">chmod 775 webserver<br/>chkconfig --add webserver<br/>service webserver restart</div></div><br/>Tags - <a href="https://blog.liuts.com/tags/lighttpd/" rel="tag">lighttpd</a> , <a href="https://blog.liuts.com/tags/fast-cgi/" rel="tag">fast-cgi</a> , <a href="https://blog.liuts.com/tags/%25E5%2590%25AF%25E5%258A%25A8%25E8%2584%259A%25E6%259C%25AC/" rel="tag">启动脚本</a>
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/103/#blogcomment2461</link>
<title><![CDATA[[评论] 配制lighttpd+fastcgi启动脚本]]></title> 
<author>变压器 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sat, 09 Aug 2014 06:42:26 +0000</pubDate> 
<guid>https://blog.liuts.com/post/103/#blogcomment2461</guid> 
<description>
<![CDATA[ 
	路过
]]>
</description>
</item>
</channel>
</rss>