Gerrit代码审计系统实战-Gerrit 2.15.14版本快速搭建
Gerrit代码审计系统实战-Gerrit 2.15.14版本快速搭建
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
一.Gerrit版本选择
1>.查看Gerrit官网
Gerrit官方地址:https://www.gerritcodereview.com/
2>.查看Gerrit帮助文档
官方地址:https://www.gerritcodereview.com/project-configuration.html
3>.Gerrit版本的选择
虽说主流的Gerrit版本是2.15系列,但官网已经发布了3..0系列,因此,我们在安装和使用Gerrit时候,我们会同时学习Gerrit和Gerrit这两个版本。
关于Gerrit2..x 下载地址::https://www.gerritcodereview.com/2.15.html
关于Gerrit3..x下载地址:https://www.gerritcodereview.com/3.0.html 本片博客主要演示gerrit2..14版本的安装,而gerrit3..0版本的安装可参考我之前的笔记:https://www.cnblogs.com/yinzhengjie/p/11007383.html.
二.安装OpenJDK
1>.查看CentOS的yum源支持的openjdk版本
[root@node201.yinzhengjie.org.cn ~]# yum search jdk
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: ftp.riken.jp
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
===================================================== N/S matched: jdk ======================================================
copy-jdk-configs.noarch : JDKs configuration files copier
java-1.6.-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.6.-openjdk-demo.x86_64 : OpenJDK Demos
java-1.6.-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.6.-openjdk-javadoc.x86_64 : OpenJDK API Documentation
java-1.6.-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.7.-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.7.-openjdk-accessibility.x86_64 : OpenJDK accessibility connector
java-1.7.-openjdk-demo.x86_64 : OpenJDK Demos
java-1.7.-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.-openjdk-headless.x86_64 : The OpenJDK runtime environment without audio and video support
java-1.7.-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.8.-openjdk.i686 : OpenJDK Runtime Environment
java-1.8.-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.8.-openjdk-accessibility.i686 : OpenJDK accessibility connector
java-1.8.-openjdk-accessibility.x86_64 : OpenJDK accessibility connector
java-1.8.-openjdk-accessibility-debug.i686 : OpenJDK accessibility connector for packages with debug on
java-1.8.-openjdk-accessibility-debug.x86_64 : OpenJDK accessibility connector for packages with debug on
java-1.8.-openjdk-debug.i686 : OpenJDK Runtime Environment with full debug on
java-1.8.-openjdk-debug.x86_64 : OpenJDK Runtime Environment with full debug on
java-1.8.-openjdk-demo.i686 : OpenJDK Demos
java-1.8.-openjdk-demo.x86_64 : OpenJDK Demos
java-1.8.-openjdk-demo-debug.i686 : OpenJDK Demos with full debug on
java-1.8.-openjdk-demo-debug.x86_64 : OpenJDK Demos with full debug on
java-1.8.-openjdk-devel.i686 : OpenJDK Development Environment
java-1.8.-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.8.-openjdk-devel-debug.i686 : OpenJDK Development Environment with full debug on
java-1.8.-openjdk-devel-debug.x86_64 : OpenJDK Development Environment with full debug on
java-1.8.-openjdk-headless.i686 : OpenJDK Runtime Environment
java-1.8.-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment
java-1.8.-openjdk-headless-debug.i686 : OpenJDK Runtime Environment with full debug on
java-1.8.-openjdk-headless-debug.x86_64 : OpenJDK Runtime Environment with full debug on
java-1.8.-openjdk-javadoc.noarch : OpenJDK API documentation
java-1.8.-openjdk-javadoc-debug.noarch : OpenJDK API documentation for packages with debug on
java-1.8.-openjdk-javadoc-zip.noarch : OpenJDK API documentation compressed in single archive
java-1.8.-openjdk-javadoc-zip-debug.noarch : OpenJDK API documentation compressed in single archive for packages with
: debug on
java-1.8.-openjdk-src.i686 : OpenJDK Source Bundle
java-1.8.-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.8.-openjdk-src-debug.i686 : OpenJDK Source Bundle for packages with debug on
java-1.8.-openjdk-src-debug.x86_64 : OpenJDK Source Bundle for packages with debug on
java--openjdk.i686 : OpenJDK Runtime Environment
java--openjdk.x86_64 : OpenJDK Runtime Environment
java--openjdk-debug.i686 : OpenJDK Runtime Environment with full debug on
java--openjdk-debug.x86_64 : OpenJDK Runtime Environment with full debug on
java--openjdk-demo.i686 : OpenJDK Demos
java--openjdk-demo.x86_64 : OpenJDK Demos
java--openjdk-demo-debug.i686 : OpenJDK Demos with full debug on
java--openjdk-demo-debug.x86_64 : OpenJDK Demos with full debug on
java--openjdk-devel.i686 : OpenJDK Development Environment
java--openjdk-devel.x86_64 : OpenJDK Development Environment
java--openjdk-devel-debug.i686 : OpenJDK Development Environment with full debug on
java--openjdk-devel-debug.x86_64 : OpenJDK Development Environment with full debug on
java--openjdk-headless.i686 : OpenJDK Headless Runtime Environment
java--openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment
java--openjdk-headless-debug.i686 : OpenJDK Runtime Environment with full debug on
java--openjdk-headless-debug.x86_64 : OpenJDK Runtime Environment with full debug on
java--openjdk-javadoc.i686 : OpenJDK API documentation
java--openjdk-javadoc.x86_64 : OpenJDK API documentation
java--openjdk-javadoc-debug.i686 : OpenJDK API documentation for packages with debug on
java--openjdk-javadoc-debug.x86_64 : OpenJDK API documentation for packages with debug on
java--openjdk-javadoc-zip.i686 : OpenJDK API documentation compressed in single archive
java--openjdk-javadoc-zip.x86_64 : OpenJDK API documentation compressed in single archive
java--openjdk-javadoc-zip-debug.i686 : OpenJDK API documentation compressed in single archive for packages with debug on
java--openjdk-javadoc-zip-debug.x86_64 : OpenJDK API documentation compressed in single archive for packages with debug
: on
java--openjdk-jmods.i686 : JMods for OpenJDK
java--openjdk-jmods.x86_64 : JMods for OpenJDK
java--openjdk-jmods-debug.i686 : JMods for OpenJDK with full debug on
java--openjdk-jmods-debug.x86_64 : JMods for OpenJDK with full debug on
java--openjdk-src.i686 : OpenJDK Source Bundle
java--openjdk-src.x86_64 : OpenJDK Source Bundle
java--openjdk-src-debug.i686 : OpenJDK Source Bundle for packages with debug on
java--openjdk-src-debug.x86_64 : OpenJDK Source Bundle for packages with debug on
java-latest-openjdk.x86_64 : OpenJDK Runtime Environment
java-latest-openjdk-debug.x86_64 : OpenJDK Runtime Environment with full debug on
java-latest-openjdk-demo.x86_64 : OpenJDK Demos
java-latest-openjdk-demo-debug.x86_64 : OpenJDK Demos with full debug on
java-latest-openjdk-devel.x86_64 : OpenJDK Development Environment
java-latest-openjdk-devel-debug.x86_64 : OpenJDK Development Environment with full debug on
java-latest-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment
java-latest-openjdk-headless-debug.x86_64 : OpenJDK Runtime Environment with full debug on
java-latest-openjdk-javadoc.x86_64 : OpenJDK API documentation
java-latest-openjdk-javadoc-debug.x86_64 : OpenJDK API documentation for packages with debug on
java-latest-openjdk-javadoc-zip.x86_64 : OpenJDK API documentation compressed in single archive
java-latest-openjdk-javadoc-zip-debug.x86_64 : OpenJDK API documentation compressed in single archive for packages with
: debug on
java-latest-openjdk-jmods.x86_64 : JMods for OpenJDK
java-latest-openjdk-jmods-debug.x86_64 : JMods for OpenJDK with full debug on
java-latest-openjdk-src.x86_64 : OpenJDK Source Bundle
java-latest-openjdk-src-debug.x86_64 : OpenJDK Source Bundle for packages with debug on
ldapjdk-javadoc.noarch : Javadoc for ldapjdk
icedtea-web.x86_64 : Additional Java components for OpenJDK - Java browser plug-in and Web Start implementation
ldapjdk.noarch : The Mozilla LDAP Java SDK
openprops.noarch : An improved java.util.Properties from OpenJDK Name and summary matches only, use "search all" for everything.
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# yum search jdk
2>.安装OpenJDK1.8
[root@node201.yinzhengjie.org.cn ~]# yum -y install java-1.8.-openjdk-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 8.1 kB ::
* base: mirrors.aliyun.com
* epel: mirrors.yun-idc.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB ::
epel | 5.3 kB ::
extras | 3.4 kB ::
updates | 3.4 kB ::
(/): epel/x86_64/updateinfo | kB ::
(/): epel/x86_64/primary_db | 6.7 MB ::
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.-openjdk-devel.x86_64 :1.8.0.212.b04-.el7_6 will be installed
--> Processing Dependency: java-1.8.-openjdk(x86-) = :1.8.0.212.b04-.el7_6 for package: :java-1.8.-openjdk-devel-1.8.0.212.b04-.el7_6.x86_64
--> Processing Dependency: libjvm.so()(64bit) for package: :java-1.8.-openjdk-devel-1.8.0.212.b04-.el7_6.x86_64
--> Processing Dependency: libjava.so()(64bit) for package: :java-1.8.-openjdk-devel-1.8.0.212.b04-.el7_6.x86_64
--> Running transaction check
---> Package java-1.8.-openjdk.x86_64 :1.8.0.212.b04-.el7_6 will be installed
--> Processing Dependency: xorg-x11-fonts-Type1 for package: :java-1.8.-openjdk-1.8.0.212.b04-.el7_6.x86_64
--> Processing Dependency: libgif.so.()(64bit) for package: :java-1.8.-openjdk-1.8.0.212.b04-.el7_6.x86_64
---> Package java-1.8.-openjdk-headless.x86_64 :1.8.0.212.b04-.el7_6 will be installed
--> Processing Dependency: tzdata-java >= 2015d for package: :java-1.8.-openjdk-headless-1.8.0.212.b04-.el7_6.x86_64
--> Processing Dependency: copy-jdk-configs >= 3.3 for package: :java-1.8.-openjdk-headless-1.8.0.212.b04-.el7_6.x86_64
--> Processing Dependency: pcsc-lite-libs(x86-) for package: :java-1.8.-openjdk-headless-1.8.0.212.b04-.el7_6.x86_64
--> Processing Dependency: lksctp-tools(x86-) for package: :java-1.8.-openjdk-headless-1.8.0.212.b04-.el7_6.x86_64
--> Processing Dependency: jpackage-utils for package: :java-1.8.-openjdk-headless-1.8.0.212.b04-.el7_6.x86_64
--> Running transaction check
---> Package copy-jdk-configs.noarch :3.3-.el7_5 will be installed
---> Package giflib.x86_64 :4.1.-.el7 will be installed
---> Package javapackages-tools.noarch :3.4.-.el7 will be installed
--> Processing Dependency: python-javapackages = 3.4.-.el7 for package: javapackages-tools-3.4.-.el7.noarch
---> Package lksctp-tools.x86_64 :1.0.-.el7 will be installed
---> Package pcsc-lite-libs.x86_64 :1.8.-.el7 will be installed
---> Package tzdata-java.noarch :2019a-.el7 will be installed
---> Package xorg-x11-fonts-Type1.noarch :7.5-.el7 will be installed
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-.el7.noarch
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-.el7.noarch
--> Running transaction check
---> Package python-javapackages.noarch :3.4.-.el7 will be installed
--> Processing Dependency: python-lxml for package: python-javapackages-3.4.-.el7.noarch
---> Package ttmkfdir.x86_64 :3.0.-.el7 will be installed
--> Running transaction check
---> Package python-lxml.x86_64 :3.2.-.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved =============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
java-1.8.-openjdk-devel x86_64 :1.8.0.212.b04-.el7_6 updates 9.8 M
Installing for dependencies:
copy-jdk-configs noarch 3.3-.el7_5 base k
giflib x86_64 4.1.-.el7 base k
java-1.8.-openjdk x86_64 :1.8.0.212.b04-.el7_6 updates k
java-1.8.-openjdk-headless x86_64 :1.8.0.212.b04-.el7_6 updates M
javapackages-tools noarch 3.4.-.el7 base k
lksctp-tools x86_64 1.0.-.el7 base k
pcsc-lite-libs x86_64 1.8.-.el7 base k
python-javapackages noarch 3.4.-.el7 base k
python-lxml x86_64 3.2.-.el7 base k
ttmkfdir x86_64 3.0.-.el7 base k
tzdata-java noarch 2019a-.el7 updates k
xorg-x11-fonts-Type1 noarch 7.5-.el7 base k Transaction Summary
=============================================================================================================================
Install Package (+ Dependent packages) Total download size: M
Installed size: M
Downloading packages:
(/): giflib-4.1.-.el7.x86_64.rpm | kB ::
(/): javapackages-tools-3.4.-.el7.noarch.rpm | kB ::
(/): copy-jdk-configs-3.3-.el7_5.noarch.rpm | kB ::
(/): java-1.8.-openjdk-1.8.0.212.b04-.el7_6.x86_64.rpm | kB ::
(/): lksctp-tools-1.0.-.el7.x86_64.rpm | kB ::
java-1.8.-openjdk-headless-. FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/Packages/java-1.8.0-openjdk-headless-1.8.0.212.b04-0.el7_6.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
(/): pcsc-lite-libs-1.8.-.el7.x86_64.rpm | kB ::
python-javapackages-3.4.-.e FAILED
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/Packages/python-javapackages-3.4.1-11.el7.noarch.rpm: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Unknown error"
Trying other mirror.
(/): ttmkfdir-3.0.-.el7.x86_64.rpm | kB ::
(/): tzdata-java-2019a-.el7.noarch.rpm | kB ::
(/): xorg-x11-fonts-Type1-7.5-.el7.noarch.rpm | kB ::
(/): python-javapackages-3.4.-.el7.noarch.rpm | kB ::
(/): python-lxml-3.2.-.el7.x86_64.rpm | kB ::
(/): java-1.8.-openjdk-devel-1.8.0.212.b04-.el7_6.x86_64.rpm | 9.8 MB ::
(/): java-1.8.-openjdk-headless-1.8.0.212.b04-.el7_6.x86_64.rpm | MB ::
-----------------------------------------------------------------------------------------------------------------------------
Total 2.2 MB/s | MB ::
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : ttmkfdir-3.0.-.el7.x86_64 /
Installing : xorg-x11-fonts-Type1-7.5-.el7.noarch /
Installing : lksctp-tools-1.0.-.el7.x86_64 /
Installing : pcsc-lite-libs-1.8.-.el7.x86_64 /
Installing : tzdata-java-2019a-.el7.noarch /
Installing : python-lxml-3.2.-.el7.x86_64 /
Installing : python-javapackages-3.4.-.el7.noarch /
Installing : javapackages-tools-3.4.-.el7.noarch /
Installing : copy-jdk-configs-3.3-.el7_5.noarch /
Installing : :java-1.8.-openjdk-headless-1.8.0.212.b04-.el7_6.x86_64 /
Installing : giflib-4.1.-.el7.x86_64 /
Installing : :java-1.8.-openjdk-1.8.0.212.b04-.el7_6.x86_64 /
Installing : :java-1.8.-openjdk-devel-1.8.0.212.b04-.el7_6.x86_64 /
Verifying : :java-1.8.-openjdk-devel-1.8.0.212.b04-.el7_6.x86_64 /
Verifying : giflib-4.1.-.el7.x86_64 /
Verifying : xorg-x11-fonts-Type1-7.5-.el7.noarch /
Verifying : copy-jdk-configs-3.3-.el7_5.noarch /
Verifying : python-javapackages-3.4.-.el7.noarch /
Verifying : python-lxml-3.2.-.el7.x86_64 /
Verifying : tzdata-java-2019a-.el7.noarch /
Verifying : pcsc-lite-libs-1.8.-.el7.x86_64 /
Verifying : javapackages-tools-3.4.-.el7.noarch /
Verifying : :java-1.8.-openjdk-headless-1.8.0.212.b04-.el7_6.x86_64 /
Verifying : :java-1.8.-openjdk-1.8.0.212.b04-.el7_6.x86_64 /
Verifying : lksctp-tools-1.0.-.el7.x86_64 /
Verifying : ttmkfdir-3.0.-.el7.x86_64 / Installed:
java-1.8.-openjdk-devel.x86_64 :1.8.0.212.b04-.el7_6 Dependency Installed:
copy-jdk-configs.noarch :3.3-.el7_5 giflib.x86_64 :4.1.-.el7
java-1.8.-openjdk.x86_64 :1.8.0.212.b04-.el7_6 java-1.8.-openjdk-headless.x86_64 :1.8.0.212.b04-.el7_6
javapackages-tools.noarch :3.4.-.el7 lksctp-tools.x86_64 :1.0.-.el7
pcsc-lite-libs.x86_64 :1.8.-.el7 python-javapackages.noarch :3.4.-.el7
python-lxml.x86_64 :3.2.-.el7 ttmkfdir.x86_64 :3.0.-.el7
tzdata-java.noarch :2019a-.el7 xorg-x11-fonts-Type1.noarch :7.5-.el7 Complete!
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# yum -y install java-1.8.0-openjdk-devel
3>.查看JDK版本
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# which java
/usr/bin/java
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) -Bit Server VM (build 25.201-b09, mixed mode)
[root@node201.yinzhengjie.org.cn ~]#
三.安装git
1>.下载git安装包(强烈不推荐大家使用yum方式安装,建议大家使用源码安装git,这种方式不推荐使用,因为它默认安装的版本是1.8.3,它和gerrit集成并不太友好,尤其是gerrit3.0.0版本。)
[root@node201.yinzhengjie.org.cn ~]# yum -y install wget
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.yun-idc.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package wget.x86_64 :1.14-.el7_6. will be installed
--> Finished Dependency Resolution Dependencies Resolved =============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
wget x86_64 1.14-.el7_6. updates k Transaction Summary
=============================================================================================================================
Install Package Total download size: k
Installed size: 2.0 M
Downloading packages:
wget-1.14-.el7_6..x86_64.rpm | kB ::
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : wget-1.14-.el7_6..x86_64 /
Verifying : wget-1.14-.el7_6..x86_64 / Installed:
wget.x86_64 :1.14-.el7_6. Complete!
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# yum -y install wget #安装Linux系统的下载工具
[root@node201.yinzhengjie.org.cn ~]# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.12.2.tar.gz
2>.安装git依赖包
[root@node201.yinzhengjie.org.cn ~]# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.12.2.tar.gz
---- ::-- https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.12.2.tar.gz
Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 147.75.101.1, :::::
Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|147.75.101.1|:... connected.
HTTP request sent, awaiting response... OK
Length: (6.1M) [application/x-gzip]
Saving to: ‘git-2.12..tar.gz’ %[===================================================================================>] ,, 148KB/s in 49s -- :: ( KB/s) - ‘git-2.12..tar.gz’ saved [/] [root@node201.yinzhengjie.org.cn ~]# yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Package perl-ExtUtils-MakeMaker-6.68-.el7.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package expat-devel.x86_64 :2.1.-.el7_3 will be installed
---> Package gcc.x86_64 :4.8.-.el7_6. will be installed
--> Processing Dependency: libgomp = 4.8.-.el7_6. for package: gcc-4.8.-.el7_6..x86_64
--> Processing Dependency: cpp = 4.8.-.el7_6. for package: gcc-4.8.-.el7_6..x86_64
--> Processing Dependency: libgcc >= 4.8.-.el7_6. for package: gcc-4.8.-.el7_6..x86_64
--> Processing Dependency: libmpfr.so.()(64bit) for package: gcc-4.8.-.el7_6..x86_64
--> Processing Dependency: libmpc.so.()(64bit) for package: gcc-4.8.-.el7_6..x86_64
---> Package gettext-devel.x86_64 :0.19.8.1-.el7 will be installed
--> Processing Dependency: gettext-common-devel = 0.19.8.1-.el7 for package: gettext-devel-0.19.8.1-.el7.x86_64
--> Processing Dependency: git for package: gettext-devel-0.19.8.1-.el7.x86_64
---> Package libcurl-devel.x86_64 :7.29.-.el7 will be installed
---> Package openssl-devel.x86_64 :1.0.2k-.el7_6. will be installed
--> Processing Dependency: openssl-libs(x86-) = :1.0.2k-.el7_6. for package: :openssl-devel-1.0.2k-.el7_6..x86_64
--> Processing Dependency: krb5-devel(x86-) for package: :openssl-devel-1.0.2k-.el7_6..x86_64
---> Package zlib-devel.x86_64 :1.2.-.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 :4.8.-.el7_6. will be installed
---> Package gettext-common-devel.noarch :0.19.8.1-.el7 will be installed
---> Package git.x86_64 :1.8.3.1-.el7 will be installed
--> Processing Dependency: perl-Git = 1.8.3.1-.el7 for package: git-1.8.3.1-.el7.x86_64
--> Processing Dependency: rsync for package: git-1.8.3.1-.el7.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-.el7.x86_64
--> Processing Dependency: perl(Git) for package: git-1.8.3.1-.el7.x86_64
--> Processing Dependency: perl(Error) for package: git-1.8.3.1-.el7.x86_64
---> Package krb5-devel.x86_64 :1.15.-.el7_6 will be installed
--> Processing Dependency: libkadm5(x86-) = 1.15.-.el7_6 for package: krb5-devel-1.15.-.el7_6.x86_64
--> Processing Dependency: krb5-libs(x86-) = 1.15.-.el7_6 for package: krb5-devel-1.15.-.el7_6.x86_64
--> Processing Dependency: libverto-devel for package: krb5-devel-1.15.-.el7_6.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.15.-.el7_6.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.15.-.el7_6.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.15.-.el7_6.x86_64
---> Package libgcc.x86_64 :4.8.-.el7 will be updated
---> Package libgcc.x86_64 :4.8.-.el7_6. will be an update
---> Package libgomp.x86_64 :4.8.-.el7 will be updated
---> Package libgomp.x86_64 :4.8.-.el7_6. will be an update
---> Package libmpc.x86_64 :1.0.-.el7 will be installed
---> Package mpfr.x86_64 :3.1.-.el7 will be installed
---> Package openssl-libs.x86_64 :1.0.2k-.el7 will be updated
--> Processing Dependency: openssl-libs(x86-) = :1.0.2k-.el7 for package: :openssl-1.0.2k-.el7.x86_64
---> Package openssl-libs.x86_64 :1.0.2k-.el7_6. will be an update
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 :1.5.-.el7 will be installed
---> Package krb5-libs.x86_64 :1.15.-.el7 will be updated
---> Package krb5-libs.x86_64 :1.15.-.el7_6 will be an update
---> Package libcom_err-devel.x86_64 :1.42.-.el7 will be installed
---> Package libkadm5.x86_64 :1.15.-.el7_6 will be installed
---> Package libselinux-devel.x86_64 :2.5-14.1.el7 will be installed
--> Processing Dependency: libsepol-devel(x86-) >= 2.5- for package: libselinux-devel-2.5-14.1.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.5-14.1.el7.x86_64
--> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.5-14.1.el7.x86_64
---> Package libverto-devel.x86_64 :0.2.-.el7 will be installed
---> Package openssl.x86_64 :1.0.2k-.el7 will be updated
---> Package openssl.x86_64 :1.0.2k-.el7_6. will be an update
---> Package perl-Error.noarch :0.17020-.el7 will be installed
---> Package perl-Git.noarch :1.8.3.1-.el7 will be installed
---> Package perl-TermReadKey.x86_64 :2.30-.el7 will be installed
---> Package rsync.x86_64 :3.1.-.el7_6. will be installed
--> Running transaction check
---> Package libsepol-devel.x86_64 :2.5-.el7 will be installed
---> Package pcre-devel.x86_64 :8.32-.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved =============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
expat-devel x86_64 2.1.-.el7_3 base k
gcc x86_64 4.8.-.el7_6. updates M
gettext-devel x86_64 0.19.8.1-.el7 base k
libcurl-devel x86_64 7.29.-.el7 base k
openssl-devel x86_64 :1.0.2k-.el7_6. updates 1.5 M
zlib-devel x86_64 1.2.-.el7 base k
Installing for dependencies:
cpp x86_64 4.8.-.el7_6. updates 5.9 M
gettext-common-devel noarch 0.19.8.1-.el7 base k
git x86_64 1.8.3.1-.el7 updates 4.4 M
keyutils-libs-devel x86_64 1.5.-.el7 base k
krb5-devel x86_64 1.15.-.el7_6 updates k
libcom_err-devel x86_64 1.42.-.el7 base k
libkadm5 x86_64 1.15.-.el7_6 updates k
libmpc x86_64 1.0.-.el7 base k
libselinux-devel x86_64 2.5-14.1.el7 base k
libsepol-devel x86_64 2.5-.el7 base k
libverto-devel x86_64 0.2.-.el7 base k
mpfr x86_64 3.1.-.el7 base k
pcre-devel x86_64 8.32-.el7 base k
perl-Error noarch :0.17020-.el7 base k
perl-Git noarch 1.8.3.1-.el7 updates k
perl-TermReadKey x86_64 2.30-.el7 base k
rsync x86_64 3.1.-.el7_6. updates k
Updating for dependencies:
krb5-libs x86_64 1.15.-.el7_6 updates k
libgcc x86_64 4.8.-.el7_6. updates k
libgomp x86_64 4.8.-.el7_6. updates k
openssl x86_64 :1.0.2k-.el7_6. updates k
openssl-libs x86_64 :1.0.2k-.el7_6. updates 1.2 M Transaction Summary
=============================================================================================================================
Install Packages (+ Dependent packages)
Upgrade ( Dependent packages) Total download size: M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(/): expat-devel-2.1.-.el7_3.x86_64.rpm | kB ::
(/): gettext-devel-0.19.8.1-.el7.x86_64.rpm | kB ::
(/): gettext-common-devel-0.19.8.1-.el7.noarch.rpm | kB ::
(/): gcc-4.8.-.el7_6..x86_64.rpm | MB ::
(/): keyutils-libs-devel-1.5.-.el7.x86_64.rpm | kB ::
(/): git-1.8.3.1-.el7.x86_64.rpm | 4.4 MB ::
(/): krb5-devel-1.15.-.el7_6.x86_64.rpm | kB ::
(/): libcom_err-devel-1.42.-.el7.x86_64.rpm | kB ::
(/): krb5-libs-1.15.-.el7_6.x86_64.rpm | kB ::
(/): libcurl-devel-7.29.-.el7.x86_64.rpm | kB ::
(/): libgcc-4.8.-.el7_6..x86_64.rpm | kB ::
(/): libgomp-4.8.-.el7_6..x86_64.rpm | kB ::
(/): libkadm5-1.15.-.el7_6.x86_64.rpm | kB ::
(/): libselinux-devel-2.5-14.1.el7.x86_64.rpm | kB ::
(/): libmpc-1.0.-.el7.x86_64.rpm | kB ::
(/): libsepol-devel-2.5-.el7.x86_64.rpm | kB ::
(/): mpfr-3.1.-.el7.x86_64.rpm | kB ::
(/): libverto-devel-0.2.-.el7.x86_64.rpm | kB ::
(/): openssl-1.0.2k-.el7_6..x86_64.rpm | kB ::
(/): openssl-devel-1.0.2k-.el7_6..x86_64.rpm | 1.5 MB ::
(/): perl-Error-0.17020-.el7.noarch.rpm | kB ::
(/): openssl-libs-1.0.2k-.el7_6..x86_64.rpm | 1.2 MB ::
(/): perl-Git-1.8.3.1-.el7.noarch.rpm | kB ::
(/): perl-TermReadKey-2.30-.el7.x86_64.rpm | kB ::
(/): rsync-3.1.-.el7_6..x86_64.rpm | kB ::
(/): zlib-devel-1.2.-.el7.x86_64.rpm | kB ::
(/): cpp-4.8.-.el7_6..x86_64.rpm | 5.9 MB ::
(/): pcre-devel-8.32-.el7.x86_64.rpm | kB ::
-----------------------------------------------------------------------------------------------------------------------------
Total 2.1 MB/s | MB ::
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : :openssl-libs-1.0.2k-.el7_6..x86_64 /
Updating : krb5-libs-1.15.-.el7_6.x86_64 /
Installing : mpfr-3.1.-.el7.x86_64 /
Installing : libmpc-1.0.-.el7.x86_64 /
Installing : :perl-Error-0.17020-.el7.noarch /
Installing : cpp-4.8.-.el7_6..x86_64 /
Installing : libkadm5-1.15.-.el7_6.x86_64 /
Installing : libsepol-devel-2.5-.el7.x86_64 /
Installing : gettext-common-devel-0.19.8.1-.el7.noarch /
Updating : libgomp-4.8.-.el7_6..x86_64 /
Updating : libgcc-4.8.-.el7_6..x86_64 /
Installing : zlib-devel-1.2.-.el7.x86_64 /
Installing : perl-TermReadKey-2.30-.el7.x86_64 /
Installing : libverto-devel-0.2.-.el7.x86_64 /
Installing : libcom_err-devel-1.42.-.el7.x86_64 /
Installing : rsync-3.1.-.el7_6..x86_64 /
Installing : perl-Git-1.8.3.1-.el7.noarch /
Installing : git-1.8.3.1-.el7.x86_64 /
Installing : pcre-devel-8.32-.el7.x86_64 /
Installing : libselinux-devel-2.5-14.1.el7.x86_64 /
Installing : keyutils-libs-devel-1.5.-.el7.x86_64 /
Installing : krb5-devel-1.15.-.el7_6.x86_64 /
Installing : :openssl-devel-1.0.2k-.el7_6..x86_64 /
Installing : gettext-devel-0.19.8.1-.el7.x86_64 /
Installing : gcc-4.8.-.el7_6..x86_64 /
Updating : :openssl-1.0.2k-.el7_6..x86_64 /
Installing : libcurl-devel-7.29.-.el7.x86_64 /
Installing : expat-devel-2.1.-.el7_3.x86_64 /
Cleanup : :openssl-1.0.2k-.el7.x86_64 /
Cleanup : :openssl-libs-1.0.2k-.el7.x86_64 /
Cleanup : krb5-libs-1.15.-.el7.x86_64 /
Cleanup : libgomp-4.8.-.el7.x86_64 /
Cleanup : libgcc-4.8.-.el7.x86_64 /
Verifying : gettext-devel-0.19.8.1-.el7.x86_64 /
Verifying : keyutils-libs-devel-1.5.-.el7.x86_64 /
Verifying : pcre-devel-8.32-.el7.x86_64 /
Verifying : gcc-4.8.-.el7_6..x86_64 /
Verifying : rsync-3.1.-.el7_6..x86_64 /
Verifying : libcom_err-devel-1.42.-.el7.x86_64 /
Verifying : krb5-devel-1.15.-.el7_6.x86_64 /
Verifying : expat-devel-2.1.-.el7_3.x86_64 /
Verifying : libverto-devel-0.2.-.el7.x86_64 /
Verifying : perl-TermReadKey-2.30-.el7.x86_64 /
Verifying : zlib-devel-1.2.-.el7.x86_64 /
Verifying : krb5-libs-1.15.-.el7_6.x86_64 /
Verifying : perl-Git-1.8.3.1-.el7.noarch /
Verifying : libgcc-4.8.-.el7_6..x86_64 /
Verifying : libgomp-4.8.-.el7_6..x86_64 /
Verifying : gettext-common-devel-0.19.8.1-.el7.noarch /
Verifying : :openssl-1.0.2k-.el7_6..x86_64 /
Verifying : :perl-Error-0.17020-.el7.noarch /
Verifying : git-1.8.3.1-.el7.x86_64 /
Verifying : :openssl-libs-1.0.2k-.el7_6..x86_64 /
Verifying : libmpc-1.0.-.el7.x86_64 /
Verifying : libsepol-devel-2.5-.el7.x86_64 /
Verifying : :openssl-devel-1.0.2k-.el7_6..x86_64 /
Verifying : libkadm5-1.15.-.el7_6.x86_64 /
Verifying : mpfr-3.1.-.el7.x86_64 /
Verifying : libcurl-devel-7.29.-.el7.x86_64 /
Verifying : libselinux-devel-2.5-14.1.el7.x86_64 /
Verifying : cpp-4.8.-.el7_6..x86_64 /
Verifying : libgcc-4.8.-.el7.x86_64 /
Verifying : :openssl-libs-1.0.2k-.el7.x86_64 /
Verifying : :openssl-1.0.2k-.el7.x86_64 /
Verifying : libgomp-4.8.-.el7.x86_64 /
Verifying : krb5-libs-1.15.-.el7.x86_64 / Installed:
expat-devel.x86_64 :2.1.-.el7_3 gcc.x86_64 :4.8.-.el7_6. gettext-devel.x86_64 :0.19.8.1-.el7
libcurl-devel.x86_64 :7.29.-.el7 openssl-devel.x86_64 :1.0.2k-.el7_6. zlib-devel.x86_64 :1.2.-.el7 Dependency Installed:
cpp.x86_64 :4.8.-.el7_6. gettext-common-devel.noarch :0.19.8.1-.el7
git.x86_64 :1.8.3.1-.el7 keyutils-libs-devel.x86_64 :1.5.-.el7
krb5-devel.x86_64 :1.15.-.el7_6 libcom_err-devel.x86_64 :1.42.-.el7
libkadm5.x86_64 :1.15.-.el7_6 libmpc.x86_64 :1.0.-.el7
libselinux-devel.x86_64 :2.5-14.1.el7 libsepol-devel.x86_64 :2.5-.el7
libverto-devel.x86_64 :0.2.-.el7 mpfr.x86_64 :3.1.-.el7
pcre-devel.x86_64 :8.32-.el7 perl-Error.noarch :0.17020-.el7
perl-Git.noarch :1.8.3.1-.el7 perl-TermReadKey.x86_64 :2.30-.el7
rsync.x86_64 :3.1.-.el7_6. Dependency Updated:
krb5-libs.x86_64 :1.15.-.el7_6 libgcc.x86_64 :4.8.-.el7_6. libgomp.x86_64 :4.8.-.el7_6.
openssl.x86_64 :1.0.2k-.el7_6. openssl-libs.x86_64 :1.0.2k-.el7_6. Complete!
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
3>.配置git的安装路径
[root@node201.yinzhengjie.org.cn ~]# ll
total
-rw-r--r-- root root Mar git-2.12..tar.gz
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# tar -zxf git-2.12..tar.gz
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# cd git-2.12.
[root@node201.yinzhengjie.org.cn ~/git-2.12.]#
[root@node201.yinzhengjie.org.cn ~/git-2.12.]# ll | wc -l [root@node201.yinzhengjie.org.cn ~/git-2.12.]#
[root@node201.yinzhengjie.org.cn ~/git-2.12.]#
[root@node201.yinzhengjie.org.cn ~/git-2.12.]# ll | grep configure
-rwxr-x--- Mar configure
-rw-rw-r-- root root Mar configure.ac
[root@node201.yinzhengjie.org.cn ~/git-2.12.]#
[root@node201.yinzhengjie.org.cn ~/git-2.12.]# ./configure prefix=/yinzhengjie/softwares/git/
configure: Setting lib to 'lib' (the default)
configure: Will try -pthread then -lpthread to enable POSIX Threads.
configure: CHECKS for site configuration
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
configure: CHECKS for programs
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for inline... inline
checking if linker supports -R... no
checking if linker supports -Wl,-rpath,... yes
checking for gar... no
checking for ar... ar
checking for gtar... gtar
checking for gnudiff... no
checking for gdiff... no
checking for diff... diff
checking for asciidoc... no
Using 'grep -a' for sane_grep
configure: CHECKS for libraries
checking for SHA1_Init in -lcrypto... yes
checking for curl_global_init in -lcurl... yes
checking for curl-config... curl-config
checking if Curl supports SSL... yes
checking for XML_ParserCreate in -lexpat... yes
checking for iconv in -lc... yes
checking for deflateBound in -lz... yes
checking for socket in -lc... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for hstrerror... yes
checking for basename in -lc... yes
checking for gettext in -lc... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
configure: CHECKS for header files
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking for inttypes.h... (cached) yes
checking for old iconv()... no
configure: CHECKS for typedefs, structures, and compiler characteristics
checking for socklen_t... yes
checking for struct itimerval... yes
checking for struct stat.st_mtimespec.tv_nsec... no
checking for struct stat.st_mtim.tv_nsec... yes
checking for struct dirent.d_type... yes
checking for struct passwd.pw_gecos... yes
checking for struct sockaddr_storage... yes
checking for struct addrinfo... yes
checking for getaddrinfo... yes
checking for library containing getaddrinfo... none required
checking whether the platform regex supports REG_STARTEND... yes
checking whether system succeeds to read fopen'ed directory... no
checking whether snprintf() and/or vsnprintf() return bogus value... no
checking whether the platform uses typical file type bits... yes
configure: CHECKS for library functions
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking libcharset.h usability... no
checking libcharset.h presence... no
checking for libcharset.h... no
checking for strings.h... (cached) yes
checking for locale_charset in -liconv... no
checking for locale_charset in -lcharset... no
checking for clock_gettime... yes
checking for library containing clock_gettime... none required
checking for CLOCK_MONOTONIC... yes
checking for setitimer... yes
checking for library containing setitimer... none required
checking for strcasestr... yes
checking for library containing strcasestr... none required
checking for memmem... yes
checking for library containing memmem... none required
checking for strlcpy... no
checking for uintmax_t... yes
checking for strtoumax... yes
checking for library containing strtoumax... none required
checking for setenv... yes
checking for library containing setenv... none required
checking for unsetenv... yes
checking for library containing unsetenv... none required
checking for mkdtemp... yes
checking for library containing mkdtemp... none required
checking for initgroups... yes
checking for library containing initgroups... none required
checking for getdelim... yes
checking for library containing getdelim... none required
checking for BSD sysctl... no
checking for POSIX Threads with ''... no
checking for POSIX Threads with '-mt'... no
checking for POSIX Threads with '-pthread'... yes
configure: creating ./config.status
config.status: creating config.mak.autogen
config.status: executing config.mak.autogen commands
[root@node201.yinzhengjie.org.cn ~/git-2.12.]# echo $? [root@node201.yinzhengjie.org.cn ~/git-2.12.]#
[root@node201.yinzhengjie.org.cn ~/git-2.12.2]# ./configure prefix=/yinzhengjie/softwares/git/
3>.编译git
[root@node201.yinzhengjie.org.cn ~/git-2.12.]# make -j
......
BUILTIN git-rm
BUILTIN git-send-pack
BUILTIN git-shortlog
BUILTIN git-show-branch
BUILTIN git-show-ref
BUILTIN git-stripspace
BUILTIN git-submodule--helper
BUILTIN git-symbolic-ref
BUILTIN git-tag
BUILTIN git-unpack-file
BUILTIN git-unpack-objects
BUILTIN git-update-index
BUILTIN git-update-ref
BUILTIN git-update-server-info
BUILTIN git-upload-archive
BUILTIN git-var
BUILTIN git-verify-commit
BUILTIN git-verify-pack
BUILTIN git-verify-tag
BUILTIN git-worktree
BUILTIN git-write-tree
BUILTIN git-cherry
BUILTIN git-cherry-pick
BUILTIN git-format-patch
BUILTIN git-fsck-objects
BUILTIN git-init
BUILTIN git-merge-subtree
BUILTIN git-show
BUILTIN git-stage
BUILTIN git-status
BUILTIN git-whatchanged
SUBDIR git-gui
GITGUI_VERSION = 0.20.0.44.gccc98
* new locations or Tcl/Tk interpreter
MSGFMT po/de.msg MSGFMT po/pt_pt.msg MSGFMT po/vi.msg MSGFMT po/hu.msg translated.
translated.
MSGFMT po/nb.msg translated.
translated.
MSGFMT po/sv.msg MSGFMT po/fr.msg MSGFMT po/it.msg translated, untranslated.
translated.
MSGFMT po/ja.msg translated, untranslated.
translated.
MSGFMT po/pt_br.msg MSGFMT po/bg.msg MSGFMT po/ru.msg translated, untranslated.
translated.
MSGFMT po/zh_cn.msg MSGFMT po/el.msg translated.
translated.
GEN git-gui
INDEX lib/
translated, fuzzy, untranslated.
* tclsh failed; using unoptimized loading
translated, fuzzy, untranslated.
SUBDIR gitk-git
Generating catalog po/de.msg
Generating catalog po/pt_pt.msg
msgfmt --statistics --tcl po/de.po -l de -d po/
msgfmt --statistics --tcl po/pt_pt.po -l pt_pt -d po/
* new Tcl/Tk interpreter location
Generating catalog po/vi.msg
Generating catalog po/ca.msg
msgfmt --statistics --tcl po/vi.po -l vi -d po/
translated messages.
msgfmt --statistics --tcl po/ca.po -l ca -d po/
translated messages.
Generating catalog po/hu.msg
msgfmt --statistics --tcl po/hu.po -l hu -d po/
translated messages.
Generating catalog po/es.msg
Generating catalog po/sv.msg
translated messages.
msgfmt --statistics --tcl po/es.po -l es -d po/
msgfmt --statistics --tcl po/sv.po -l sv -d po/
Generating catalog po/fr.msg
msgfmt --statistics --tcl po/fr.po -l fr -d po/
translated messages, fuzzy translations, untranslated messages.
Generating catalog po/it.msg
msgfmt --statistics --tcl po/it.po -l it -d po/
translated messages, fuzzy translations, untranslated messages.
translated messages.
Generating catalog po/ja.msg
Generating catalog po/pt_br.msg
msgfmt --statistics --tcl po/ja.po -l ja -d po/
msgfmt --statistics --tcl po/pt_br.po -l pt_br -d po/
translated messages.
Generating catalog po/bg.msg
translated messages, fuzzy translations, untranslated messages.
msgfmt --statistics --tcl po/bg.po -l bg -d po/
Generating catalog po/ru.msg
msgfmt --statistics --tcl po/ru.po -l ru -d po/
translated messages, fuzzy translations, untranslated messages.
translated messages.
GEN gitk-wish
translated messages.
translated messages.
SUBDIR perl
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Editor.pm >blib/lib/Git/SVN/Editor.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Migration.pm >blib/lib/Git/SVN/Migration.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Log.pm >blib/lib/Git/SVN/Log.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN.pm >blib/lib/Git/SVN.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Memoize/YAML.pm >blib/lib/Git/SVN/Memoize/YAML.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Ra.pm >blib/lib/Git/SVN/Ra.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/I18N.pm >blib/lib/Git/I18N.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Prompt.pm >blib/lib/Git/SVN/Prompt.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/GlobSpec.pm >blib/lib/Git/SVN/GlobSpec.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Fetcher.pm >blib/lib/Git/SVN/Fetcher.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/IndexInfo.pm >blib/lib/Git/IndexInfo.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Utils.pm >blib/lib/Git/SVN/Utils.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git.pm >blib/lib/Git.pm
Manifying blib/man3/Git::SVN::Editor.3pm
Manifying blib/man3/Git::SVN::Memoize::YAML.3pm
Manifying blib/man3/Git::SVN::Ra.3pm
Manifying blib/man3/Git::I18N.3pm
Manifying blib/man3/Git::SVN::Prompt.3pm
Manifying blib/man3/Git::SVN::Fetcher.3pm
Manifying blib/man3/Git::SVN::Utils.3pm
Manifying blib/man3/Git.3pm
SUBDIR templates
[root@node201.yinzhengjie.org.cn ~/git-2.12.]#
[root@node201.yinzhengjie.org.cn ~/git-2.12.2]# make -j 4
4>.安装git
[root@node201.yinzhengjie.org.cn ~/git-2.12.]# make install
SUBDIR perl
/usr/bin/perl Makefile.PL PREFIX='/yinzhengjie/softwares/git' INSTALL_BASE='' --localedir='/yinzhengjie/softwares/git/share/locale'
Writing perl.mak for Git
GEN git-add--interactive
GEN git-archimport
GEN git-cvsexportcommit
GEN git-cvsimport
GEN git-cvsserver
GEN git-send-email
GEN git-svn
SUBDIR git-gui
SUBDIR gitk-git
SUBDIR perl
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Editor.pm >blib/lib/Git/SVN/Editor.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Migration.pm >blib/lib/Git/SVN/Migration.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Log.pm >blib/lib/Git/SVN/Log.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN.pm >blib/lib/Git/SVN.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Memoize/YAML.pm >blib/lib/Git/SVN/Memoize/YAML.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Ra.pm >blib/lib/Git/SVN/Ra.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/I18N.pm >blib/lib/Git/I18N.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Prompt.pm >blib/lib/Git/SVN/Prompt.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/GlobSpec.pm >blib/lib/Git/SVN/GlobSpec.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Fetcher.pm >blib/lib/Git/SVN/Fetcher.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/IndexInfo.pm >blib/lib/Git/IndexInfo.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git/SVN/Utils.pm >blib/lib/Git/SVN/Utils.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></yinzhengjie/softwares/git/share/locale>" <Git.pm >blib/lib/Git.pm
SUBDIR templates
install -d -m '/yinzhengjie/softwares/git/bin'
install -d -m '/yinzhengjie/softwares/git/libexec/git-core'
install git-credential-store git-daemon git-fast-import git-http-backend git-imap-send git-sh-i18n--envsubst git-shell git-show-index git-upload-pack git-remote-testsvn git-http-fetch git-http-push git-credential-cache git-credential-cache--daemon git-remote-http git-remote-https git-remote-ftp git-remote-ftps git-bisect git-difftool--helper git-filter-branch git-merge-octopus git-merge-one-file git-merge-resolve git-mergetool git-quiltimport git-rebase git-request-pull git-stash git-submodule git-web--browse git-add--interactive git-archimport git-cvsexportcommit git-cvsimport git-cvsserver git-send-email git-svn git-p4 git-instaweb '/yinzhengjie/softwares/git/libexec/git-core'
install -m git-mergetool--lib git-parse-remote git-rebase--am git-rebase--interactive git-rebase--merge git-sh-setup git-sh-i18n '/yinzhengjie/softwares/git/libexec/git-core'
install git git-upload-pack git-receive-pack git-upload-archive git-shell git-cvsserver '/yinzhengjie/softwares/git/bin'
make -C templates DESTDIR='' install
make[]: Entering directory `/root/git-2.12./templates'
install -d -m '/yinzhengjie/softwares/git/share/git-core/templates'
(cd blt && gtar cf - .) | \
(cd '/yinzhengjie/softwares/git/share/git-core/templates' && umask && gtar xof -)
make[]: Leaving directory `/root/git-2.12./templates'
install -d -m '/yinzhengjie/softwares/git/libexec/git-core/mergetools'
install -m mergetools/* '/yinzhengjie/softwares/git/libexec/git-core/mergetools'
install -d -m 755 '/yinzhengjie/softwares/git/share/locale'
(cd po/build/locale && gtar cf - .) | \
(cd '/yinzhengjie/softwares/git/share/locale' && umask 022 && gtar xof -)
make -C perl prefix='/yinzhengjie/softwares/git' DESTDIR='' install
make[1]: Entering directory `/root/git-2.12.2/perl'
make[2]: Entering directory `/root/git-2.12.2/perl'
Installing /yinzhengjie/softwares/git/share/perl5/Git.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/I18N.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/IndexInfo.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN/Editor.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN/Migration.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN/Log.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN/Ra.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN/Prompt.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN/GlobSpec.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN/Fetcher.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN/Utils.pm
Installing /yinzhengjie/softwares/git/share/perl5/Git/SVN/Memoize/YAML.pm
Installing /yinzhengjie/softwares/git/share/man/man3/Git::SVN::Editor.3pm
Installing /yinzhengjie/softwares/git/share/man/man3/Git::SVN::Memoize::YAML.3pm
Installing /yinzhengjie/softwares/git/share/man/man3/Git::SVN::Ra.3pm
Installing /yinzhengjie/softwares/git/share/man/man3/Git::I18N.3pm
Installing /yinzhengjie/softwares/git/share/man/man3/Git::SVN::Prompt.3pm
Installing /yinzhengjie/softwares/git/share/man/man3/Git::SVN::Fetcher.3pm
Installing /yinzhengjie/softwares/git/share/man/man3/Git::SVN::Utils.3pm
Installing /yinzhengjie/softwares/git/share/man/man3/Git.3pm
Appending installation info to /yinzhengjie/softwares/git/lib64/perl5/perllocal.pod
make[2]: Leaving directory `/root/git-2.12.2/perl'
make[1]: Leaving directory `/root/git-2.12.2/perl'
make -C gitweb install
make[1]: Entering directory `/root/git-2.12.2/gitweb'
make[2]: Entering directory `/root/git-2.12.2'
make[2]: `GIT-VERSION-FILE' is up to date.
make[2]: Leaving directory `/root/git-2.12.2'
GEN gitweb.cgi
GEN static/gitweb.js
install -d -m 755 '/yinzhengjie/softwares/git/share/gitweb'
install -m 755 gitweb.cgi '/yinzhengjie/softwares/git/share/gitweb'
install -d -m 755 '/yinzhengjie/softwares/git/share/gitweb/static'
install -m 644 static/gitweb.js static/gitweb.css static/git-logo.png static/git-favicon.png '/yinzhengjie/softwares/git/share/gitweb/static'
make[1]: Leaving directory `/root/git-2.12.2/gitweb'
make -C gitk-git install
make[1]: Entering directory `/root/git-2.12.2/gitk-git'
install -d -m 755 '/yinzhengjie/softwares/git/bin'
install -m 755 gitk-wish '/yinzhengjie/softwares/git/bin'/gitk
install -d -m 755 '/yinzhengjie/softwares/git/share/gitk/lib/msgs'
install -m 644 po/de.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/ja.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/sv.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/it.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/hu.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/pt_pt.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/fr.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/pt_br.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/ru.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/ca.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/vi.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/bg.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && install -m 644 po/es.msg '/yinzhengjie/softwares/git/share/gitk/lib/msgs' && true
make[1]: Leaving directory `/root/git-2.12.2/gitk-git'
make -C git-gui gitexecdir='/yinzhengjie/softwares/git/libexec/git-core' install
make[1]: Entering directory `/root/git-2.12.2/git-gui'
DEST /yinzhengjie/softwares/git/libexec/git-core
INSTALL 755 git-gui
INSTALL 755 git-gui--askpass
LINK git-citool -> git-gui
DEST /yinzhengjie/softwares/git/share/git-gui/lib
INSTALL 644 tclIndex
INSTALL 644 themed.tcl
INSTALL 644 line.tcl
INSTALL 644 console.tcl
INSTALL 644 checkout_op.tcl
INSTALL 644 transport.tcl
INSTALL 644 remote_add.tcl
INSTALL 644 browser.tcl
INSTALL 644 tools.tcl
INSTALL 644 branch_checkout.tcl
INSTALL 644 spellcheck.tcl
INSTALL 644 status_bar.tcl
INSTALL 644 diff.tcl
INSTALL 644 remote.tcl
INSTALL 644 choose_font.tcl
INSTALL 644 option.tcl
INSTALL 644 mergetool.tcl
INSTALL 644 tools_dlg.tcl
INSTALL 644 search.tcl
INSTALL 644 shortcut.tcl
INSTALL 644 branch_rename.tcl
INSTALL 644 class.tcl
INSTALL 644 remote_branch_delete.tcl
INSTALL 644 choose_repository.tcl
INSTALL 644 about.tcl
INSTALL 644 blame.tcl
INSTALL 644 branch.tcl
INSTALL 644 win32.tcl
INSTALL 644 sshkey.tcl
INSTALL 644 branch_create.tcl
INSTALL 644 commit.tcl
INSTALL 644 branch_delete.tcl
INSTALL 644 index.tcl
INSTALL 644 encoding.tcl
INSTALL 644 logo.tcl
INSTALL 644 date.tcl
INSTALL 644 choose_rev.tcl
INSTALL 644 database.tcl
INSTALL 644 error.tcl
INSTALL 644 merge.tcl
INSTALL 644 git-gui.ico
INSTALL 644 win32_shortcut.js
DEST /yinzhengjie/softwares/git/share/git-gui/lib/msgs
INSTALL 644 pt_br.msg
INSTALL 644 hu.msg
INSTALL 644 zh_cn.msg
INSTALL 644 de.msg
INSTALL 644 sv.msg
INSTALL 644 it.msg
INSTALL 644 ja.msg
INSTALL 644 pt_pt.msg
INSTALL 644 fr.msg
INSTALL 644 ru.msg
INSTALL 644 el.msg
INSTALL 644 vi.msg
INSTALL 644 bg.msg
INSTALL 644 nb.msg
make[1]: Leaving directory `/root/git-2.12.2/git-gui'
bindir=$(cd '/yinzhengjie/softwares/git/bin' && pwd) && \
execdir=$(cd '/yinzhengjie/softwares/git/libexec/git-core' && pwd) && \
{ test "$bindir/" = "$execdir/" || \
for p in git git-shell git-upload-pack git-cvsserver; do \
rm -f "$execdir/$p" && \
test -z "" && \
ln "$bindir/$p" "$execdir/$p" 2>/dev/null || \
cp "$bindir/$p" "$execdir/$p" || exit; \
done; \
} && \
for p in git-receive-pack git-upload-archive; do \
rm -f "$bindir/$p" && \
test -z "" && \
ln "$bindir/git" "$bindir/$p" 2>/dev/null || \
ln -s "git" "$bindir/$p" 2>/dev/null || \
cp "$bindir/git" "$bindir/$p" || exit; \
done && \
for p in git-add git-am git-annotate git-apply git-archive git-bisect--helper git-blame git-branch git-bundle git-cat-file git-check-attr git-check-ignore git-check-mailmap git-check-ref-format git-checkout-index git-checkout git-clean git-clone git-column git-commit-tree git-commit git-config git-count-objects git-credential git-describe git-diff-files git-diff-index git-diff-tree git-diff git-difftool git-fast-export git-fetch-pack git-fetch git-fmt-merge-msg git-for-each-ref git-fsck git-gc git-get-tar-commit-id git-grep git-hash-object git-help git-index-pack git-init-db git-interpret-trailers git-log git-ls-files git-ls-remote git-ls-tree git-mailinfo git-mailsplit git-merge git-merge-base git-merge-file git-merge-index git-merge-ours git-merge-recursive git-merge-tree git-mktag git-mktree git-mv git-name-rev git-notes git-pack-objects git-pack-redundant git-pack-refs git-patch-id git-prune-packed git-prune git-pull git-push git-read-tree git-receive-pack git-reflog git-remote git-remote-ext git-remote-fd git-repack git-replace git-rerere git-reset git-rev-list git-rev-parse git-revert git-rm git-send-pack git-shortlog git-show-branch git-show-ref git-stripspace git-submodule--helper git-symbolic-ref git-tag git-unpack-file git-unpack-objects git-update-index git-update-ref git-update-server-info git-upload-archive git-var git-verify-commit git-verify-pack git-verify-tag git-worktree git-write-tree git-cherry git-cherry-pick git-format-patch git-fsck-objects git-init git-merge-subtree git-show git-stage git-status git-whatchanged; do \
rm -f "$execdir/$p" && \
test -z "" && \
ln "$execdir/git" "$execdir/$p" 2>/dev/null || \
ln -s "git" "$execdir/$p" 2>/dev/null || \
cp "$execdir/git" "$execdir/$p" || exit; \
done && \
remote_curl_aliases="git-remote-https git-remote-ftp git-remote-ftps" && \
for p in $remote_curl_aliases; do \
rm -f "$execdir/$p" && \
test -z "" && \
ln "$execdir/git-remote-http" "$execdir/$p" 2>/dev/null || \
ln -s "git-remote-http" "$execdir/$p" 2>/dev/null || \
cp "$execdir/git-remote-http" "$execdir/$p" || exit; \
done && \
./check_bindir "z$bindir" "z$execdir" "$bindir/git-add"
[root@node201.yinzhengjie.org.cn ~/git-2.12.2]# echo $?
0
[root@node201.yinzhengjie.org.cn ~/git-2.12.2]#
[root@node201.yinzhengjie.org.cn ~/git-2.12.2]# make install
5>.为git配置环境变量
[root@node201.yinzhengjie.org.cn ~]# tail - /etc/profile
#ADD git PATH by yinzhengjie
GIT_HOME=/yinzhengjie/softwares/git
PATH=$PATH:$GIT_HOME/bin
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# source /etc/profile
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# git version
git version 2.12.
[root@node201.yinzhengjie.org.cn ~]#
6>.配置Git
[root@node201.yinzhengjie.org.cn ~]# git config --list #查看全局配置信息,等效于"git config -l"
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# git config --global user.name "yinzhengjie" #提交git用户信息,即配置使用者git的用户
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# git config --global user.email "y1053419035@qq.com" #提交邮箱,即配置git使用的邮箱
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# git config --global color.ui true #显示语法高亮
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# git config --list
user.name=yinzhengjie
user.email=y1053419035@qq.com
color.ui=true
[root@node201.yinzhengjie.org.cn ~]# 关于git命令的基本使用博主推荐阅读:https://www.cnblogs.com/yinzhengjie/p/9545646.html
四.三.安装MySQL数据库(如果你要是用Gerrit默认的数据库则不需要执行这一步)
安装Mysql .7详情请参考:https://www.cnblogs.com/yinzhengjie/p/10371899.html
[root@node201.yinzhengjie.org.cn ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.-log MySQL Community Server (GPL) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
mysql> SELECT USER(); #查看当前登陆用户
+----------------+
| USER() |
+----------------+
| root@localhost |
+----------------+
row in set (0.01 sec) mysql>
mysql>
mysql> CREATE DATABASE gerrit DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; #创建数据库,并制定默认的字符编码及排序规则
Query OK, row affected (0.00 sec) mysql>
mysql> CREATE USER gerrit@'172.30.1.20%' IDENTIFIED WITH mysql_native_password BY 'yinzhengjie'; #创建一个'gerrit'@'172.30.1.20%'的用户
Query OK, rows affected (0.00 sec) mysql>
mysql> GRANT ALL PRIVILEGES ON gerrit.* TO gerrit@'172.30.1.20%'; #为我们刚刚创建的用户授权。
Query OK, rows affected (0.00 sec) mysql>
mysql> FLUSH PRIVILEGES; #刷新权限。
Query OK, rows affected (0.00 sec) mysql>
mysql> SELECT user,host,plugin FROM mysql.user; #查看创建的用户是否在user列表
+---------------+--------------+-----------------------+
| user | host | plugin |
+---------------+--------------+-----------------------+
| root | localhost | mysql_native_password |
| mysql.session | localhost | mysql_native_password |
| mysql.sys | localhost | mysql_native_password |
| gerrit | 172.30.1.20% | mysql_native_password |
+---------------+--------------+-----------------------+
rows in set (0.00 sec) mysql>
mysql> QUIT
Bye
You have new mail in /var/spool/mail/root
[root@node201.yinzhengjie.org.cn ~]#
[root@node203.yinzhengjie.org.cn ~]# mysql -ugerrit -h node201.yinzhengjie.org.cn -pyinzhengjie
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.-log MySQL Community Server (GPL) Copyright (c) , , Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| gerrit |
+--------------------+
rows in set (0.00 sec) mysql>
mysql> QUIT
Bye
[root@node203.yinzhengjie.org.cn ~]#
[root@node203.yinzhengjie.org.cn ~]# mysql -ugerrit -h node201.yinzhengjie.org.cn -pyinzhengjie #测试连通性
五.部署Gerrit
1>.创建gerrit用户
[root@node201.yinzhengjie.org.cn ~]# useradd -d /yinzhengjie/softwares/gerrit gerrit
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# ll /yinzhengjie/softwares/gerrit/
total
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# ll -d /yinzhengjie/softwares/gerrit/
drwx------ gerrit gerrit Jun : /yinzhengjie/softwares/gerrit/
[root@node201.yinzhengjie.org.cn ~]#
2>.切换到gerrit的家目录
[root@node201.yinzhengjie.org.cn ~]# su gerrit
[gerrit@node201.yinzhengjie.org.cn /root]$ cd
[gerrit@node201.yinzhengjie.org.cn ~]$
[gerrit@node201.yinzhengjie.org.cn ~]$ pwd
/yinzhengjie/softwares/gerrit
[gerrit@node201.yinzhengjie.org.cn ~]$
[gerrit@node201.yinzhengjie.org.cn ~]$ ll
total
[gerrit@node201.yinzhengjie.org.cn ~]$
3>.下载Gerrit2.15.14版本
[gerrit@node201.yinzhengjie.org.cn ~]# wget https://gerrit-releases.storage.googleapis.com/gerrit-2.15.14.war
4>.安装Gerrit
[gerrit@node201.yinzhengjie.org.cn ~]$ mkdir soft && mv gerrit-2.15..war soft/ && cd soft
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ll
total
-rw-r--r-- gerrit gerrit Jun : gerrit-2.15..war
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ java -jar gerrit-2.15..war init
Using secure store: com.google.gerrit.server.securestore.DefaultSecureStore
[-- ::,] [main] INFO com.google.gerrit.server.config.GerritServerConfigProvider : No /yinzhengjie/softwares/gerrit/./etc/gerrit.config; assuming defaults *** Gerrit Code Review 2.15.
*** *** Git Repositories
*** Location of Git repositories [git]: #指定gerrit存储库的位置,我们可以自定义存储路径,以后我们在Gerrit上创建的存储库都会在我们指定的这个路径中。 *** SQL Database
*** Database server type [h2]: ? #默认使用h2数据库,我并不推荐大家使用咱们不熟悉的数据库,因此我们可以输入"?"查看gerrit都支持哪些数据库
Supported options are:
db2
derby
h2
hana
jdbc
mariadb
maxdb
mysql
oracle
postgresql
Database server type [h2]: mysql #我们这里选择MySQL数据库,我们在前面已经安装了数据库并配置了相应的权限 Gerrit Code Review is not shipped with MySQL Connector/J 5.1.
** This library is required for your configuration. **
Download and install it now [Y/n]? y #这里是在询问我们是否要下载MySQL的连接器,想必大家也都知道他是干嘛的,没错,就是链接数据库用的驱动包而已,因此我们这里要输入"y"他会自动去下载
Downloading https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.43/mysql-connector-java-5.1.43.jar ... OK
Checksum mysql-connector-java-5.1..jar OK #很显然,这里提示驱动下载完成啦
Server hostname [localhost]: node201.yinzhengjie.org.cn #这里输入MySQL的主机名
Server port [(mysql default)]: #这里输入MySQL的默认端口
Database name [reviewdb]: gerrit #这里输入MySQL的存放数据的数据库名称
Database username [gerrit]: #这里输入MySQL的用户名,默认就是gerrit,没错,我们创建用户时指定的yoghurt就是Gerrit,因此这里回车即可
gerrit's password : #这里需要输入2次链接数据库的密码
confirm password : *** Index
*** Type [lucene/?]: #选择索引类型,我们默认使用lucene即可,如果不知道使用
Supported options are:
lucene
elasticsearch *** User Authentication
*** Authentication method [openid/?]: ? #查看支持的认证类型
Supported options are:
openid
openid_sso
http
http_ldap
client_ssl_cert_ldap
ldap
ldap_bind
custom_extension
development_become_any_account
oauth
Authentication method [openid/?]: development_become_any_account #第一次安装我们选择这种模式,用这种模式我们可以去整一个管理员。
Enable signed push support [y/N]? n #是否启用签名的推送支持 *** Review Labels
*** Install Verified label [y/N]? y #安装已验证标签,即进行校验。 *** Email Delivery
*** SMTP server hostname [localhost]: smtp.qq.com #输入自动发送邮箱的SMTP服务器
SMTP server port [(default)]: #/994是SSL协议端口,25是非SSL协议端口
SMTP encryption [none/?]: SSL #如果上一步输入的是465/,此处输入SSL,否则直接回车即可
SMTP username [gerrit]: y1053419035@qq.com #这里的SMTP的用户名为你用来发送邮箱的账号
y1053419035@qq.com's password : #需要输入2授权码验证,注意,它是邮箱的授权码,而非邮箱密码!QQ邮箱有获取授权码的链接教程,感兴趣的小伙伴可以戳进去看看。
confirm password : *** Container Process
*** Run as [gerrit]: #指定运行gerrite程序的运行用户,默认是当前用户,我们默认即可
Java runtime [/usr/lib/jvm/java-1.8.-openjdk-1.8.0.212.b04-.el7_6.x86_64/jre]: #JAVA的运行环境,如果它识别有误,你可以只当你服务器的运行环境
Copy gerrit-2.15..war to ./bin/gerrit.war [Y/n]? Y #拷贝gerrit安装包
Copying gerrit-2.15..war to ./bin/gerrit.war *** SSH Daemon
*** Listen on address [*]: node201.yinzhengjie.org.cn #指定SSH后台服务器的监听地址
Listen on port []: #只当SSH后台服务的端口号
Generating SSH host key ... rsa... dsa... ed25519... ecdsa ... ecdsa ... ecdsa ... done *** HTTP Daemon
*** Behind reverse proxy [y/N]? N #是否使用反向代理
Use SSL (https://) [y/N]? N #不使用SSL
Listen on address [*]: node201.yinzhengjie.org.cn #指定gerrit监听地址
Listen on port []: #只当gerrit的服务端口
Canonical URL [http://node201.yinzhengjie.org.cn:8080/]: http://172.30.1.201:8080 #指定访问的URL,我们默认也是可以的 *** Cache
*** *** Plugins
*** Installing plugins.
Install plugin commit-message-length-validator version v2.15.14 [y/N]? Y #接下来就是询问我们是否安装插件,一路输入"Y"即可~
Installed commit-message-length-validator v2.15.14
Install plugin download-commands version v2.15.14 [y/N]? Y
Installed download-commands v2.15.14
Install plugin hooks version v2.15.14 [y/N]? Y
Installed hooks v2.15.14
Install plugin replication version v2.15.14 [y/N]? Y
Installed replication v2.15.14
Install plugin reviewnotes version v2.15.14 [y/N]? Y
Installed reviewnotes v2.15.14
Install plugin singleusergroup version v2.15.14 [y/N]? Y
Installed singleusergroup v2.15.14
Initializing plugins. *** Experimental features
*** Enable any experimental features [y/N]? Y
Default to PolyGerrit UI [Y/n]? Y
Enable GWT UI [Y/n]? Y Mon Jun :: EDT WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Mon Jun :: EDT WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Mon Jun :: EDT WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. *** Gerrit Administrator
*** Create administrator user [Y/n]? Y #是否创建管理员用哦过户
username [admin]: #指定用户名,默认是admin
name [Administrator]:
HTTP password [secret]: admin #指定HTTP的密码
public SSH key file []:
email [admin@example.com]: y1053419035@qq.com #指定邮箱地址
Initialized /yinzhengjie/softwares/gerrit/soft
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
如果你使用的MySQL 5.7版本作为Gerrit的数据库可能会抛出以下异常:(手动创建出对应的表后,我们就会)
mysql> CREATE TABLE account_group_by_id_aud (added_by INT DEFAULT 0 NOT NULL, removed_by INT, removed_on TIMESTAMP NULL DEFAULT NULL, group_id INT DEFAULT 0 NOT NULL, include_uuid VARCHAR(255) BINARY DEFAULT '' NOT NULL, added_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(group_id,include_uuid,added_on));
Query OK, 0 rows affected (0.01 sec) mysql>
mysql> CREATE TABLE account_group_members_audit (added_by INT DEFAULT 0 NOT NULL, removed_by INT, removed_on TIMESTAMP NULL DEFAULT NULL, account_id INT DEFAULT 0 NOT NULL, group_id INT DEFAULT 0 NOT NULL, added_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(account_id,group_id,added_on));
Query OK, 0 rows affected (0.01 sec) mysql>
mysql> 参考链接:https://my.oschina.net/hopeMan/blog/1543780
mysql> CREATE TABLE changes (change_key VARCHAR(60) BINARY DEFAULT '' NOT NULL, created_on TIMESTAMP NOT NULL, last_updated_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, owner_account_id INT DEFAULT 0 NOT NULL, dest_project_name VARCHAR(255) BINARY DEFAULT '' NOT NULL, dest_branch_name VARCHAR(255) BINARY DEFAULT '' NOT NULL, status CHAR(1) DEFAULT ' ' NOT NULL, current_patch_set_id INT DEFAULT 0 NOT NULL, subject VARCHAR(255) BINARY DEFAULT '' NOT NULL, topic VARCHAR(255) BINARY, original_subject VARCHAR(255) BINARY, submission_id VARCHAR(255) BINARY, note_db_state TEXT, row_version INT DEFAULT 0 NOT NULL, change_id INT DEFAULT 0 NOT NULL ,PRIMARY KEY(change_id));
Query OK, 0 rows affected (0.01 sec) mysql>
解决方案:手动创建失败的表(详情请戳我)
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ java -jar gerrit-2.15..war init -d review-site #使用-d参数会指定安装的文件都存在在当前目录的review-site的包中,否则他会把所偶的文件都解压到当前目录中哟~
六.启动Gerrit服务
1>.运行启动命令
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ./bin/gerrit.sh status
Checking arguments to Gerrit Code Review:
GERRIT_SITE = /yinzhengjie/softwares/gerrit/soft
GERRIT_CONFIG = /yinzhengjie/softwares/gerrit/soft/etc/gerrit.config
GERRIT_PID = /yinzhengjie/softwares/gerrit/soft/logs/gerrit.pid
GERRIT_TMP = /yinzhengjie/softwares/gerrit/soft/tmp
GERRIT_WAR = /yinzhengjie/softwares/gerrit/soft/bin/gerrit.war
GERRIT_FDS =
GERRIT_USER = gerrit
GERRIT_STARTUP_TIMEOUT =
JAVA = /usr/lib/jvm/java-1.8.-openjdk-1.8.0.212.b04-.el7_6.x86_64/jre/bin/java
JAVA_OPTIONS =
RUN_EXEC = /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview
RUN_ARGS = -jar /yinzhengjie/softwares/gerrit/soft/bin/gerrit.war daemon -d /yinzhengjie/softwares/gerrit/soft [gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ./bin/gerrit.sh status #启动前
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ./bin/gerrit.sh start
Starting Gerrit Code Review: WARNING: Could not adjust Gerrit's process for the kernel's out-of-memory killer.
This may be caused by ./bin/gerrit.sh not being run as root.
Consider changing the OOM score adjustment manually for Gerrit's PID=33791 with e.g.:
echo '-1000' | sudo tee /proc//oom_score_adj
OK
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ./bin/gerrit.sh status
Checking arguments to Gerrit Code Review:
GERRIT_SITE = /yinzhengjie/softwares/gerrit/soft
GERRIT_CONFIG = /yinzhengjie/softwares/gerrit/soft/etc/gerrit.config
GERRIT_PID = /yinzhengjie/softwares/gerrit/soft/logs/gerrit.pid
GERRIT_TMP = /yinzhengjie/softwares/gerrit/soft/tmp
GERRIT_WAR = /yinzhengjie/softwares/gerrit/soft/bin/gerrit.war
GERRIT_FDS =
GERRIT_USER = gerrit
GERRIT_STARTUP_TIMEOUT =
JAVA = /usr/lib/jvm/java-1.8.-openjdk-1.8.0.212.b04-.el7_6.x86_64/jre/bin/java
JAVA_OPTIONS =
RUN_EXEC = /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview
RUN_ARGS = -jar /yinzhengjie/softwares/gerrit/soft/bin/gerrit.war daemon -d /yinzhengjie/softwares/gerrit/soft Gerrit running pid=
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ./bin/gerrit.sh status #启动后
2>.查看运行状态
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ss -ntl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 172.30.1.201: *:*
LISTEN 172.30.1.201: *:*
LISTEN *: *:*
LISTEN 127.0.0.1: *:*
LISTEN ::: :::*
LISTEN ::: :::*
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
3>.访问WebUI
七.制作gerrit systemd启动脚本
1>.编写脚本
[root@node201.yinzhengjie.org.cn ~]# cat /usr/lib/systemd/system/gerrit.service
[Unit]
Description=Web based code review and project management for Git based projects
After=network.target [Service]
Type=forking
User=gerrit
EnvironmentFile=/yinzhengjie/softwares/gerrit/soft/etc/gerrit.config
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=gerrit
ExecStart=/yinzhengjie/softwares/gerrit/soft/bin/gerrit.sh start
ExecStop=/yinzhengjie/softwares/gerrit/soft/bin/gerrit.sh stop
PIDFile=/yinzhengjie/softwares/gerrit/soft/logs/gerrit.pid [Install]
WantedBy=multi-user.target
[root@node201.yinzhengjie.org.cn ~]#
2>.添加权限
[root@node201.yinzhengjie.org.cn ~]# ll /usr/lib/systemd/system/gerrit.service
-rw-r--r-- root root Jun : /usr/lib/systemd/system/gerrit.service
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# chmod u+x /usr/lib/systemd/system/gerrit.service
[root@node201.yinzhengjie.org.cn ~]#
[root@node201.yinzhengjie.org.cn ~]# ll /usr/lib/systemd/system/gerrit.service
-rwxr--r-- root root Jun : /usr/lib/systemd/system/gerrit.service
[root@node201.yinzhengjie.org.cn ~]#
3>.停止Gerrit服务
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ./bin/gerrit.sh stop
Stopping Gerrit Code Review: OK
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ./bin/gerrit.sh status
Checking arguments to Gerrit Code Review:
GERRIT_SITE = /yinzhengjie/softwares/gerrit/soft
GERRIT_CONFIG = /yinzhengjie/softwares/gerrit/soft/etc/gerrit.config
GERRIT_PID = /yinzhengjie/softwares/gerrit/soft/logs/gerrit.pid
GERRIT_TMP = /yinzhengjie/softwares/gerrit/soft/tmp
GERRIT_WAR = /yinzhengjie/softwares/gerrit/soft/bin/gerrit.war
GERRIT_FDS =
GERRIT_USER = gerrit
GERRIT_STARTUP_TIMEOUT =
JAVA = /usr/lib/jvm/java-1.8.-openjdk-1.8.0.212.b04-.el7_6.x86_64/jre/bin/java
JAVA_OPTIONS =
RUN_EXEC = /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview
RUN_ARGS = -jar /yinzhengjie/softwares/gerrit/soft/bin/gerrit.war daemon -d /yinzhengjie/softwares/gerrit/soft [gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ss -ntl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN *: *:*
LISTEN 127.0.0.1: *:*
LISTEN ::: :::*
LISTEN ::: :::*
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
4>.使用自定义脚本启动Gerrit服务
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ./bin/gerrit.sh stop
Stopping Gerrit Code Review: OK
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ systemctl start gerrit
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: Jason Yin (jason)
Password:
==== AUTHENTICATION COMPLETE ===
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ systemctl status gerrit
● gerrit.service - Web based code review and project management for Git based projects
Loaded: loaded (/usr/lib/systemd/system/gerrit.service; disabled; vendor preset: disabled)
Active: active (running) since Tue -- :: EDT; 13s ago
Process: ExecStart=/yinzhengjie/softwares/gerrit/soft/bin/gerrit.sh start (code=exited, status=/SUCCESS)
Main PID: (java)
CGroup: /system.slice/gerrit.service
└─ GerritCodeReview -jar /yinzhengjie/softwares/gerrit/soft/bin/gerrit.war daemon -d /yinzhengjie/softwares/gerrit/soft --run-id=1560878325.23985
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$ ss -ntl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 172.30.1.201: *:*
LISTEN 172.30.1.201: *:*
LISTEN *: *:*
LISTEN 127.0.0.1: *:*
LISTEN ::: :::*
LISTEN ::: :::*
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
[gerrit@node201.yinzhengjie.org.cn ~/soft]$
5>.遇到的问题 (下面是查看系统日志的相关报错)
问题分析:
编译安装的git貌似我们在编写启动脚本时,systemd进程识别不到,可以是路径问题。 解决方案:
最简单的解决方案就是使用yum方式安装,问题自然迎刃而解。
[root@node201.yinzhengjie.org.cn ~]# yum -y install git 总结:
好像 gerrit 服务器端,使用1.8就行
[root@node201.yinzhengjie.org.cn ~]# git --version
git version 1.8.3.1
[root@node201.yinzhengjie.org.cn ~]#
只有客户端的git才要求1.8以上,因为我之前在使用gerrit3.0版本时,使用git1.8会报错哟~ 启动服务时,我们应该查看日志信息,如果启动成功会有以下日志输出:
[root@node201.yinzhengjie.org.cn ~]# tail -100f /var/log/messages
Gerrit代码审计系统实战-Gerrit 2.15.14版本快速搭建的更多相关文章
- Ubuntu 14.04快速搭建SVN服务器及日常使用【转】
转自:http://www.linuxidc.com/Linux/2015-05/117735.htm 1.介绍 Subversion是一个自由,开源的版本控制系统,这个版本库就像一个普通的文件服务 ...
- Ubuntu 14.04快速搭建SVN服务器及日常使用
1.介绍 Subversion是一个自由,开源的版本控制系统,这个版本库就像一个普通的文件服务器,不同的是,它可以记录每一次文件和目录的修改情况.这样就可以很方面恢复到以前的版本,并可以查看数据更改 ...
- mysql 5.7.15单机主从快速搭建并配置复制表到不同库
一直以来因为线上系统盘中风控计算过于消耗资源,导致服务器负载太高,时常影响盘中交易的稳定性,最近决定了将风控拆分到独立的库进行计算,并进行回填操作. 总体来说,是将部分风控计算相关的表同步到备库,但是 ...
- 4、Django实战第4天:xadmin快速搭建后台管理系统
Django默认为我们提供了后台管理系统admin, urls.py中配置的第一条就是访问后台管理系统admin的 urlpatterns = [ url(r'^admin/', admin.site ...
- Gerrit代码Review实战
代码审核(Code Review)是软件研发质量保障机制中非常重要的一环,但在实际项目执行过程中,却因为种种原因被Delay甚至是忽略.在实践中,给大家推荐一款免费.开放源代码的代码审查软件Gerri ...
- Gerrit - 代码评审工具Gerrit简介与安装
1 - 前言 Code Review 代码评审是指在软件开发过程中,对源代码的系统性检查,改进代码质量,查找系统缺陷,保证软件总体质量和提高开发者自身水平. 简单的说,Code Review是用来确认 ...
- SpringBoot2.1电商通用(微信+支付宝)支付系统实战
『课程目录』: ├─第10章 全模块电商系统之商品模块 │ 10-1_商品列表-上.mp4 │ 10-2_商品列表-中.mp4 │ 10-3_商品列表-下.mp4 │ ...
- Linux系统实战项目——sudo日志审计
Linux系统实战项目——sudo日志审计 由于企业内部权限管理启用了sudo权限管理,但是还是有一定的风险因素,毕竟运维.开发等各个人员技术水平.操作习惯都不相同,也会因一时失误造成误操作,从而 ...
- Python Cookbook(第3版)中文版:15.14 传递Unicode字符串给C函数库
15.14 传递Unicode字符串给C函数库¶ 问题¶ 你要写一个扩展模块,需要将一个Python字符串传递给C的某个库函数,但是这个函数不知道该怎么处理Unicode. 解决方案¶ 这里我们需要考 ...
随机推荐
- springboot+mybatisplus+druid数据库
1.添加maven依赖 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis ...
- error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
. . . . . 今天从 github 上 clone 代码的时候,出现了一个错误,重试多次后仍然出现,错误如下: >$ git clone https://github.com/BOINC/ ...
- matlab学习笔记12单元数组和元胞数组 cell,celldisp,iscell,isa,deal,cellfun,num2cell,size
一起来学matlab-matlab学习笔记12 12_1 单元数组和元胞数组 cell array --cell,celldisp,iscell,isa,deal,cellfun,num2cell,s ...
- 开发日记:在VS项目中使用SVN版本号作为编译版本号
在实际项目中(特别是作为产品的项目),版本号是必不可少的一部分.版本号的规则也有许多种,在此不讨论具体的编码规范.对于迭代的产品,版本繁多,特别是有多个实施项目所使用产品的版本不同(基于定制需求)时, ...
- Flask自动刷新前端页面(方便调试)livereload
是不是每次调整模板文件,就要停止flask服务器,重启flask服务器,再去浏览器刷新页面? 有没有办法自动完成这3步呢? 安装livereload即可, 仅仅把app.run() 改为下面的例子就可 ...
- OCR(Optical Character Recognition)算法总结
https://zhuanlan.zhihu.com/p/84815144 最全OCR资料汇总,awesome-OCR
- 【论文阅读】PBA-Population Based Augmentation:Efficient Learning of Augmentation Policy Schedules
参考 1. PBA_paper; 2. github; 3. Berkeley_blog; 4. pabbeel_berkeley_EECS_homepage; 完
- 转 python2 与 python3 的编码
原文链接:https://blog.csdn.net/xufive/article/details/102726739 引文如下: 无论是py2还是py3,都使用unicode作为内存编码,简称内码. ...
- [Mobi] cordova requirements,Exception in thread "main" java.lang.NoClassDefFoundError
Cordova App Preparation https://quasar.dev/quasar-cli/developing-cordova-apps/preparation $ cordova ...
- Zabbix 3.0 配置企业微信报警(配置zabbix-web)
一.添加报警媒体类型 Name:自定义 Type:选择script Scripts name:填写脚本名称 Script parameters:脚本参数 --corpid=XXX --corpsecr ...