INSTALL 1.96 KB
Newer Older
Lukas Fleischer's avatar
Lukas Fleischer committed
1
2
Setup on Arch Linux
===================
canyonknight's avatar
canyonknight committed
3

Lukas Fleischer's avatar
Lukas Fleischer committed
4
1) Clone the AUR project:
canyonknight's avatar
canyonknight committed
5

Lukas Fleischer's avatar
Lukas Fleischer committed
6
   $ cd /srv/http/
7
   $ git clone git://projects.archlinux.org/aurweb.git
canyonknight's avatar
canyonknight committed
8

Lukas Fleischer's avatar
Lukas Fleischer committed
9
10
11
12
13
14
2) Setup a web server with PHP and MySQL. Configure the web server to redirect
   all URLs to /index.php/foo/bar/. The following block can be used with nginx:

    location ~ .* {
        rewrite ^/(.*)$ /index.php/$1 last;
    }
canyonknight's avatar
canyonknight committed
15

Lukas Fleischer's avatar
Lukas Fleischer committed
16
3) Copy conf/config.proto to conf/config and adjust the configuration.
canyonknight's avatar
canyonknight committed
17

Lukas Fleischer's avatar
Lukas Fleischer committed
18
4) Create a new MySQL database and a user and import the AUR SQL schema:
canyonknight's avatar
canyonknight committed
19

Lukas Fleischer's avatar
Lukas Fleischer committed
20
    $ mysql -uaur -p AUR </srv/http/aurweb/schema/aur-schema.sql
canyonknight's avatar
canyonknight committed
21

22
5) Create a new user:
23

24
    # useradd -U -d /srv/http/aurweb -c 'AUR user' aur
25

26
6) Initialize the Git repository:
canyonknight's avatar
canyonknight committed
27

28
29
30
    # mkdir /srv/http/aurweb/aur.git/
    # cd /srv/http/aurweb/aur.git/
    # git init --bare
Lukas Fleischer's avatar
Lukas Fleischer committed
31
    # ln -s ../../git-interface/git-update.py hooks/update
32
    # chown -R aur .
canyonknight's avatar
canyonknight committed
33

Lukas Fleischer's avatar
Lukas Fleischer committed
34
7) Install the git-auth wrapper script:
canyonknight's avatar
canyonknight committed
35

Lukas Fleischer's avatar
Lukas Fleischer committed
36
    # cd /srv/http/aurweb/git-interface/
Lukas Fleischer's avatar
Lukas Fleischer committed
37
38
    # cp git-auth.sh /usr/local/bin/aur-git-auth
    # chmod 755 /usr/local/bin/aur-git-auth
canyonknight's avatar
canyonknight committed
39

Lukas Fleischer's avatar
Lukas Fleischer committed
40
41
42
8) Configure sshd(8) for the AUR. Add the following lines at the end of your
   sshd_config(5) and restart the sshd. Note that OpenSSH 6.9 or newer is
   needed!
canyonknight's avatar
canyonknight committed
43

Lukas Fleischer's avatar
Lukas Fleischer committed
44
45
46
47
    Match User aur
        PasswordAuthentication no
        AuthorizedKeysCommand /usr/local/bin/aur-git-auth "%t" "%k"
        AuthorizedKeysCommandUser aur
Marcel Korpel's avatar
Marcel Korpel committed
48

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
9) If you want to enable smart HTTP support with nginx and uWSGI, you can use
   the following directives:

    location ~ ^/([a-z0-9][a-z0-9.+_-]*)\.git/(.*)$ {
        include uwsgi_params;
        uwsgi_modifier1 9;
        uwsgi_param PATH_INFO /aur.git/$2;
        uwsgi_param GIT_NAMESPACE $1;
        uwsgi_pass unix:/run/uwsgi/smarthttp/aurweb.sock;
    }

   For the uWSGI configuration, the following template can be used:

    [uwsgi]
    plugins = cgi
    uid = aur
    processes = 1
    threads = 8
    env = GIT_HTTP_EXPORT_ALL=
    env = GIT_PROJECT_ROOT=/srv/http/aurweb
    cgi = /usr/lib/git-core/git-http-backend