1、安装依赖
yum -y install perl cpio autoconf tk zlib-devel libcurl-devel openssl-devel expat-devel yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker cpan yum -y install epel-release yum -y install fcgi-devel yum install git yum install git-core yum install gitweb |
Tips:首先确保已经安装了apache2
2、配置
1)、添加git用户
useradd git
2)、配置访问git的用户名与密码
#创建密码文件
htpasswd -m -c /home/git/git-team.htpasswd <用户1>
#添加其他用户
htpasswd -m /home/git/git-team.htpasswd <用户2>
3)配置apache的虚拟主机
<VirtualHost *:80> ServerAdmin test@sina.com ServerName GitServer SetEnv GIT_PROJECT_ROOT /home/git SetEnv GIT_HTTP_EXPORT_ALL #安装git-core后,用find命令查一下git-htt |