Hosting Your Own Git Repository on fedora 12

This tutorial will covering common feature in git repository

  • commiting via ssh
  • Enable gitweb for web access
  • cloning anonymously using the Git protocol

    Install git, git-daemon

    # yum -y install git git-daemon gitweb
    

    Create a git user/group

    # useradd -U -d /var/cache/git -s /usr/libexec/git-core/git-shell git
    

    Make sure the permissions of the directory are correct

    # cd /var/cache
    # chown -R git:git git
    # chmod 755 git
    

    We’ll be using SSH keys for authenication, so collect the public keys of all the users who need commit access. Then, put the public keys into the right place

    # cd /var/cache/git
    # mkdir .ssh
    # chmod 700 .ssh
    # touch .ssh/authorized_keys
    # chmod 600 .ssh/authorized_keys
    (Put the public keys into authorized_keys, one per line)
    # chown -R git:git .ssh/
    

    → continue reading


Apache stress test

Apache includes a very useful tool for hammering the server. It’s called Apache Benchmark “ab” is the binary’s name and it can really hand a server it’s own ass if you don’t watch it.

$ ab -kc 10 -t 30 http://localhost/

That will open 10 connections, use Keep-Alive on them, and then hammer localhost for 30 seconds through those connections. When done,  you get a pretty little chart telling you what broke and how long it took to start screaming. you can increase number of connections or the duration time.

For best results, use it from another machine. You want to not only test the network connection but also leave the server’s CPU and OS to think about serving, not about pulling it down as well.


Page 1 of 3123