Updated Manual install (markdown)

Michal 2022-09-29 11:01:59 +01:00
parent 458cdcb195
commit 2a40526ee4

@ -1,18 +1,18 @@
As there is no automated way to install this gallery, you will have to follow this guide. Download this project and move it into your website(s) folder. Usually under `/var/www/html/` on Linux. Unless specified, any commands todo with file creation should be done from the root of the gallery folder, for example `/var/www/html/gallery/`.
## Imagik
# Imagik
You will need to install the image-magik PHP plugin for thumbnail creation, on Ubuntu its as easy as:
```
apt install php-imagick
```
## GD2
# GD2
Also install GD2 for image color extraction, else you may get errors:
```
apt install php-gd
```
## PHP and Nginx
# PHP and Nginx
This project also requires PHP 8.1 and was made with Ubuntu 22.04 LTS and Nginx in mind, so I recommend running this gallery on such.
With Nginx, you may need to configure the `/etc/nginx/sites-available/default.conf` for the new version on PHP. You must find the allowed index list and add index.php as such:
@ -39,10 +39,10 @@ http {
Most important of them being `client_max_body_size`.
## Database setup
# Database setup
If you made it this far, congrats! We're not even close to done. Next you will need to setup your database. If you're running a separate server for databases, that'll also work.
#### Note:
## Note:
If you run into errors with connecting to the database, you may need to install `php-mysqli`, on Ubuntu that command will be:
```
apt install php-mysqli
@ -61,7 +61,7 @@ I also recommend not using root for this and setting up a user specifically for
You will next need to setup the following 6 tables:
### Images
## Images
```
CREATE TABLE images (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
@ -74,7 +74,7 @@ CREATE TABLE images (
);
```
### Users
## Users
```
CREATE TABLE users (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
@ -87,7 +87,7 @@ CREATE TABLE users (
);
```
### Tokens
## Tokens
```
CREATE TABLE tokens (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
@ -97,7 +97,7 @@ CREATE TABLE tokens (
);
```
### Logs
## Logs
```
CREATE TABLE logs (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
@ -107,7 +107,7 @@ CREATE TABLE logs (
);
```
### Bans
## Bans
```
CREATE TABLE bans (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
@ -119,7 +119,7 @@ CREATE TABLE bans (
);
```
### Groups
## Groups
```
CREATE TABLE groups (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
@ -133,7 +133,7 @@ CREATE TABLE groups (
## Manifest
In the `app/settings/manifest.json` you have a list of information about your website. You must change `user_name` to your preferred name, `is_testing` to false (or anything else) as that is used for development and `upload_max` to your preferred file size max in MBs.
## Images Folder
# Images Folder
Since there is currently no automated install script for this gallery, you'll have to make your own folders to hold images in. To do that, go into the root directory of the gallery and type the following commands:
```
mkdir images
@ -147,7 +147,7 @@ This will make 3 new folders. That is where all the uploaded images will be held
chown www-data:www-data -R images
```
### Creating an account
## Creating an account
For now, there is no automated way of doing this, so you will have to go into your database on a terminal and type the following command:
```
INSERT INTO tokens (code, used) VALUES('UserToken', false)