centos 7 安装 Git-2.23.0

Git是一个免费的开源 分布式版本控制系统,旨在快速高效地处理从小型到大型项目的所有内容。

Git 易于学习,占地面积小,具有闪电般的快速性能。

它具有诸如Subversion,CVS,Perforce和ClearCase之类的SCM工具,并且具有廉价的本地分支,方便的暂存区域和 多个工作流等功能。

Git官方网站:https://git-scm.com/

Linux/Unix 源代码地址:https://mirrors.edge.kernel.org/pub/software/scm/git/

稳定版 | git-2.23.0.tar.gz | https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.23.0.tar.gz

1.下载源代码到目录 /usr/local/src/

[[email protected] ~]# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.23.0.tar.gz -nc -c -P /usr/local/src/

2.安装依赖包 {包含更多格式的文档(如 doc, html, info)}

yum install -y --exclude=kernel*,centos-release*,httpd,nginx,php,mysql,mairadb,python-psutil,python2-psutil,cacti,git,svn yum-fastestmirror redhat-lsb compat* logrotate lsof net-tools lrzsz cmake wget gcc gcc-c++ make zlib-devel readline-devel automake ncurses-devel epel-release bash-completion sysstat mlocate kernel kernel-headers kernel-devel iptables-services apr* autoconf bison bzip2 bzip2* bzip2-devel cpp curl curl-devel fontconfig fontconfig-devel freetype* freetype-devel gd gettext gettext-libs gettext-devel gettext-common-devel glibc glibc-devel glibc-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool libtool* libgomp libxml2 libxml2-devel libXpm* libxml* libXaw-devel libXmu-devel libtiff libtiff* mpfr ncurses* ntp ntpdate* openssl-devel patch pcre-devel php-common php-gd policycoreutils telnet t1lib t1lib* nasm nasm* libwebp libwebp-devel libjpeg-devel db4-devel libXpm-devel libc-client-devel openldap-devel mysql-devel libicu-devel libcurl libcurl-devel libzip cpan tcp_wrappers psmisc tree cyrus-sasl-md5 vim chrony rsync xinetd crontabs iptables-utils git dos2unix boost-devel boost-doc libxslt libxslt-devel libdb4* qpid* gnutls boost-system avahi-libs boost-thread dwz dyninst emacs-filesystem fipscheck fipscheck-lib gdb libdwarf libedit libgfortran unzip zip trousers pakchois nettle neon m4 mokutil libproxy libstdc++-devel libquadmath libquadmath-devel libmpc libmodman libgnome-keyring subversion-libs systemtap-devel systemtap-runtime openssh openssh-clients systemtap-client perl perl-Carp perl-Data-Dumper perl-Encode perl-Error perl-Exporter perl-File-Path perl-File-Temp perl-Filter perl-Getopt-Long perl-Git perl-HTTP-Tiny perl-PathTools perl-Pod-Escapes perl-Pod-Perldoc perl-Pod-Simple perl-Pod-Usage perl-Scalar-List-Utils perl-Socket perl-Storable perl-TermReadKey perl-Test-Harness perl-Text-ParseWords perl-Thread-Queue perl-Time-HiRes perl-Time-Local perl-XML-Parser perl-constant perl-libs perl-macros perl-parent perl-podlators perl-srpm-macros perl-threads perl-threads-shared screen tcpdump nc mtr nmap tcl policycoreutils-python policycoreutils-python.x86_64 httpd libjpeg gd php-mysql php-mbstring php-process  php-snmp php-ldap php-xml net-snmp net-snmp-utils rrdtool rrdtool-devel rrdtool-php help2man net-snmp-devel binutils libffi-devel libtasn1-devel p11-kit-devel dh-autoreconf expat-devel perl-devel asciidoc xmlto docbook2X --skip-broken && yum clean all && sudo ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi

3.解压源代码编译并安装

[[email protected] git-2.23.0]# cd
[[email protected] ~]# cd /usr/local/src/
[[email protected] src]# tar -zxvf git-2.23.0.tar.gz
[[email protected] src]# cd git-2.23.0
[[email protected] git-2.23.0]# mkdir -p /usr/local/git
[[email protected] git-2.23.0]# ./configure --prefix=/usr/local/git --with-gitconfig=/etc/gitconfig && make && make install
[[email protected] git-2.23.0]# make man && make install-man
[[email protected] git-2.23.0]# make html && make htmldir=/usr/share/doc/git-2.23.0 install-html
[[email protected] git-2.23.0]# git --version
git version 2.23.0
Git-2.23.0-64 windows客户端下载:https://github.com/git-for-windows/git/releases/download/v2.23.0.windows.1/Git-2.23.0-64-bit.exe
https://gitforwindows.org/
https://tortoisegit.org/download/
2.8.0.0-64 windows客户端中文包4M下载:https://download.tortoisegit.org/tgit/2.8.0.0/TortoiseGit-LanguagePack-2.8.0.0-64bit-zh_CN.msi
2.8.0.0-64 windows客户端安装包19M下载:https://download.tortoisegit.org/tgit/2.8.0.0/TortoiseGit-2.8.0.0-64bit.msi
创建 Git 仓库指定kings-dev_repo目录
[[email protected] local]# mkdir -p /data/git2.23
[[email protected] local]# cd /data/git2.23/
Initialized empty Git repository in /data/git2.23/.git/
[[email protected] git2.23]# git init kings-dev_repo
Initialized empty Git repository in /data/git2.23/kings-dev_repo/.git/

配置Git
[[email protected] git2.23]# git config --global user.name "Kings-dev"
[[email protected] git2.23]# git config --global user.email [email protected]163.com
[[email protected] git2.23]# git config --global core.editor emacs
[[email protected] git2.23]# git config --list
user.name=Kings-dev
user.email[email protected]163.com
core.editor=emacs
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
[[email protected] git2.23]# git config user.name
Kings-dev
创建用户授权仓库
[[email protected] git2.23]# useradd wwweee000
[[email protected] git2.23]# passwd wwweee000
Changing password for user wwweee000.
New password:
BAD PASSWORD: The password is a palindrome
Retype new password:
passwd: all authentication tokens updated successfully.
[[email protected] git2.23]# chown -R wwweee000:wwweee000 kings-dev_repo/.git/

原文地址:https://www.cnblogs.com/huixst/p/11672214.html

时间: 2024-10-09 15:58:13

centos 7 安装 Git-2.23.0的相关文章

linux(centos)下安装git并上传代码些许步骤(亲自验证过的步骤)

 以前听说了好多次github,但直到最近才第一次学习使用github来托管自己在linux下的代码!说实话,我自己在使用的时候从网上查了好多教程,但总觉得难以掌握(步骤过于繁琐),自己操作的时候还是蛮复杂的!(老实说是自己的理解能力不够)不过最终还是通过自己的摸索,学会了装载github并使用命令上传代码进行托管.     首先在使用git托管自己的代码之前,先要去git官方网站注册一个账号(注册的过程可以参考教程上的指导)步骤如下: (1)登录网址:https://github.com  填

centos上安装git

按照这篇文章 安装依赖: yum install curl yum install curl-devel yum install zlib-devel yum install openssl-devel yum install perl yum install cpio yum install expat-devel yum install gettext-devel 下载git源码包: https://github.com/git/git/releases 安装: cd /git源码包解压路径

CentOS 7 安装oracle 11.2.0.4 Error in invoking target 'agent nmhs' of makefile

%86时出现报错   Error in invoking target 'agent nmhs' of makefile 解决方案在makefile中添加链接libnnz11库的参数修改$ORACLE_HOME/sysman/lib/ins_emagent.mk,将$(MK_EMAGENT_NMECTL)修改为:$(MK_EMAGENT_NMECTL) -lnnz11建议修改前备份原始文件[[email protected] ~]$ cd $ORACLE_HOME/sysman/lib[[ema

centos 6.8 编译安装git 2.11.0

系统环境:CentOS release 6.8 (Final) 默认Git :1.7.1 需求git :2.11 卸载centos自带的git:yum remove git -y 下载git-2.11.0.tar.gz 上传至服务器,下载链接:http://distfiles.macports.org/git/ 解压安装git 并添加git到环境变量 cd /usr/local/src/ tar zxvf git-2.11.0.tar.gz make prefix=/usr/local/git 

CentOS 7 安装 Oracle 11.2.0.4

一.安装环境 CentOS Linux release 7.2.1511 (Core) Oracle Database 11g Release 2 (11.2.0.4) 二.安装前准备 2.1 修改主机名 修改/etc/sysconfig/network配置文件中的HOSTNAME变量 [[email protected] ~]# hostnamectl set-hostname oracledb ####永久性修改 [[email protected] ~]#vi /etc/sysconfig

centos下安装git

centOS安装git 目录 centOS安装git 前提 前言 开始 开始之前系统状态 选择编译脚本模式 安装依赖包 下载Git 解压 执行git程序安装成功 测试安装是否成功 前提: bandwagonHost购买的VPS 一个git账号 前言 因为搬瓦工上的VPS据说只能安装在centos下,因此楼主选择centos搭建远程git仓库. 开始 开始之前系统状态 强制删除文件命令(因楼主之前安装git出错了,使系统有残留) [root /]# rm -r -f git-1.9.0.tar.g

cenots6.5安装 git version 2.0.5

本地服务器版本:[root@vm_001034_op-test git-2.0.5]# cat /etc/redhat-release CentOS release 6.5 (Final)[root@vm_001034_op-test git-2.0.5]# 笔者从网上找了很多资料,最终参考几份资料才安装成功的.原因很简单,就是没有安装git的依赖包.以下yum是执行的一些解决依赖的yum命令,有些报错有些成功,应该是最后几条生效解决了 :yum groupinstall "Developmen

在centos上安装git

方式一.yum安装 # yum install git 通过yum方式安装,版本比较旧,CentOS6.5上安装好是1.7.1版.如果想安装最新版或其他版本,需要使用源码编译安装的方式. 方式二.源码包安装 步骤1. 安装依赖包 # yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel # yum install gcc perl-ExtUtils-MakeMaker 步骤2. 卸载旧的git版本(如果

babun编译安装git(2.12.0)遇到的问题及解决办法

1. 下载git wget https://www.kernel.org/pub/software/scm/git/git-2.12.0.tar.xz 你或许需要加上选项: --no-check-certificate 2. 解压 tar Jxvf git-2.12.0.tar.xz 3. 进入目录并编译 cd git-2.12.0./configuremake && make install 注意在执行./configure的时候会遇到很多命令缺失的问题,逐一通过pact命令安装相应软件

Linux(CentOS)下安装git

上个月把VPS迁到budgetVM,终于不用再受digitalOcean的气了,入手很方便,重点是支持支付宝付款——paypal的界面真是不习惯,开通速度挺快的,1G的内存够我折腾一段时间了~,额外送了俩IP,过段时间再研究下把我那几个二级域名也绑定过来 今天刚把主站部署好,发现CentOS默认没有git工具,Git官网 提示可以通过yum安装 yum install git 敲下命令,过了几分钟提示 Setting up Install Process No package git avail