stats.inc.php: Show the 15 most recent updates
[aur.git] / INSTALL
bloba2a6153f14f76b6fbad88d9ee925494c96524026
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     # chown -R aur .
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
41    needed!
43     Match User aur
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/(.*)$ {
52         include uwsgi_params;
53         uwsgi_modifier1 9;
54         uwsgi_param PATH_INFO /aur.git/$2;
55         uwsgi_param GIT_NAMESPACE $1;
56         uwsgi_pass unix:/run/uwsgi/smarthttp/aurweb.sock;
57     }
59    For the uWSGI configuration, the following template can be used:
61     [uwsgi]
62     plugins = cgi
63     uid = aur
64     processes = 1
65     threads = 8
66     env = GIT_HTTP_EXPORT_ALL=
67     env = GIT_PROJECT_ROOT=/srv/http/aurweb
68     cgi = /usr/lib/git-core/git-http-backend