位置: 编程技术 - 正文
推荐整理分享CentOS中Git客户端的安装和基础配置教程(github centos),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:centos装git,centos7搭建git服务器,centos8 git,centos git,github centos,centos git,centos git服务器搭建,git centos7,内容如对您有帮助,希望把文章链接给更多的朋友!
安装目前的项目使用了GIT来进行版本管理,所以学习一下GIT的安装也是应该的了。本文介绍的是编译安装git1.9.0。虽然现在已经到2.6了。所有命令请在root下进行。第一步,安装依赖包。在开始编译安装git之前,首先应该安装好必要的依赖包,省得在安装过程中出现各种问题。复制代码代码如下:#yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker第二步,下载并编译git。你可以从kernel.org上下载自己需要的版本,或者直接像我这样下载1.9.0版本。切换到src目录,下载并解压git源码。复制代码代码如下:#cd /usr/srcwget xzf git-1.9.0.tar.gz进入到解压出的git目录,执行编译。复制代码代码如下:#cd git-1.9.0# make prefix=/usr/local/git all# make prefix=/usr/local/git install# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc# source /etc/bashrc第三步,完成。现在你已经成功安装好了git,可以执行以下命令查看git版本。复制代码代码如下:# git --version现在的fedora中已经自带了git2.4以上的版本。
简单配置我们生成公钥并复制到服务器上:复制代码代码如下:[root@test ~]# ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/root/.ssh/id_rsa):Created directory '/root/.ssh'.Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /root/.ssh/id_rsa.Your public key has been saved in /root/.ssh/id_rsa.pub.The key fingerprint is::3c::::f1:a2:e5:::cb:4f:a7:a0::9d root@test.com[root@test ~]# cat .ssh/id_rsa.pubssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwrmgNAcaBKzXl6BPfdaclAoWfW+x4kPDZMPj1zFoML9JfOAS7DGY9quLMitwwfg5+U7zP/egPmAhSKCECubmodzMucnRSkJGgKCt1SlctRNDRN3OIvrecAtdZfDcBaWKLjaVzGPmhweLhr6HzfqeZUCcis4yK3RMwip2f+K1ZZVIOKUmL4AVFl9dqtxnQ4HlWPUxvM/ug2MZ0jQk5DVG8w5+dvGqX1qr5YABD1NX5Jz6aUbVVx7yyoORENxu6SKGI/V7eOkrvBMDh9nDdwvDhPhuhBDSfE+XihPJPKdNroF1vx8HMvpHMEMmjSwavPrz+BMQ== root@test.com下面我们复制id_rsa.pub里的公钥到服务器的authorized_keys文件中。复制代码代码如下:[root@git ~]# su gitbash-3.2$ cdbash-3.2$ vim .ssh/authorized_keysssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwMU4FKB6NRc3XSoIunWsdvVVuSoncbVb5Al6lB3ciswBVd++YmJFhqwkITNGccrO5sycROs9+Fbjgd6oBSzNuaBtCIbwNNsEyM/henTl2euI3XsnJQ/ITr6c/q0P3WoGl4E2QFQ2kZqs+1eDC0CgHcBrqvFv1JrsVYK9lfZwIF+jDdtaBOrSJuq1Agx9pGUFUEB4tQfkXxsWm/MvOmKAVvduKDE1eenUEL9zzyeELPcSXLe3NOoTjZhkX6EEXxQR1ZiZRFywLpfM4qopZto2KIUyVtzw6hx6V3cg7knlYVW0EAMATw9dVldwcRUI+kJzJSKUTKDVSwY3/+Q== root@CHENMINGQIANssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsmmJuR+KhRSpdSirCiLRA8WbfgicY1z7itWVnKHJW6hTuJFhzruYFilVjJR1hbQBluP9JnK3XPSK9PSg+bwiJ2iQRarXckr+trVOLyNbPyfKVRfOemD8YuykMlyr5JeW8gZjsHEuLnJ8//RiCiYzd3RT/SSUQ4yawDoIIWkz3eUSLxoCRZFBsAp+S/LD3vx2MN+FNOHwvqcE+yK3oRNIqjWwLoKE0e5TRnqNgrPQPJYB3XPUulzaeMwsWPZs7jIUMl/5yEqSgAkioa8SVMOsikYJG/ervNNVgFmpCBIiWqKEGkNrIpYzLLHDSYQ4g5Gbci/RZQ== Administrator@WINXssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NwUHeNNi+PC6KlrcJrXXDmKxRMmgHIPpsgX6zqfdSlmNj7rBPQeyEKS9Wg8yI6jd8aG2jsUxVjti2VK2vEXKkRHxwID7rigERfDtv6ekafnzLoJ8hAp0spMk+N3wEAQRYDmcYo1wmnm/jMBedGrHj4NJQ1vYy1hVtJasGMSzjcMrlz9qvaluWnQ5tQjKFQVVwKsRRRzs8qTvzVhLJt4NQ+CANtqfsRufUba9QNK7/6xSUiIKXQiILz8PMGJ3MnlV+eN3wx2aeztdevxu9plggtGSMmd8GNVzXrN1IaxXSvz0UwjQ2kygu7aCqO8AZWHrouw== leo@LEO-PCssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwrmgNAcaBKzXl6BPfdaclAoWfW+x4kPDZMPj1zFoML9JfOAS7DGY9quLMitwwfg5+U7zP/egPmAhSKCECubmodzMucnRSkJGgKCt1SlctRNDRN3OIvrecAtdZfDcBaWKLjaVzGPmhweLhr6HzfqeZUCcis4yK3RMwip2f+K1ZZVIOKUmL4AVFl9dqtxnQ4HlWPUxvM/ug2MZ0jQk5DVG8w5+dvGqX1qr5YABD1NX5Jz6aUbVVx7yyoORENxu6SKGI/V7eOkrvBMDh9nDdwvDhPhuhBDSfE+XihPJPKdNroF1vx8HMvpHMEMmjSwavPrz+BMQ== root@test.com下面我们clone一个仓库到本地的目录中。复制代码代码如下:[root@test ~]# cd /data/dev[root@test dev]# git clone git@git.jjhh.com:/data/git/project.gitCloning into 'project'...The authenticity of host 'git.jjhh.com (...)' can't be established.RSA key fingerprint is ca:ec:a2:7e:e6::ca::d3::7f:4b:c3:c0:c7:fd.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'git.jjhh.com,...' (RSA) to the list of known hosts.remote: Counting objects: , done.remote: Compressing objects: % (/), done.remote: Total (delta ), reused 0 (delta 0)Receiving objects: % (/), 4. KiB, done.Resolving deltas: % (/), done.[root@test dev]# lsproject[root@test dev]# cd project/[root@test project]# lsindex.html好了,到这里我们的git客户端到这里就全部安装完成了。
CentOS系统上搭建Git版本控制服务器的教程 1.yum安装Git服务器复制代码代码如下:[root@git~]#cdsrc/[root@gitsrc]#
CentOS系统中GitLab客户端的安装教程 添加epel仓库复制代码代码如下:cat/etc/yum.repos.d/epel.repoEOF[epel]name=ExtraPackagesforEnterpriseLinux6-$basearch#baseurl=
CentOS中Xen虚拟机的安装与基本操作教程 因为从RHEL6版本开始,RedHat就不在原生支持Xen,改为投奔KVM的怀抱。尽管KVM号称支援HVM技术的全虚拟化,但KVM毕竟起步晚,远不如Xen技术成熟,运行多个
标签: github centos
本文链接地址:https://www.jiuchutong.com/biancheng/353568.html 转载请保留说明!上一篇:详解VPS上给CentOS添加硬盘而不用重启服务器的方法(centos配置vps)
下一篇:CentOS系统上搭建Git版本控制服务器的教程(centos环境搭建)
友情链接: 武汉网站建设