|
发表于 2009-6-22 20:08:04
|
显示全部楼层
回复 #4 guihuo 的帖子
《更新FAH简介和教程等资料, 需要热心志愿者和高手们的参与》
(二)基于Ubuntu V9.04 Linux 平台下SMP Client 教程及注意问题,如何优化
现有参考:http://folding.stanford.edu/English/LinSMPGuide
这个英文链接页面里有设置成服务的说明
How to start the linux SMP client as a service
Note: Adding the client as a service in Linux depends on which distribution you are using. The instructions below should work for the majority of distributions available in the market. If nothing works, you might need to do some research to find out what your distribution needs to install as a service.
Do not change accounts or change directory location then create a script named folding by pasting the following commands:
echo "# chkconfig: 345 93 14" > ./folding
echo "# description: will start FAH client as a service" >> ./folding
echo "su - $USER -c \"cd $PWD; ./fah6 -smp -verbosity 9 < /dev/null >
/dev/null 2>&1 &\"" >> ./folding
chmod +x ./folding
Note: In the following steps, replace [fahdir] with the value you saw on screen during the previous installation steps (don't include the brackets).
To mark down where you installed the FAH client just run:
echo "[fahdir] = $PWD"
Note: All the following steps need root privileges to be carried out successfully.
For Debian-based distributions run:
sudo cp [fahdir]/folding /etc/init.d/
For other distributions run:
su - -c "cp [fahdir]/folding /etc/init.d/"
Note: If you installed the client under root user account, do this instead :
echo "# chkconfig: 345 93 14" > ./folding
echo "# description: will start FAH client as a service" >> ./folding
echo "cd $PWD; ./fah6 -smp -verbosity 9 < /dev/null > /dev/null 2>&1 &" >>
/etc/init.d/folding
chmod +x /etc/init.d/folding
Last step is to register the folding service.
For Debian-based distributions run:
sudo update-rc.d folding defaults
For other distributions run:
su - -c "chkconfig --add folding"
That's all so reboot the computer to make the new script start the client. To check if it is working fine, just go to your folding folder and open fahlog.txt or run:
tail -f [fahdir]/FAHlog.txt |
|