Install on a blank Debian VPS

From StageCraft - Wiki
Revision as of 08:45, 22 July 2025 by John (talk | contribs) (Created page with "__TOC__ =Introduction= In this wiki post. We will guide you through installing StageCraft on a blank Linux VPS. This post will assume that you already have your fully qualified domain name FQDN set up for your domain/subdomain. =Install updates= sudo apt update && sudo apt upgrade -y =Install basic packages= sudo apt install sudo htop curl wget net-tools =Setup PHP's repo= sudo apt install -y lsb-release ca-certificates apt-transport-https software-properties-c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Introduction

[edit]

In this wiki post. We will guide you through installing StageCraft on a blank Linux VPS. This post will assume that you already have your fully qualified domain name FQDN set up for your domain/subdomain.

Install updates

[edit]
sudo apt update && sudo apt upgrade -y

Install basic packages

[edit]
sudo apt install sudo htop curl wget net-tools

Setup PHP's repo

[edit]
sudo apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
curl -fsSL  https://packages.sury.org/php/apt.gpg%7C sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/sury-keyring.gpg
sudo apt update

Install packages

[edit]
sudo apt apache2 php8.1 php8.1-xml php8.1-zip php8.1-curl php8.1-mbstring php8.1-mysql mariadb-server

Install Iocube

[edit]
cd /tmp
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar zxf ioncube_loaders_lin_x86-64.tar.gz
cd ioncube

Find the extension dir:

php -i | grep extension_dir
cp ioncube_loader_lin_8.1.so EXTENSION_DIR_HERE

Edit the config file:

sudo nano /etc/php/8.1/apache2/php.ini

Add this line:

zend_extension=/usr/lib/php/20190902/ioncube_loader_lin_7.4.so

Restart apache2:

sudo systemctl restart apache2

Install FTP server

[edit]
sudo apt install vsftpd -y

Edit the config file: sudo nano /etc/vsftpd.conf

Add these lines at the bottom:

local_root=/var/www/html
write_enable=yes
local_umask=002

Restart the service:

sudo systemctl restart vsftpd

Set the folder permissions:

sudo usermod -a -G $(whoami) www-data
sudo chown -R $(whoami):$(whoami) /var/www/html
sudo find /var/www/html -type d -exec chmod 750 {} \;
sudo find /var/www/html -type f -exec chmod 640 {} \;
sudo chmod g+s /var/www/html

Setup the database

[edit]

Enter MariaDB:

sudo mysql -u root

Run the following SQL:

CREATE DATABASE `stagecraft`;
CREATE USER 'stagecraft'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON stagecraft.* TO 'stagecraft'@'localhost';


Enable SSL

[edit]
Enable apache's SSL module: ```sudo a2enmod ssl```
Enable the default ssl site: ```sudo a2ensite default-ssl```
Restart apache ```sudo systemctl restart apache2```

Enable mod_rewrite

[edit]

Enable the plugin:

sudo a2enmod rewrite

Edit the apache config:

sudo nano /etc/apache2/apache2.conf

Replace all AllowOverride none to AllowOveride all

Restart Apache2:

sudo systemctl restart apache2