[文章作者:张宴 本文版本:v1.0 最后修改:2008.10.06 转载请注明原文链接:http://blog.zyan.cc/read.php/371.htm]

  今天花几分钟写的一个PHP小程序,用途是:无需给程序员开放服务器SSH帐号,只需通过Web浏览器即可从SVN版本库更新代码到Linux服务器的指定目录。如果有需要,可以给这段代码加个密码登录。

  1、假设www、www是Apache或Nginx服务器的用户名和组,/data0/www/是网页文件存放根目录,执行以下shell命令:
sudo -s
/usr/sbin/groupadd www -g 48
/usr/sbin/useradd -u 48 -g www www
mkdir -p /data0/www/
chown -R www:www /data0/www/
su www
cd /data0/www/
/usr/local/bin/svn checkout --username zhangyan --password 123456 http://xxx.xxx.xxx.xxx:8080/svn/web/trunk/


  2、创建文件svn_up.php:

  3、通过浏览器访问svn_up.php,显示以下内容(例):
  U    /data0/www/app/DataTransferService.php
  Updated to revision 561.



Tags: , ,



技术大类 » 其他Unix技术 | 评论(59) | 引用(1) | 阅读(68149)
shz Email
2022-7-20 22:59
Super site! I am Loving it!! Will return once more, Im taking your food additionally, Thanks.  Scam Risk
shzz Email
2022-7-20 23:02
I would also motivate just about every person to save this web page for any favorite assistance to assist posted the appearance.  Scam Risk
shzz Email
2022-8-4 18:36
This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you.  Digital real estate business
shzz Email
2022-8-4 18:39
I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!  Digital real estate business
shzz Email
2022-8-4 18:42
They're produced by the very best degree developers who will be distinguished for your polo dress creating. You'll find polo Ron Lauren inside exclusive array which include particular classes for men, women.  Digital real estate business
shzz Email
2022-8-4 18:45
This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you.  Digital real estate business
shzz Email
2022-8-4 18:58
I read that Post and got it fine and informative. Please share more like that...  Digital real estate business
shzz Email
2022-8-4 19:30
I really enjoy reading and also appreciate your work.  online business
shzz Email
2022-8-4 19:33
I really enjoyed reading this post, big fan. Keep up the good work andplease tell me when can you publish more articles or where can I read more on the subject?  online business
shzz Email
2022-8-4 19:41
A great website with interesting and unique material what else would you need.  online business
shzz Email
2022-8-4 19:44
Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.  online business
shz Email
2022-8-25 22:49
I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post. Hats off to you! The information that you have provided is very helpful.  Rache Rofe
shzz Email
2022-8-25 22:50
Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject!  Matt Clark
shz Email
2022-8-25 22:52
Glad to chat your blog, I seem to be forward to more reliable articles and I think we all wish to thank so many good articles, blog to share with us.  Rache Rofe
shzz Email
2022-8-25 22:54
I must admit that your post is really interesting. I have spent a lot of my spare time reading your content. Thank you a lot!  Matt Clark
shz Email
2022-8-25 22:55
It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I desire to suggest you few interesting things or tips. Perhaps you could write next articles referring to this article. I want to read more things about it!  Stuart Finger
shzz Email
2022-8-25 22:57
Great post! I am actually getting ready to across this information, is very helpful my friend. Also great blog here with all of the valuable information you have. Keep up the good work you are doing here.  Jim Stitt
shz Email
2022-8-25 22:58
It is the intent to provide valuable information and best practices, including an understanding of the regulatory process.  Stuart Finger
shzz Email
2022-8-25 22:59
This is truly an practical and pleasant information for all. Thanks for sharing this to us and more power  Jim Stitt
shz Email
2022-8-25 23:00
I'm happy to see the considerable subtle element here!.  Stuart Finger
分页: 3/3 第一页 上页 1 2 3 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]