Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Self-built git server connection Pycharm series 2: on centos7

Shulou Source: shulou.com Published: 2022-06-03 08:16:23 11月23日 Update

On your own Linux virtual machine, build a git server to save the code.

Centos7 comes with git, which needs to be uninstalled and installed into a newer version.

1. Uninstall the system with its own version. The system already comes with [root@dscrapy01 ~] # git-- versiongit version 1.8.3.1 Uninstall git [root@dscrapy01 ~] # yum remove git [root@dscrapy01 ~] # git-- version-bash: / usr/bin/git: does not have that file or directory 2. Install the specified version

Tar package version has been downloaded: git-2.18.0.tar.gz

Official website: https://git-scm.com/

Installation

Extract to the specified path [root@dscrapy01 setup] # tar-zxvf git-2.18.0.tar.gz-C / home/software/ [root@dscrapy01 setup] # cd / home/software/git-2.18.0/ and go to the specified path to compile [root@dscrapy01 git-2.18.0] # / configure-- prefix=/usr/local/git-2.18.0 [root@dscrapy01 git-2.18.0] # make & & make install

When you are done, you need to add git to the environment variable

[root@dscrapy01 git-2.18.0] # vim / etc/profile add content: after GIT_HOME=/usr/local/git-2.18.0PATH=$GIT_HOME/bin is completed, source [root@dscrapy01 git-2.18.0] # source / etc/profile and edit the environment variable [root@dscrapy01 git-2.18.0] # vim ~ / .bashrc of root's non-login to add the same GIT_HOME=/usr/local/git-2.18 as above. .0PATH = $GIT_HOME/bin source [root@dscrapy01 git-2.18.0] # source ~ / .bashrc after completion

Note: be sure to modify .bashrc, otherwise an error will be reported later when you clone the project from the server (bash: git-upload-pack: command not found)

3. Inspection

Re-view the version information of git

[root@dscrapy01 git-2.18.0] # git--versiongit version 2.18.0

Now it has become the changed version.

Done.

Tags: Version server service content variable environment system path same code information file time directory project will report install verify compile Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MySQL macOS Xiaomi Shulou Tech Info