forked from jpatokal/openflights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
49 lines (37 loc) · 1.37 KB
/
INSTALL
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
47
48
Installing OpenFlights on Ubuntu 12.04 LTS
==========================================
The following assumes you have a fresh install of Ubuntu 12.04 and you're logged in as 'ubuntu' with sudo rights. This is intended as a recipe to be followed by hand, not a fire-and-forget script that can do the job automatically.
---
# Set up LAMP & Git
sudo apt-get install php5 php5-mysql mysql-server apache2 git
# Enable Apache modules
sudo a2enmod deflate
sudo a2enmod include
sudo a2enmod php5
sudo a2enmod rewrite
# Checkout a copy of OpenFlights into /var/www
cd /var/www
git clone https://github.com/jpatokal/openflights.git
# Generates locales for language support
cd openflights
find locale -name *utf8 -printf '%f ' | xargs sudo locale-gen
# Enable uploads
cd openflights
sudo chown www-data:www-data import
# Set up database
mysql -u root -p <sql/create.sql
mysql -u openflights flightdb2 --local-infile <sql/load-data.sql
# Generates locales for language support
find locale -name *utf8 -printf '%f ' | xargs sudo locale-gen
# Set up TripIt (if you need it)
sudo vi php/secrets.php
<<<
$tripit_app_id = "[YOUR-ID]";
$tripit_app_secret = "[YOUR-APP-SECRET]"
>>>
# Tell Apache where to find OpenFlights
cd openflights
sudo cp apache2/openflights /etc/apache2/sites-available/
cd /etc/apache2/sites-enabled
sudo ln -s ../sites-available/openflights openflights
sudo service apache2 restart