1.4 KiB
1.4 KiB
Basic Tools
apt-get install -y git
NGINX
apt-get install -y nginx
PHP (Ubuntu 20.04)
apt install -y php-fpm php php-simplexml php-mbstring php-gd php-mysql
Install Composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/bin --filename=composer
php -r "unlink('composer-setup.php');"
Setup MYSQL
apt-get install -y mysql-server
mysql_secure_installation
mysql_secure_installation
Run the following mysql commands
CREATE DATABASE kuvia;
CREATE USER 'kuvia'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL ON kuvia.* TO 'kuvia'@'localhost';
FLUSH PRIVILEGES;
Setup Project
cd /var/www
git clone https://git.keks.cloud/kekskurse/kuvia.git
cd kuvia
composer install
Setup .env
Setup env
Setup nginx config
/etc/nginx/sites-available/kuvia
server {
listen 80;
server_name kuvia.cloud www.kuvia.cloud;
root /var/www/kuvia/public;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
run
ln -s /etc/nginx/sites-available/kuvia /etc/nginx/sites-enabled/
systemctl restart nginx