membangun server git pada ubuntu server 12.10

server git untuk coding bareng-bareng

Bismillah

q> Install git-core, apache2 dan gitweb

q> Update repo Ubuntu dulu

sudo apt-get update

q> Install git-core

sudo apt-get install git-core

q> Install apache2

sudo apt-get apache2

q> Install gitweb

sudo apt-get gitweb

q> Buat repo

sudo git init /var/git/myproject
q>
sudo git init --bare --shared /var/git/myproject

q> Edit file default pada /etc/apache2/site-available

sudo nano /etc/apache2/site-available/default

q> Menjadi seperti ini :

<VirtualHost *:80>
  DocumentRoot /var/git

  <Directory "/var/git">
    Allow from All
    Options +ExecCGI
    AllowOverride All
  </Directory>

  SetEnv GIT_PROJECT_ROOT /var/git
  SetEnv GIT_HTTP_EXPORT_ALL
  ScriptAlias /git/ /usr/lib/git-core/git-http-backend/

</VirtualHost>

q> kemudian simpan -> ctrl+o dan keluar ctrl+x

q> Kemudain edit lagi file gitweb.conf yang ada pada /etc

sudo nano /etc/gitweb.conf

q> Menjadi seperti ini

# path to git projects (<project>.git)
$projectroot = "/var/git";

# directory to use for temp files
$git_temp = "/tmp";

# target of the home link on top of all pages
#$home_link = $my_uri || "/";

# html text to include at home page
$home_text = "indextext.html";

# file with project list; by default, simply scan the projectroot dir.
$projects_list = $projectroot;

# stylesheet to use
$stylesheet = "/gitweb/gitweb.css";

# logo to use
$logo = "/gitweb/git-logo.png";

# the 'favicon'
$favicon = "/gitweb/git-favicon.png";

q> Kemudian simpan dengan Ctrl+O dan keluar dengan Ctrl+X

q> Kemudian edit file gitweb yang ada pada apache2

sudo nano /etc/apache2/conf.d/gitweb

q> Menjadi seperti ini

   Alias /gitweb /usr/share/gitweb

    <Directory /usr/share/gitweb>
       Options FollowSymLinks +ExecCGI
       AddHandler cgi-script .cgi
    </Directory>

q> Simpan dan keluar.

q> Restart apache2

sudo /etc/init.d/apache2 restart

q> Kemudian buka pada client web untuk server git menggunakan brower, seumpama IP address dari server git ini adalah 192.168.2.202 maka akses dengan alamat http://192.168.2.202/

Selection_132

q> Untuk membuka gitweb, misalnya IP address server git adalah 192.168.2.202 maka,

akases lewat browser http://192.168.2.202/gitweb

Selection_135

Alhamdulillah

Sumber ::
http://www.tikalk.com/setup-git-and-gitweb-under-apache-ubuntu

Published by

saifiahmada

Begin a big Process with a bit trying

2 thoughts on “membangun server git pada ubuntu server 12.10”

  1. 404 not found. The requested URL /gitweb was not found on this server.
    kira2 apa yang salah atau terlupakan?
    mohon koreksinya.

    terimakasih

Leave a reply to saifiahmada Cancel reply