4 1) Clone the AUR project:
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:
13 rewrite ^/(.*)$ /index.php/$1 last;
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
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/
31 # ln -s ../../git-interface/git-update.py hooks/update
32 # git config --local receive.denyNonFastForwards true
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
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/(.*)$ {
55 uwsgi_param PATH_INFO /aur.git/$2;
56 uwsgi_param GIT_NAMESPACE $1;
57 uwsgi_pass unix:/run/uwsgi/smarthttp/aurweb.sock;
60 For the uWSGI configuration, the following template can be used:
67 env = GIT_HTTP_EXPORT_ALL=
68 env = GIT_PROJECT_ROOT=/srv/http/aurweb
69 cgi = /usr/lib/git-core/git-http-backend