gerrit linux下安装
来源:互联网 发布:impress.js教程 编辑:程序博客网 时间:2024/05/22 01:58
下载软件:
git-1.8.1.5.tar.gz
http://code.google.com/p/git-core/downloads/detail?name=git-1.8.1.5.tar.gz&can=2&q=
httpd-2.0.64.tar.gz
http://mirror.bit.edu.cn/apache//httpd/
gerrit-full-2.5.2.war
软件都拷贝到
/usr/soft目录下
安装git
[root@GBase git-1.8.1.5]# tar -xzf git-1.8.1.5.tar.gz
[root@GBase git-1.8.1.5]# cd git-1.8.1.5
[root@GBase git-1.8.1.5]# make prefix=/usr/local all
[root@GBase git-1.8.1.5]# make prefix=/usr/local install
安装完成后输入git,有反馈即成功
安装apache服务
[root@GBase apache]# tar -xvzf httpd-2.0.64.tar.gz
[root@GBase apache]# cd httpd-2.0.64
[root@GBase apache]# ./configure --prefix=/usr/soft/apache --enable-mods-shared='proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_rewrite'
[root@GBase apache]# make
[root@GBase apache]# make install
安装完成
查看80端口是否被占用,没被占用直接使用,占用修改端口
netstat -tln | grep 80
netstat -tln | grep 8080
编辑apache配置文件
vi httpd.conf
在末尾添加如下配置
<VirtualHost *:80>
ServerName Gitserver
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *:80>
Order deny,allow
Allow from all
</Proxy>
<Location /login/>
AuthType Basic
AuthName "Gerrit Code Review"
Require valid-user
AuthUserFile /usr/soft/git/htpasswd
</Location>
ProxyPass / http://10.14.132.204:9080/
ProxyPassReverse / http://10.14.132.204:9080/
</VirtualHost>
安装gerrit
java -jar gerrit.war init -d /usr/soft/gerrit
[root@GBase soft]# java -jar gerrit-full-2.5.2.war init -d /usr/soft/gerrit
*** Gerrit Code Review 2.5.2
***
Create '/usr/soft/gerrit' [Y/n]? Y
*** Git Repositories
***
Location of Git repositories [git]:
*** SQL Database
***
Database server type [H2/?]:
*** User Authentication
***
Authentication method [OPENID/?]: http
Get username from custom HTTP header [y/N]?
SSO logout URL : logout
*** Email Delivery
***
SMTP server hostname [localhost]:
SMTP server port [(default)]:
SMTP encryption [NONE/?]:
SMTP username :
*** Container Process
***
Run as [root]:
Java runtime [/usr/local/jdk1.6.0_38/jre]:
Copy gerrit.war to /usr/soft/gerrit/bin/gerrit.war [Y/n]?
Copying gerrit.war to /usr/soft/gerrit/bin/gerrit.war
*** SSH Daemon
***
Listen on address [*]:
Listen on port [29418]:
Gerrit Code Review is not shipped with Bouncy Castle Crypto v144
If available, Gerrit can take advantage of features
in the library, but will also function without it.
Download and install it now [Y/n]? n
Generating SSH host key ... rsa(simple)... done
*** HTTP Daemon
***
Behind reverse proxy [y/N]?
Use SSL (https://) [y/N]?
Listen on address [*]:
Listen on port [8080]: 9080
*** Plugins
***
Prompt to install core plugins [y/N]?
Initialized /usr/soft/gerrit
Executing /usr/soft/gerrit/bin/gerrit.sh start
Starting Gerrit Code Review: OK
Waiting for server to start ... OK
Opening browser ...
下一步停止gerrit服务,然后进行配置
可以通过命令[root@GBase bin]# ps -ef | grep gerrit 查看到已经运行的gerrit进程
[root@GBase bin]# ./gerrit.sh stop
** ERROR: GERRIT_SITE not set
遇到上面的错误信息,编辑
gerrit.sh
添加
GERRIT_SITE=/usr/soft/gerrit
编辑gerrit.config
[root@GBase etc]# vi gerrit.config
[gerrit]
basePath = git
canonicalWebUrl = http://10.14.132.204:9080/
[database]
type = H2
database = db/ReviewDB
[auth]
type = HTTP
logoutUrl = http://aa:aa@10.14.132.204/
[sendemail]
smtpServer = smtp.163.com
smtpUser = manager@163.com
smtpPass = manager
from = manager@163.com
[container]
user = root
javaHome = /usr/local/jdk1.6.0_38/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://10.14.132.204:9080/
[cache]
directory = cache
apache启动和停止
启动apache2:
[root@GBase bin]# ./apachectl start
停止apache2:
[root@GBase bin]# ./apachectl stop
设定apache和gerrit自动启动
编辑 /etc/rc.d/rc.local
将执行命令添加到这个文件中
/usr/soft/apache/bin/apachectl start
/usr/soft/gerrit/bin/gerrit.sh start
- gerrit linux下安装
- [Linux][gerrit]安装gerrit总结
- MacOS 下安装Gerrit
- gerrit服务端安装-linux(centos)
- gerrit 在win7下安装总结
- gerrit 在win7下安装总结
- gerrit 在win7下安装总结
- linux下自动启动apache和gerrit
- Gerrit安装
- 安装 gerrit
- 安装gerrit
- ubuntu 环境下 gerrit 代码审查服务器的安装
- redhat 环境下 gerrit 代码审查服务器的安装
- gerrit配置安装
- 安装gerrit+http
- Ubuntu gerrit 安装配置
- gerrit 安装笔记
- Gerrit简易安装入门
- YII快速入门教程13
- 在O(n)时间复杂度内找出数组中的众数
- LINUX中,创建文件夹、文件命令及清除命令
- Android网络优化之HttpClient
- Please use Android Tools > Fix Project Properties
- gerrit linux下安装
- word在线编辑。生成图片。截图。合图。
- Parallel execution 并行查询的性能测试(1)
- Storm框架使用详解 搭建篇
- cumsum cumprod prod函数的用法
- Yii快速入门教程14
- C++初始化列表问题,类中有一个对象类型的数组成员变量,在初始化列表中初始化时报错“[]”操作符语法错误
- Oracle的一些记录
- Parallel execution 并行查询的性能测试(2)