|
1 | | ---- |
2 | | -title: Installing PhiloLogic5 on RedHat (and CentOS) |
3 | | ---- |
4 | | - |
5 | | -Tested on RHEL 9 and CentOS Stream 9. |
6 | | - |
7 | | -### 1. Install System Dependencies |
8 | | - |
9 | | -```bash |
10 | | -sudo dnf install -y \ |
11 | | - libxml2-devel libxslt-devel zlib-devel \ |
12 | | - lz4 ripgrep curl |
13 | | -``` |
14 | | - |
15 | | -### 2. Run the Installer |
16 | | - |
17 | | -```bash |
18 | | -cd PhiloLogic5 |
19 | | -sudo ./install.sh |
20 | | -``` |
21 | | - |
22 | | -### 3. Configure PhiloLogic |
23 | | - |
24 | | -Edit `/etc/philologic/philologic5.cfg`: |
25 | | - |
26 | | -```python |
27 | | -database_root = "/var/www/html/philologic5/" |
28 | | -url_root = "http://localhost/philologic5/" |
29 | | -``` |
30 | | - |
31 | | -Create the database directory: |
32 | | - |
33 | | -```bash |
34 | | -sudo mkdir -p /var/www/html/philologic5 |
35 | | -sudo chown -R $USER:$USER /var/www/html/philologic5 |
36 | | -``` |
37 | | - |
38 | | -### 4. Start Gunicorn |
39 | | - |
40 | | -```bash |
41 | | -sudo systemctl enable philologic5-gunicorn |
42 | | -sudo systemctl start philologic5-gunicorn |
43 | | -``` |
44 | | - |
45 | | -### 5. Configure Apache as Reverse Proxy |
46 | | - |
47 | | -```bash |
48 | | -sudo dnf install -y httpd mod_proxy_html |
49 | | -``` |
50 | | - |
51 | | -Add to `/etc/httpd/conf.d/philologic5.conf`: |
52 | | - |
53 | | -```apache |
54 | | -ProxyTimeout 300 |
55 | | -<Location "/philologic5"> |
56 | | - ProxyPass unix:/var/run/philologic/gunicorn.sock|http://localhost/philologic5 flushpackets=on |
57 | | - ProxyPassReverse unix:/var/run/philologic/gunicorn.sock|http://localhost/philologic5 |
58 | | - SetEnv no-gzip 1 |
59 | | - SetEnv force-no-buffering 1 |
60 | | -</Location> |
61 | | -``` |
62 | | - |
63 | | -Restart Apache: |
64 | | - |
65 | | -```bash |
66 | | -sudo systemctl restart httpd |
67 | | -``` |
68 | | - |
69 | | -Make sure the correct permissions are set on the database directory — the user building databases needs write access. |
| 1 | +--- |
| 2 | +title: Installing PhiloLogic5 on RedHat (and CentOS) |
| 3 | +--- |
| 4 | + |
| 5 | +Tested on RHEL 9 and CentOS Stream 9. |
| 6 | + |
| 7 | +### 1. Install System Dependencies |
| 8 | + |
| 9 | +```bash |
| 10 | +sudo dnf install -y \ |
| 11 | + libxml2-devel libxslt-devel zlib-devel \ |
| 12 | + lz4 ripgrep curl |
| 13 | +``` |
| 14 | + |
| 15 | +### 2. Run the Installer |
| 16 | + |
| 17 | +Download the [latest release](https://github.com/ARTFL-Project/PhiloLogic5/releases/latest) from GitHub, extract it, then: |
| 18 | + |
| 19 | +```bash |
| 20 | +cd PhiloLogic5-*/ |
| 21 | +./install.sh |
| 22 | +``` |
| 23 | + |
| 24 | +### 3. Configure PhiloLogic |
| 25 | + |
| 26 | +Edit `/etc/philologic/philologic5.cfg`: |
| 27 | + |
| 28 | +```python |
| 29 | +database_root = "/var/www/html/philologic5/" |
| 30 | +url_root = "http://localhost/philologic5/" |
| 31 | +``` |
| 32 | + |
| 33 | +Create the database directory: |
| 34 | + |
| 35 | +```bash |
| 36 | +sudo mkdir -p /var/www/html/philologic5 |
| 37 | +sudo chown -R $USER:$USER /var/www/html/philologic5 |
| 38 | +``` |
| 39 | + |
| 40 | +### 4. Start Gunicorn |
| 41 | + |
| 42 | +```bash |
| 43 | +sudo systemctl enable philologic5-gunicorn |
| 44 | +sudo systemctl start philologic5-gunicorn |
| 45 | +``` |
| 46 | + |
| 47 | +### 5. Configure Apache as Reverse Proxy |
| 48 | + |
| 49 | +```bash |
| 50 | +sudo dnf install -y httpd mod_proxy_html |
| 51 | +``` |
| 52 | + |
| 53 | +Add to `/etc/httpd/conf.d/philologic5.conf`: |
| 54 | + |
| 55 | +```apache |
| 56 | +ProxyTimeout 300 |
| 57 | +<Location "/philologic5"> |
| 58 | + ProxyPass unix:/var/run/philologic/gunicorn.sock|http://localhost/philologic5 flushpackets=on |
| 59 | + ProxyPassReverse unix:/var/run/philologic/gunicorn.sock|http://localhost/philologic5 |
| 60 | + SetEnv no-gzip 1 |
| 61 | + SetEnv force-no-buffering 1 |
| 62 | +</Location> |
| 63 | +``` |
| 64 | + |
| 65 | +Restart Apache: |
| 66 | + |
| 67 | +```bash |
| 68 | +sudo systemctl restart httpd |
| 69 | +``` |
| 70 | + |
| 71 | +Make sure the correct permissions are set on the database directory — the user building databases needs write access. |
0 commit comments