본문 바로가기

OS/Linux

CentOS git 설치하기.

1. git 설치에 필요한 library 설치.


[root@leechul ~]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.tt.co.kr

 * extras: centos.tt.co.kr

 * rpmforge: ftp.riken.jp

 * updates: centos.tt.co.kr

Setting up Install Process

Package curl-devel-7.15.5-17.el5_9.i386 already installed and latest version

Package expat-devel-1.95.8-11.el5_8.i386 already installed and latest version

Package zlib-devel-1.2.3-7.el5.i386 already installed and latest version

Resolving Dependencies

--> Running transaction check

---> Package gettext-devel.i386 0:0.17-1.el5 set to be updated

---> Package openssl-devel.i386 0:0.9.8e-27.el5_10.3 set to be updated

--> Processing Dependency: openssl = 0.9.8e-27.el5_10.3 for package: openssl-devel

--> Running transaction check

---> Package openssl.i686 0:0.9.8e-27.el5_10.3 set to be updated

--> Finished Dependency Resolution


Dependencies Resolved


============================================================================================================================================================================================================================================

 Package                                                    Arch                                              Version                                                            Repository                                            Size

============================================================================================================================================================================================================================================

Installing:

 gettext-devel                                              i386                                              0.17-1.el5                                                         base                                                 364 k

Updating:

 openssl-devel                                              i386                                              0.9.8e-27.el5_10.3                                                 updates                                              1.9 M

Updating for dependencies:

 openssl                                                    i686                                              0.9.8e-27.el5_10.3                                                 updates                                              1.5 M


Transaction Summary

============================================================================================================================================================================================================================================

Install       1 Package(s)

Upgrade       2 Package(s)


Total download size: 3.7 M

Is this ok [y/N]: y

Downloading Packages:


(1/3): gettext-devel-0.17-1.el5.i386.rpm                                                                                                                                                                             | 364 kB     00:00     


(2/3): openssl-0.9.8e-27.el5_10.3.i686.rpm                                                                                                                                                                           | 1.5 MB     00:00     


(3/3): openssl-devel-0.9.8e-27.el5_10.3.i386.rpm                                                                                                                                                                     | 1.9 MB     00:00     

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-----------중략-------------------


Total                                                                                                                                                                                                       4.9 MB/s | 3.7 MB     00:00     

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction


  Updating       : openssl [                                                                                                                                                                                                          ] 1/5

  Updating       : openssl [##                                                                                                                                                                                                        ] 1/5


Installed:

  gettext-devel.i386 0:0.17-1.el5                                                                                                                                                                                                           


Updated:

  openssl-devel.i386 0:0.9.8e-27.el5_10.3                                                                                                                                                                                                   


Dependency Updated:

  openssl.i686 0:0.9.8e-27.el5_10.3                                                                                                                                                                                                         


Complete!


2. git 설치.


[root@leechul ~]#  yum install git-core

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.mirror.cdnetworks.com

 * extras: centos.mirror.cdnetworks.com

 * rpmforge: ftp.riken.jp

 * updates: centos.mirror.cdnetworks.com

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package git.i386 0:1.7.12.4-1.el5.rf set to be updated

--> Processing Dependency: perl-Git = 1.7.12.4-1.el5.rf for package: git

--> Processing Dependency: perl(DBI) for package: git

--> Processing Dependency: perl(Git) for package: git

--> Running transaction check

---> Package perl-DBI.i386 0:1.52-2.el5 set to be updated

---> Package perl-Git.i386 0:1.7.12.4-1.el5.rf set to be updated

--> Processing Dependency: perl(YAML::Any) for package: perl-Git

--> Processing Dependency: perl(SVN::Core) for package: perl-Git

--> Processing Dependency: perl(SVN::Client) for package: perl-Git

--> Processing Dependency: perl(SVN::Ra) for package: perl-Git

--> Processing Dependency: perl(SVN::Delta) for package: perl-Git

--> Running transaction check

---> Package perl-YAML.noarch 0:0.72-1.el5.rf set to be updated

---> Package subversion-perl.i386 0:1.6.11-12.el5_10 set to be updated

--> Finished Dependency Resolution


Dependencies Resolved


============================================================================================================================================================================================================================================

 Package                                                     Arch                                               Version                                                          Repository                                            Size

============================================================================================================================================================================================================================================

Installing:

 git                                                         i386                                               1.7.12.4-1.el5.rf                                                rpmforge                                             8.1 M

Installing for dependencies:

 perl-DBI                                                    i386                                               1.52-2.el5                                                       base                                                 600 k

 perl-Git                                                    i386                                               1.7.12.4-1.el5.rf                                                rpmforge                                              86 k

 perl-YAML                                                   noarch                                             0.72-1.el5.rf                                                    rpmforge                                              84 k

 subversion-perl                                             i386                                               1.6.11-12.el5_10                                                 updates                                              1.0 M


Transaction Summary

============================================================================================================================================================================================================================================

Install       5 Package(s)

Upgrade       0 Package(s)


Total download size: 9.9 M

Is this ok [y/N]: y

Downloading Packages:


(1/5): perl-YAML-0.72-1.el5.rf.noarch.rpm                                                                                                                                                                            |  84 kB     00:00     


-----------중략-------------------

  Installing     : perl-Git                                                                                                                                                                                                             5/5 


Installed:

  git.i386 0:1.7.12.4-1.el5.rf                                                                                                                                                                                                              


Dependency Installed:

  perl-DBI.i386 0:1.52-2.el5                          perl-Git.i386 0:1.7.12.4-1.el5.rf                          perl-YAML.noarch 0:0.72-1.el5.rf                          subversion-perl.i386 0:1.6.11-12.el5_10                         


Complete!


3. 정상동작확인.


[root@leechul ~]# git

usage: git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]

           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]

           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]

           [-c name=value] [--help]

           <command> [<args>]


The most commonly used git commands are:

   add        Add file contents to the index

   bisect     Find by binary search the change that introduced a bug

   branch     List, create, or delete branches

   checkout   Checkout a branch or paths to the working tree

   clone      Clone a repository into a new directory

   commit     Record changes to the repository

   diff       Show changes between commits, commit and working tree, etc

   fetch      Download objects and refs from another repository

   grep       Print lines matching a pattern

   init       Create an empty git repository or reinitialize an existing one

   log        Show commit logs

   merge      Join two or more development histories together

   mv         Move or rename a file, a directory, or a symlink

   pull       Fetch from and merge with another repository or a local branch

   push       Update remote refs along with associated objects

   rebase     Forward-port local commits to the updated upstream head

   reset      Reset current HEAD to the specified state

   rm         Remove files from the working tree and from the index

   show       Show various types of objects

   status     Show the working tree status

   tag        Create, list, delete or verify a tag object signed with GPG


See 'git help <command>' for more information on a specific command.