git server搭建[test only]

目标=搭建一个测试用git server,不管安全,能用就行。

 

跟着下面文章做。

http://www.snowfrog.net/2011/08/02/setting-up-gitweb-on-your-ubuntu-workstation/
基本没问题。
================装apache2时,有点问题:
Couldn't configure pre-depend multiarch-support for libnih-dbus1, probably a dependency cycle.
可能是/etc/apt/sources.list更改过度。改回最初的文件,并进行了 清理
sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
---------------------------安装apache
sudo apt-get install apache2
---------------------------测试效果:
http://[ubuntu ip]

================安装gitweb时,出现版本问题:
The following packages have unmet dependencies:
  gitweb: Depends: git (< 1:1.7.1-.) but 1:1.7.9.5-1 is installed.
  git: Breaks: gitweb (< 1:1.7.4~rc1) but 1:1.7.1-1.1ubuntu0.1 is to be installed.
1)     gitweb [Not Installed]
Accept this solution? [Y/n/q/?] n
选择n,接下来还有选项,否则就没戏了。
-----------------------------
     Remove the following packages:
1)     git-man

     Install the following packages:
2)     libdigest-sha1-perl [2.13-1 (maverick)]

     Downgrade the following packages:
3)     git [1:1.7.9.5-1 (now) -> 1:1.7.1-1.1ubuntu0.1 (maverick-security, maveri
Accept this solution? [Y/n/q/?] Y
接受降级处理。
-----------------------------
Need to get 6,223kB of archives. After unpacking 2,360kB will be freed.
Do you want to continue? [Y/n/?] Y
-----------------------------
最终安装成功:/etc/gitweb.conf文件存在了。
http://[ubuntu ip]/gitweb可以访问。

为了保证测试顺利,设置权限如下:
cd /var/www/foo.git
sudo chown -R [用户]:[组] *
sudo chmod -R 777 *

别烦我
别烦我

你可能感兴趣的:(apache,linux,ubuntu,git,httpd)