gerrit install

  1. server os

這邊其實可以有好幾個方案,一个是直接安装ESXI,然后去install各种版本,各部分的OS。

但是因为当前的机器内存不足,所以我这边直接安装了OS

[[email protected]
~]# uname -a

Linux
rsgit 4.5.6-200.fc23.x86_64 #1 SMP Wed Jun 1 21:28:20 UTC 2016 x86_64 x86_64
x86_64 GNU/Linux

[[email protected]
~]# cat /etc/redhat-release

Fedora
release 23 (Twenty Three)

[[email protected]
~]#

为什么选着fedora,本来是准备使用centos6.5的,但是考虑到这台机器是直接连接网络的,fedora的yum 资源以及kernel 版本比较新

当然这边安装的时候,是installserver 版,全部安装。

目前光盘放在机器的光驱之中

  1. Instal
        package

其实gerrit server 需要的package 真不多,如果比较简单的安装,只需要安装 apache,java , php 就over了,根本不需要操心。

好了,我们必须不是最简单的安装,真是的只是多了一个mysql,当然安装的时候为了省心,我们还是将python,perl 一并安装了。

需要说明的是fedora23的mysql 已经变成了MariaDB,据说是原作者放弃oracle之后的开源作品,比前者好用。命令几乎一样,当然我们gerrit是可以使用的。

直接进行了:

# yum update (这一步需要执行的,否则会出现dependcence error)

# yum
install *jdk*

# yum install php,mysql,perl,apache,python

好了,就是这么简单,不需要自己搭yum server,不需自己上网download一堆rpm list, 有网就是这么方便

3.  installgerrit

gerrit 这厮他的document 写的不过,按照他的步骤来,一步两步三步就结束了。 opensource doc 写的不错的真心不过,一般的看的云里雾里,虽然这个我英文不行就,但是还是勉强能看懂了。

https://www.gerritcodereview.com/  去下载gerrit吧,当然有很多人需要翻墙才能下载的,幸好公司有代理,否则真是麻烦

小弟下载的版本是:gerrit-2.12.2.war

如果是准备使用mysql的,前面先准备一下mysql的 USER
& DATABASES

MariaDB
[(none)]> CREATE DATABASE wndb;

MariaDB [(none)]> CREATE USER ‘admin‘@‘localhost‘ IDENTIFIED BY ‘XX‘;

MariaDB
[(none)]> GRANT ALL ON wndb.* TO ‘admin‘@‘localhost‘;

MariaDB
[(none)]> FLUSH PRIVILEGES;

二话不说直接安装:java -jar gerrit-2.12.2.war init -d gerirt (这个 -d 后面的gerrit可以自己随便其名称的)

开始按照要求来安装: 安装要求回车即可,这样就完了?是的,就是这么简单。

当然如果是需要ldap 认证的,请先准备好ldap 的server name,记忆DC,OU的内容。

  1. 安装gitweb

这个就更加简单了(凌乱)之前以为很复杂至少,得弄几天,看上几十页的doc才行。事实是只要两行命令就over了。。。

#yum
isntall -y gitweb

#git config --file /usr/local/gerrit-site/etc/gerrit.config
gitweb.cgi /var/www/git/gitweb.cgi

#git config --file
/usr/local/gerrit-site/etc/gerrit.config --unset gitweb.url

没了,这样就结束了!

利用 gerrit/bin/gerrit.sh start 可以启动

  1. 后续工作

/etc/rc.d/rc.local 中 加上 gerrit.sh 启动脚本(开机启动)

/etc/rc.d/rc.local 中加上 iptables -F (防止web 不能登录)

最终是验证结果了,指令如下:

ssh
-p 29418 [email protected]  gerrit
flush-caches

ssh
-p 29418 [email protected]  gerrit create-project RL1114

ssh
-p 29418 [email protected]

git
clone ssh://[email protected]:29418/RL1234.git

git
config --global user.name "guiqiu_zhang"

git
config --global user.email "[email protected]"

git
push origin master

  1. 配置文件和源文件保存备份:

/xxx/xxx/xx

时间: 2024-08-06 05:21:06

gerrit install的相关文章

openStack CI(Continuous interaction)/CD(Continuous delivery) Gerrit/Jenkins安装及集成,插件配置

preFace: CI/CD practice part contains the following action items and fields of expertise: Gerrit installation and basic configuration? Jenkins installation and basic configuration? Jenkins and Gerrit interaction (Gerrit plugin setup for Jenkins)? Bri

Gerrit与Jenkins/Hudson CI服务器搭建

配置Git 很多系统(例如Linux)已经默认提供了Git,在Git主页也可以找到安装程序.对于Windows用户,最好的选择是MsysGit.请注意,如果你安装了Apple Developer Tools (for Xcode 4),那么其中已经自带Git二进制包了.如果遇到了问题,help.github.com中可以找到很多非常出色的指南. 因为所有的Git提交都带有作者和电子邮件地址,如果你还没有设置过这些内容,请执行以下命令进行配置: $ git config --global user

Gerrit安装配置

1.准备安装环境 安装JDK 下载jdk的tar包,解压缩,并修改/etc/profile,配置环境变量,这里不再说明 安装git gerrit需要git环境,直接用yum安装 #yum -y install git 安装httpd httpd主要作为反向代理使用,并设置账号密码访问 #yum -y install httpd 创建gerrit安装目录 #mkdir   /home/gerrit2 2.下载Gerrit安装包 下载Gerrit的war包,通常包名为gerrit-xxx.war,x

gerrit调试

java -jar gerrit-2.8.war init -d /etc/gerrit/ *** Gerrit Code Review 2.8*** Create '/etc/gerrit'           [Y/n]? y *** Git Repositories*** Location of Git repositories   [git]: *** SQL Database*** Database server type           [h2]: mysql Gerrit Co

Gerrit安装及复制到Gitlab

# 直接下载jar文件后 java -jar gerrit-2.14.1.war init -d /opt/gerrit # 安装复制插件 unzip gerrit-2.14.1.war ssh -p 29418 [email protected] gerrit plugin install -n replication.jar - < ./WEB-INF/plugins/replication.jar # 如果安装时提示权限问题,要在gerrit.config 上添加 allowRemoteA

如何搭建gerrit开源code review工具

搭建环境:Ubuntu 14.04 一.环境准备 1.Java环境 gerrit依赖,用于安装gerrit环境. 下载:jdk-7u79-linux-x64.tar.gz http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html 安装:sudo tar zxvf ./jdk-7u79-linux-x64.tar.gz -C /opt 配置:vim ~/.bashrc export JAV

cygwin install git

Installation with Cygwin If you're comfortable with Cygwin, then use it to install git, ssh, wget and python. Install pip, and use pip to install git-review: $ wget http://peak.telecommunity.com/dist/ez_setup.py $ python ez_setup.py $ easy_install pi

如何搭建基于ldap和mysql的gerrit服务

一.搭建数据库以及配置数据库 1.使用yum install mysql-server安装mysql 2.mysqladmin -u root password archermind(第一次设置密码).设置密码 3.修改 vi /etc/my.cnf 增加[client]项以及修改[mysqld]项.具体如下所示: [client] #password       = your_password port            = 3306 socket          = /var/lib/

Git+Gerrit学习搭建笔记

    Git是目前最流行的分布式版本控制系统,而Gerrit是一种免费.开放源代码的代码审查软件,使用网页界面.利用浏览器,同一个团队的软件程序员,可以相互审阅彼此修改后的程序代码,决定是否能够提交,退回或者继续修改.它使用Git作为底层版本控制系统.趁着做测试的机会,简单学习了解一下Git+Gerrit是如何搭建使用的,顺便简单做个小笔记.      系统环境:Ubuntu12.04 Server 64 安装Git $sudo su -           ##切换到root账户环境下(个人