Changes

From Amahi Wiki
Jump to: navigation, search
34 bytes added ,  11:58, 13 March 2012
</BODY>
</HTML>' > html/index.html
chown apache.users html/index.html}}</li>
</ol>
* <li>Install dependencies{{Code|yum -y install git git-daemon gitweb}}</li>* <li>Add user{{Code|useradd -U -d /var/cache/git -s /usr/libexec/git-core/git-shell git}}</li>* <li>Set directory permissions
{{Code|cd /var/cache
chown -R git:git git
chmod 755 git}}</li>* <li>Create public SSH key storage
{{Code|cd /var/cache/git;
mkdir .ssh
touch .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
chown -R git:git .ssh/}}</li>* <li>Create init script
{{Code|vi /etc/init.d/git}}
<blockquote>
{{Text|Text=#!/bin/sh
<nowiki>#</nowiki>
esac
exit $RETVAL}}</blockquoteli>* <li>Set init script to run
{{Code|chmod 755 /etc/init.d/git;
chkconfig git on
service git start}}</li>* <li>Create repository
{{Code|cd /var/cache/git/
mkdir test.git
cd test.git
git init --bare
chown -R git:git ../test.git/}}</li>* <li>Add a short description
{{Code|cd /var/cache/git/test.git/
echo "test test repo" > description}}</li>* <li>Configure user access
{{Code|vi config}}
<blockquote>
{{Text|Text=[core]
repositoryformatversion = 0
[gitweb]
owner = Your Name}}</blockquoteli>* <li>Create local repository and commit
{{Code|mkdir ~/test
cd ~/test && git init
echo 'test' > README
git add README
git commit -m "initial README file"}}</li>* <li>Create SSH rsa public key{{Code|ssh-keygen -t rsa -C "admin@yourisp.com" -N amahi -f /var/cache/git/.ssh/authorized_keys}}</li>* <li>Push to the repository
{{Code|git remote add origin git@git.yourisp.com:test.git
git push origin master}}</li>* <li>Add to bottom of the configuration file
{{Code|vi /etc/gitweb.conf}}
<blockquote>
{{Text|Text=$feature{'blame'}{'default'} = [undef];
$feature{'pickaxe'}{'default'} = [undef];
$feature{'pathinfo'}{'default'} = [1];
$my_uri = "http://gitweb/git/";
$home_link = "http://gitweb/git/;"}}</blockquoteli>* <li>Copy web files and set permissions
{{Code|cp -r /var/www/git/* html
chown -R apache:users html}}</li></ul>
==Complete==
12,424

edits