systemd compatibility
[aur.git] / INSTALL
blob1a410666b098666cf76f5769d41cc718657a1578
1 Setup on Arch Linux:
2 ====================
3 1) Install Apache, MySQL, PHP, git and php-pear
4   # pacman -Syu apache mysql php git php-pear
6 2) Set a local 'hostname' of 'aur'
7  - Edit /etc/hosts and append 'aur' to loopback address
8    127.0.0.1    localhost aur
10 3) Configure Apache
12  - Edit /etc/httpd/conf/httpd.conf and enable PHP support
13    by adding the following lines.
15    LoadModule php5_module modules/libphp5.so
16    Include conf/extra/php5_module.conf
18  - Also append the following snippet to enable the aur
19    Virtual Host in /etc/httpd/conf/extra/httpd-vhosts.conf.
20          Comment out the example vhosts and replace MYUSER with your username.
21          (You could put aur in /srv/http/aur and then create a symlink in ~ )
23    <VirtualHost aur:80>
24    Servername    aur
25    DocumentRoot  /home/MYUSER/aur/web/html
26    ErrorLog    /var/log/httpd/aur-error.log
27    CustomLog   /var/log/httpd/aur-access.log combined
28      <Directory /home/MYUSER/aur/web/html>
29        Options Indexes FollowSymLinks
30        AllowOverride All
31        Order allow,deny
32        Allow from all
33      </Directory>
34    </VirtualHost>
36  - In httpd.conf, uncomment this line:
38    Include conf/extra/httpd-vhosts.conf
40 4) Clone the AUR project (using the MYUSER from above)
41    $ cd
42    $ git clone git://projects.archlinux.org/aur.git
44 5) Configure PHP
45    Make sure you have mysql and json enabled in PHP.
47  - Edit php.ini and uncomment/add these lines:
48    extension=pdo_mysql.so
49    extension=json.so
51    If those php extensions are separate packages on your system, install
52    them.
54 6) Configure MySQL
55  - Start the MySQL service. Example:
56    # systemctl start mysqld
58  - Create database
59    # mysqladmin -p create AUR
61  - Connect to the mysql client
62    # mysql -uroot -p AUR
64  - Issue the following commands to the mysql client
65    mysql> GRANT ALL PRIVILEGES ON AUR.* to aur@localhost
66         > identified by 'aur';
67    mysql> FLUSH PRIVILEGES;
68    mysql> quit
70  - Load the schema file
71    # mysql -uaur -p AUR < ~/aur/support/schema/aur-schema.sql
72    (give password 'aur' at the prompt)
74  - Optionally load some test data for development purposes.
75    # pacman -S words mysql-python
76    # cd ~/aur/support/schema/
77    # python gendummydata.py dummy-data.sql
78    # bzip2 dummy-data.sql
79    # bzcat dummy-data.sql.bz2 | mysql -uaur -p AUR
80    (give password 'aur' at the prompt)
82    If your test data consists of real people and real email addresses consider
83    inserting bogus addressess to avoid sending unwanted spam from testing. You
84    can insert garbage addresses with:
85    mysql> UPDATE Users SET Email = RAND() * RAND();
87 7) Copy the config.inc.php.proto file to config.inc.php. Modify as needed.
88    # cd ~/aur/web/lib/
89    # cp config.inc.php.proto config.inc.php
91 8) Point your browser to http://aur