INSTALL 1.62 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

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

22
23
5) Generate templates for new Git repositories:

24
   $ /srv/http/aurweb/scripts/git-integration/gen-templates.py
25

26
6) Clone the OpenSSH project, apply the aurweb sshd patch and run `make`:
canyonknight's avatar
canyonknight committed
27

28
   $ cd /srv/http/aurweb/
Lukas Fleischer's avatar
Lukas Fleischer committed
29
30
   $ git clone git://anongit.mindrot.org/openssh.git
   $ cd openssh
Lukas Fleischer's avatar
Lukas Fleischer committed
31
   $ git checkout V_6_7_P1
Lukas Fleischer's avatar
Lukas Fleischer committed
32
33
34
35
   $ git am ../scripts/git-integration/0001-Patch-sshd-for-the-AUR.patch
   $ autoreconf
   $ ./configure
   $ make
canyonknight's avatar
canyonknight committed
36

37
7) Create and edit the sshd configuration:
canyonknight's avatar
canyonknight committed
38

39
   $ cd /srv/http/aurweb/
Lukas Fleischer's avatar
Lukas Fleischer committed
40
41
42
43
   $ umask 077
   $ mkdir .ssh/
   $ ssh-keygen -f .ssh/ssh_host_rsa_key -N '' -t rsa
   $ cp scripts/git-integration/sshd_config .ssh/
canyonknight's avatar
canyonknight committed
44

45
8) Create a new user and change ownership of the .ssh directory:
canyonknight's avatar
canyonknight committed
46

47
48
   # useradd -U -d /srv/http/aurweb -c 'AUR user' aur
   # chown aur:aur /srv/http/aurweb/.ssh/
Marcel Korpel's avatar
Marcel Korpel committed
49

50
9) Add, enable and start systemd unit files for the new sshd:
Marcel Korpel's avatar
Marcel Korpel committed
51

52
53
   # cp /srv/http/aurweb/conf/aur-sshd.socket /etc/systemd/system/
   # cp /srv/http/aurweb/conf/aur-sshd@.service /etc/systemd/system/
54
55
   # systemctl enable aur-sshd.socket
   # systemctl start aur-sshd.socket