INSTALL 2.88 KB
Newer Older
canyonknight's avatar
canyonknight committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Setup on Arch Linux:
====================
1) Install Apache, MySQL, PHP, git and php-pear
  # pacman -Syu apache mysql php git php-pear

2) Set a local 'hostname' of 'aur'
 - Edit /etc/hosts and append 'aur' to loopback address
   127.0.0.1    localhost aur

3) Configure Apache

 - Edit /etc/httpd/conf/httpd.conf and enable PHP support
   by adding the following lines.

   LoadModule php5_module modules/libphp5.so
   Include conf/extra/php5_module.conf

 - Also append the following snippet to enable the aur
   Virtual Host in /etc/httpd/conf/extra/httpd-vhosts.conf.
	 Comment out the example vhosts and replace MYUSER with your username.
	 (You could put aur in /srv/http/aur and then create a symlink in ~ )

   <VirtualHost aur:80>
   Servername    aur
   DocumentRoot  /home/MYUSER/aur/web/html
   ErrorLog    /var/log/httpd/aur-error.log
   CustomLog   /var/log/httpd/aur-access.log combined
     <Directory /home/MYUSER/aur/web/html>
       Options Indexes FollowSymLinks
       AllowOverride All
       Order allow,deny
       Allow from all
     </Directory>
   </VirtualHost>

 - In httpd.conf, uncomment this line:

   Include conf/extra/httpd-vhosts.conf

4) Clone the AUR project (using the MYUSER from above)
   $ cd
   $ git clone git://projects.archlinux.org/aur.git

5) Configure PHP
   Make sure you have mysql and json enabled in PHP.

47
 - Edit php.ini and uncomment/add this line:
canyonknight's avatar
canyonknight committed
48
   extension=pdo_mysql.so
canyonknight's avatar
canyonknight committed
49

50
   If this PHP extension is a separate package on your system, install it.
canyonknight's avatar
canyonknight committed
51
52
53

6) Configure MySQL
 - Start the MySQL service. Example:
Marcel Korpel's avatar
Marcel Korpel committed
54
   # systemctl start mysqld
canyonknight's avatar
canyonknight committed
55
56
57
58
59

 - Create database
   # mysqladmin -p create AUR

 - Connect to the mysql client
60
   $ mysql -uroot -p AUR
canyonknight's avatar
canyonknight committed
61
62
63

 - Issue the following commands to the mysql client
   mysql> GRANT ALL PRIVILEGES ON AUR.* to aur@localhost
64
       -> identified by 'aur';
canyonknight's avatar
canyonknight committed
65
66
67
68
   mysql> FLUSH PRIVILEGES;
   mysql> quit

 - Load the schema file
69
   $ mysql -uaur -p AUR < ~/aur/schema/aur-schema.sql
canyonknight's avatar
canyonknight committed
70
71
72
   (give password 'aur' at the prompt)

 - Optionally load some test data for development purposes.
73
   # pacman -S words fortune-mod
74
   $ cd ~/aur/schema/
75
76
77
   $ python gendummydata.py dummy-data.sql
   $ bzip2 dummy-data.sql
   $ bzcat dummy-data.sql.bz2 | mysql -uaur -p AUR
canyonknight's avatar
canyonknight committed
78
79
80
81
82
83
84
85
   (give password 'aur' at the prompt)

   If your test data consists of real people and real email addresses consider
   inserting bogus addressess to avoid sending unwanted spam from testing. You
   can insert garbage addresses with:
   mysql> UPDATE Users SET Email = RAND() * RAND();

7) Copy the config.inc.php.proto file to config.inc.php. Modify as needed.
86
87
   $ cd ~/aur/web/lib/
   $ cp config.inc.php.proto config.inc.php
canyonknight's avatar
canyonknight committed
88

Marcel Korpel's avatar
Marcel Korpel committed
89
90
91
92
93
94
95
   In case you set $USE_VIRTUAL_URLS to true (default nowadays) you should add
   a rewrite rule. For Apache, add this ~/aur/web/html/.htaccess:

   RewriteEngine on
   RewriteCond %{REQUEST_URI} !^/index.php
   RewriteRule ^(.*)$ /index.php/$1

canyonknight's avatar
canyonknight committed
96
8) Point your browser to http://aur