Do not use symrefs for manually created Git refs
[aur.git] / INSTALL
blob50405df2f02625b80135f8b7fb6268f2f43d61c8
1 Setup on Arch Linux
2 ===================
4 1) Clone the AUR project:
6    $ cd /srv/http/
7    $ git clone git://projects.archlinux.org/aurweb.git
9 2) Setup a web server with PHP and MySQL. Configure the web server to redirect
10    all URLs to /index.php/foo/bar/. The following block can be used with nginx:
12     location ~ .* {
13         rewrite ^/(.*)$ /index.php/$1 last;
14     }
16 3) Copy conf/config.proto to conf/config and adjust the configuration.
18 4) Create a new MySQL database and a user and import the AUR SQL schema:
20     $ mysql -uaur -p AUR </srv/http/aurweb/schema/aur-schema.sql
22 5) Create a new user:
24     # useradd -U -d /srv/http/aurweb -c 'AUR user' aur
26 6) Initialize the Git repository:
28     # mkdir /srv/http/aurweb/aur.git/
29     # cd /srv/http/aurweb/aur.git/
30     # git init --bare
31     # ln -s ../../git-interface/git-update.py hooks/update
32     # git config --local receive.denyNonFastForwards true
33     # chown -R aur .
35 7) Install the git-auth wrapper script:
37     # cd /srv/http/aurweb/git-interface/
38     # make && make install
40 8) Configure sshd(8) for the AUR. Add the following lines at the end of your
41    sshd_config(5) and restart the sshd. Note that OpenSSH 6.9 or newer is
42    needed!
44     Match User aur
45         PasswordAuthentication no
46         AuthorizedKeysCommand /usr/local/bin/aur-git-auth "%t" "%k"
47         AuthorizedKeysCommandUser aur
49 9) If you want to enable smart HTTP support with nginx and uWSGI, you can use
50    the following directives:
52     location ~ ^/([a-z0-9][a-z0-9.+_-]*)\.git/(.*)$ {
53         include uwsgi_params;
54         uwsgi_modifier1 9;
55         uwsgi_param PATH_INFO /aur.git/$2;
56         uwsgi_param GIT_NAMESPACE $1;
57         uwsgi_pass unix:/run/uwsgi/smarthttp/aurweb.sock;
58     }
60    For the uWSGI configuration, the following template can be used:
62     [uwsgi]
63     plugins = cgi
64     uid = aur
65     processes = 1
66     threads = 8
67     env = GIT_HTTP_EXPORT_ALL=
68     env = GIT_PROJECT_ROOT=/srv/http/aurweb
69     cgi = /usr/lib/git-core/git-http-backend