server git untuk coding bareng-bareng
Bismillah
q> Install git-core, apache2 dan gitweb
q> Update repo Ubuntu dulu
[sourcecode language="bash"]sudo apt-get update[/sourcecode]
q> Install git-core
[sourcecode language="bash"]sudo apt-get install git-core[/sourcecode]
q> Install apache2
[sourcecode language="bash"]sudo apt-get apache2[/sourcecode]
q> Install gitweb
[sourcecode language="bash"]sudo apt-get gitweb[/sourcecode]
q> Buat repo
[sourcecode language="bash"]sudo git init /var/git/myproject[/sourcecode]
q>
[sourcecode language="bash"]sudo git init --bare --shared /var/git/myproject[/sourcecode]
q> Edit file default pada /etc/apache2/site-available
[sourcecode language="bash"]sudo nano /etc/apache2/site-available/default[/sourcecode]
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
[sourcecode language="bash"]sudo nano /etc/gitweb.conf[/sourcecode]
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
[sourcecode language="bash"]sudo nano /etc/apache2/conf.d/gitweb[/sourcecode]
q> Menjadi seperti iniAlias /gitweb /usr/share/gitweb
<Directory /usr/share/gitweb>
Options FollowSymLinks +ExecCGI
AddHandler cgi-script .cgi
</Directory>
q> Simpan dan keluar.
q> Restart apache2
[sourcecode language="bash"]sudo /etc/init.d/apache2 restart[/sourcecode]
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/
q> Untuk membuka gitweb, misalnya IP address server git adalah 192.168.2.202 maka,
akases lewat browser http://192.168.2.202/gitweb
Alhamdulillah
Sumber ::
http://www.tikalk.com/setup-git-and-gitweb-under-apache-ubuntu
404 not found. The requested URL /gitweb was not found on this server.
ReplyDeletekira2 apa yang salah atau terlupakan?
mohon koreksinya.
terimakasih
apakah apache nya sudah dijalankan ?? 404 not found berarti folder gitweb tidak ditemukan pada web server apache
ReplyDelete