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
34 7) Install the git-auth wrapper script:
36 # cd /srv/http/aurweb/git-interface/
37 # make && make install
39 8) Configure sshd(8) for the AUR. Add the following lines at the end of your
40 sshd_config(5) and restart the sshd. Note that OpenSSH 6.9 or newer is
44 PasswordAuthentication no
45 AuthorizedKeysCommand /usr/local/bin/aur-git-auth "%t" "%k"
46 AuthorizedKeysCommandUser aur
48 9) If you want to enable smart HTTP support with nginx and uWSGI, you can use
49 the following directives:
51 location ~ "^/([a-z0-9][a-z0-9.+_-]*?)(\.git)?/(git-(receive|upload)-pack|HEAD|info/refs|objects/(info/(http-)?alternates|packs)|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))$" {
54 uwsgi_param PATH_INFO /aur.git/$2;
55 uwsgi_param GIT_NAMESPACE $1;
56 uwsgi_pass unix:/run/uwsgi/smarthttp/aurweb.sock;
59 For the uWSGI configuration, the following template can be used:
66 env = GIT_HTTP_EXPORT_ALL=
67 env = GIT_PROJECT_ROOT=/srv/http/aurweb
68 cgi = /usr/lib/git-core/git-http-backend