Hide old requests from the dashboard
[aur.git] / INSTALL
bloba472b277000f185c857ce1381359399ce6df9b3c
1 Setup on Arch Linux
2 ===================
4 1) Clone the aurweb project:
6    $ cd /srv/http/
7    $ git clone git://git.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     server {
13         listen       80;
14         server_name  aur.local aur;
16         root   /srv/http/aurweb/web/html;
17         index  index.php;
19         location ~ ^/[^/]+\.php($|/) {
20             fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
21             fastcgi_index  index.php;
22             fastcgi_split_path_info ^(/[^/]+\.php)(/.*)$;
23             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
24             fastcgi_param  PATH_INFO        $fastcgi_path_info;
25             include        fastcgi_params;
26         }
28         location ~ .* {
29             rewrite ^/(.*)$ /index.php/$1 last;
30         }
31     }
33 3) Copy conf/config.proto to /etc/aurweb/config and adjust the configuration
34    (pay attention to disable_http_login, enable_maintenance and aur_location).
36 4) Create a new MySQL database and a user and import the aurweb SQL schema:
38     $ mysql -uaur -p AUR </srv/http/aurweb/schema/aur-schema.sql
40 5) Install Python modules and dependencies:
42     # pacman -S python-mysql-connector python-pygit2 python-srcinfo
43     # python3 setup.py install
45 6) Create a new user:
47     # useradd -U -d /srv/http/aurweb -c 'AUR user' aur
49 7) Initialize the Git repository:
51     # mkdir /srv/http/aurweb/aur.git/
52     # cd /srv/http/aurweb/aur.git/
53     # git init --bare
54     # git config --local transfer.hideRefs '^refs/'
55     # git config --local --add transfer.hideRefs '!refs/'
56     # git config --local --add transfer.hideRefs '!HEAD'
57     # ln -s /usr/local/bin/aurweb-git-update hooks/update
58     # chown -R aur .
60    It is recommended to read doc/git-interface.txt for more information on the
61    administration of the package Git repository.
63 8) Configure sshd(8) for the AUR. Add the following lines at the end of your
64    sshd_config(5) and restart the sshd. Note that OpenSSH 6.9 or newer is
65    needed!
67     Match User aur
68         PasswordAuthentication no
69         AuthorizedKeysCommand /usr/local/bin/aurweb-git-auth "%t" "%k"
70         AuthorizedKeysCommandUser aur
72 9) If you want to enable smart HTTP support with nginx and fcgiwrap, you can
73    use the following directives:
75     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))$" {
76         fastcgi_pass   unix:/run/fcgiwrap.sock;
77         include        fastcgi_params;
78         fastcgi_param  SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
79         fastcgi_param  PATH_INFO /aur.git/$3;
80         fastcgi_param  GIT_HTTP_EXPORT_ALL "";
81         fastcgi_param  GIT_NAMESPACE $1;
82         fastcgi_param  GIT_PROJECT_ROOT /srv/http/aurweb/;
83     }
85    Sample systemd unit files for fcgiwrap can be found under conf/.