php持续集成工具:xinc的安装和配置

来源:互联网 发布:性感淘宝买家秀 编辑:程序博客网 时间:2024/05/17 07:58

1、介绍:xinc是用PHP开发的持续集成工具,它的作用是监听SVN的变化并调用项目部署工具(phing)来部署项目,并有web界面来监控部署状态情况。

2、下载:大家到 http://code.google.com/p/xinc/source/checkout 页面下找到SVN的地址,从这个地址checkout个代码副本后可以直接使用。下载过程中可能会报类似错误:

E:xincwebext-2.0
方法 OPTIONS 失败于 “http://svn.xinc.eu/ext/trunk”: 无法连接到服务器 (http://svn.xinc.eu)
E:xincwebplotkit
方法 OPTIONS 失败于 “http://svn.xinc.eu/plotkit/trunk”: 无法连接到服务器 (http://svn.xinc.eu)
E:xincclassesXincContrib
方法 OPTIONS 失败于 “http://svn.xinc.eu/contrib/trunk”: 无法连接到服务器 (http://svn.xinc.eu)

这是因为缺少了些文件,而这些文件可以从 http://code.google.com/p/xinc/downloads/list页面下载的最新源码包中得到。有人可能会问为什么不直接使用这个源码包呢?因为这个包中的代码也是不好直接使用的,我下载了之后使用不了修改了好多源码才跑通了。所以大家就不要直接使用它了;而是下载解压后 把 /Xinc/Contrib目录复制到下载的SVN副本的xincclassesXinc目录中。把web目录下的ext-2.0目录和plotkit目录复制到代码副本的xincweb目录即可。

3、安装:下载下来后到xinc目录,里面有install.sh脚本,执行即可。执行时有一步步的提示,按照它的要求一路回车就将xinc安装到默认目录了,注意php bin目录,默认值有可能不正确,要自己指定的。以下是我的配置过程:

Directory to install the Xinc PHP files: [/usr/share/php]/data0/htdocs/wwwPath to the PHP binary: [/usr/bin/php]/usr/local/webserver/php/bin/phpDirectory to install the Xinc run script: [/bin]Directory to keep the Xinc config files: [/etc/xinc]Do you want to overwrite/etc/xinc/config.xml? [N / y]yDo you want to overwrite /etc/xinc/plugins.xml? [N / y]yDirectory to keep the Xinc log files: [/var/log]/data1/logsDirectory to install the Xinc start/stop daemon: [/etc/init.d]Do you want to install the SimpleProject example? [y / N]yDirectory to install the Example to: [/etc/xinc/examples]yDirectory to install the Xinc web-application: [/var/www/xinc]/data0/htdocs/www/webxincIP of Xinc web-application: [127.0.0.1]Port of Xinc web-application: [8080]80Xinc installation complete.- Please include /etc/xinc/www.conf in your apache virtual hosts.- Please enable mod-rewrite.

xinc提供了基于EXT-JS实现的web界面,界面的配置请参考:xinc中web界面配置分享

4、配置:安装好xinc后就是配置,如果是默认配置的话在/etc/xinc/conf.d/目录下有xml文件的,这些文件就是xinc部署项目的配置文件,一个项目一个文件,xinc会固定时间扫描这个目录执行里面的文件。这样我们的项目就一个个的按时部署上去了。以后会给出个配置示例的。
5、启动:配置完成后执行 service xinc start ,没有错误就成功了。不过这个时候一定会报错的,因为你的phing配置文件应该还没有的,所以还是先不要启动了。当phing那边也准备就绪了再启动,如果仍然报错,哈哈……把错误就贴出来吧。

原创粉丝点击