INSTALL 1.48 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/
canyonknight's avatar
canyonknight committed
7
8
   $ git clone git://projects.archlinux.org/aur.git

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/aur/schema/aur-schema.sql
canyonknight's avatar
canyonknight committed
21

Lukas Fleischer's avatar
Lukas Fleischer committed
22
5) Clone the OpenSSH project, apply the AUR sshd patch and run `make`:
canyonknight's avatar
canyonknight committed
23

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

Lukas Fleischer's avatar
Lukas Fleischer committed
33
6) Create and edit the sshd configuration:
canyonknight's avatar
canyonknight committed
34

Lukas Fleischer's avatar
Lukas Fleischer committed
35
36
37
38
39
   $ cd /srv/http/aur/
   $ 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
40

Lukas Fleischer's avatar
Lukas Fleischer committed
41
7) Create a new user and change ownership of the .ssh directory:
canyonknight's avatar
canyonknight committed
42

Lukas Fleischer's avatar
Lukas Fleischer committed
43
44
   # useradd -U -d /srv/http/aur -c 'AUR user' aur
   # chown aur:aur /srv/http/aur/.ssh/
Marcel Korpel's avatar
Marcel Korpel committed
45

46
8) Add, enable and start systemd unit files for the new sshd:
Marcel Korpel's avatar
Marcel Korpel committed
47

48
49
50
51
   # cp /srv/http/aur/conf/aur-sshd.socket /etc/systemd/system/
   # cp /srv/http/aur/conf/aur-sshd@.service /etc/systemd/system/
   # systemctl enable aur-sshd.socket
   # systemctl start aur-sshd.socket