tu.php: Fix PHP notice for "hasvoted" variable
[aur.git] / INSTALL
blobee4ed5a0f003395724f68c86c75f3f0dba6b4634
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=mysql.so
49    extension=json.so
51    If those php extensions are separate packages on your system, install
52    them.
54    AUR requires PEAR and the Archive_Tar module.
55    Installing PEAR will vary depending on the system and may already
56    be included with PHP. You can also find it in the PHP source
57    distribution.
59    PHP sources: http://www.php.net/downloads.php
60    Archive_Tar PEAR module: http://pear.php.net/package/Archive_Tar
62  - Install the Archive_Tar PEAR package:
63    # pear install Archive_Tar
65 6) Configure MySQL
66  - Start the MySQL service. Example:
67    # /etc/rc.d/mysqld start
69  - Create database
70    # mysqladmin -p create AUR
72  - Connect to the mysql client
73    # mysql -uroot -p AUR
75  - Issue the following commands to the mysql client
76    mysql> GRANT ALL PRIVILEGES ON AUR.* to aur@localhost
77         > identified by 'aur';
78    mysql> FLUSH PRIVILEGES;
79    mysql> quit
81  - Load the schema file
82    # mysql -uaur -p AUR < ~/aur/support/schema/aur-schema.sql
83    (give password 'aur' at the prompt)
85  - Optionally load some test data for development purposes.
86    # pacman -S words mysql-python
87    # cd ~/aur/support/schema/
88    # python gendummydata.py dummy-data.sql
89    # bzip2 dummy-data.sql
90    # bzcat dummy-data.sql.bz2 | mysql -uaur -p AUR
91    (give password 'aur' at the prompt)
93    If your test data consists of real people and real email addresses consider
94    inserting bogus addressess to avoid sending unwanted spam from testing. You
95    can insert garbage addresses with:
96    mysql> UPDATE Users SET Email = RAND() * RAND();
98 7) Copy the config.inc.php.proto file to config.inc.php. Modify as needed.
99    # cd ~/aur/web/lib/
100    # cp config.inc.php.proto config.inc.php
102 8) Point your browser to http://aur