Fedora (Ubuntu) 搭建 Git 服务器方法 -- set Git sever on Fedora(Ubuntu)
2012-07-31 18:00
471 查看
Fedora (Ubuntu) 搭建 Git 服务器方法 -- set Git sever on Fedora(Ubuntu)
1. install openssh-server
cmd: yum install openssh-server (ubuntu: sudo apt-get install openssh-server)
2. install git-core
cmd: yum install git-core (ubuntu: sudo apt-get install git-core)
3. install gitosis
cmd:
cd ~/ gitosis_setup
git clone git://eagain.net/gitosis
or git clone https://github.com/res0nat0r/gitosis.git
or download the gitosis files(from: https://github.com/res0nat0r/gitosis) and unexpressed to gitosis_setup/
(yum install python-setuptools)
python setup.py install
4. create git user
cmd:
useradd -m git (ubuntu: sudo useradd -m git)
passwd git (ubuntu: sudo password git)
5. initial the gitosis
//first copy ssh key id_rsa.pub(google for id_rsa.pub produce) to /tmp then:
cmd:
cd /tmp
chmod 777 id_rsa.pub (ubuntu: sudo chmod 777 id_rsa.pub)
sudo -H -u git gitosis-init < id_rsa.pub
//enable others can clone the gitosis-admin.git
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
6.insatll gitweb
cmd:
yum install gitweb (ubuntu: sudo sudo apt-get gitweb)
7.install apache
cmd:
yum install httpd (ubuntu: sudo sudo apt-get apache2)
8. just for Ubuntu:
cmd:
cd /var/ www/
sudo ln -s / usr/ share/ gitweb/* . (do not lost the ".")
9. modify the gitweb.conf file
cmd:
$ echo "\$projectroot = '/srv/git/repositories';" > /etc/gitweb.conf
(ubuntu:
cmd:
sudo vim /etc/gitweb.conf
//then change the value of $projectroot to "/home/git/repositories")
sudo chmod 777 -R /home/git (ubuntu: sudo chmod 777 -R /home/git/repositories)
10. visit the gitweb
http://(localhost or 127.0.0.1 or ip)/git/gitweb.cgi
11. apache config and gitosis admistration
To be continued...
Reference
1. http://blog.csdn.net/wirror800/article/details/5189564
2. http://blog.csdn.net/jincheng121/article/details/7487860
3. http://markmcb.com/2008/09/19/installing-gitweb-on-fedora-linux-and-apache/
1. install openssh-server
cmd: yum install openssh-server (ubuntu: sudo apt-get install openssh-server)
2. install git-core
cmd: yum install git-core (ubuntu: sudo apt-get install git-core)
3. install gitosis
cmd:
cd ~/ gitosis_setup
git clone git://eagain.net/gitosis
or git clone https://github.com/res0nat0r/gitosis.git
or download the gitosis files(from: https://github.com/res0nat0r/gitosis) and unexpressed to gitosis_setup/
(yum install python-setuptools)
python setup.py install
4. create git user
cmd:
useradd -m git (ubuntu: sudo useradd -m git)
passwd git (ubuntu: sudo password git)
5. initial the gitosis
//first copy ssh key id_rsa.pub(google for id_rsa.pub produce) to /tmp then:
cmd:
cd /tmp
chmod 777 id_rsa.pub (ubuntu: sudo chmod 777 id_rsa.pub)
sudo -H -u git gitosis-init < id_rsa.pub
//enable others can clone the gitosis-admin.git
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
6.insatll gitweb
cmd:
yum install gitweb (ubuntu: sudo sudo apt-get gitweb)
7.install apache
cmd:
yum install httpd (ubuntu: sudo sudo apt-get apache2)
8. just for Ubuntu:
cmd:
cd /var/ www/
sudo ln -s / usr/ share/ gitweb/* . (do not lost the ".")
9. modify the gitweb.conf file
cmd:
$ echo "\$projectroot = '/srv/git/repositories';" > /etc/gitweb.conf
(ubuntu:
cmd:
sudo vim /etc/gitweb.conf
//then change the value of $projectroot to "/home/git/repositories")
sudo chmod 777 -R /home/git (ubuntu: sudo chmod 777 -R /home/git/repositories)
10. visit the gitweb
http://(localhost or 127.0.0.1 or ip)/git/gitweb.cgi
11. apache config and gitosis admistration
To be continued...
Reference
1. http://blog.csdn.net/wirror800/article/details/5189564
2. http://blog.csdn.net/jincheng121/article/details/7487860
3. http://markmcb.com/2008/09/19/installing-gitweb-on-fedora-linux-and-apache/
相关文章推荐
- ubuntu用git-daemon搭建git服务器和配置方法
- Linux Ubuntu搭建git服务器
- Ubuntu下搭建tftp服务器最简单方法
- ubuntu上配置git服务器 -增加apache2安装方法
- Ubuntu 16.04搭建git服务器
- ubuntu下面的git服务器搭建
- ubuntu下搭建svn服务器的方法
- ubuntu搭建git服务器
- 手把手教你在 Ubuntu 上搭建 Git 服务器
- ubuntu操作系统下GIT服务器搭建步骤
- Ubuntu Git服务器搭建
- [置顶] ubuntu完美搭建git服务器 客户端
- Ubuntu服务器下搭建php运行环境的方法
- 阿里云Ubuntu搭建git服务器
- SSH+Git Server on Windows - 在Windows下搭建Git服务器
- Ubuntu搭建Git服务器
- android 随手记 Ubuntu搭建git服务器
- ubuntu下为tiny6410搭建nfs服务器的方法
- Ubuntu下搭建Git服务器