mirror of
https://github.com/pterodactyl/documentation.git
synced 2025-12-10 09:17:40 -06:00
Update community guides
Update community guides to use PHP 8.3 + reformat them.
This commit is contained in:
parent
369fa557cb
commit
4a65958065
@ -1,14 +0,0 @@
|
||||
[pterodactyl]
|
||||
|
||||
user = nginx
|
||||
group = nginx
|
||||
|
||||
listen = /var/run/php-fpm/pterodactyl.sock
|
||||
listen.owner = nginx
|
||||
listen.group = nginx
|
||||
listen.mode = 0750
|
||||
|
||||
pm = ondemand
|
||||
pm.max_children = 9
|
||||
pm.process_idle_timeout = 10s
|
||||
pm.max_requests = 200
|
||||
@ -1,44 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name <domain>;
|
||||
|
||||
root /var/www/pterodactyl/public;
|
||||
index index.html index.htm index.php;
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
access_log off;
|
||||
error_log /var/log/nginx/pterodactyl.app-error.log error;
|
||||
|
||||
# allow larger file uploads and longer script runtimes
|
||||
client_max_body_size 100m;
|
||||
client_body_timeout 120s;
|
||||
|
||||
sendfile off;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
fastcgi_connect_timeout 300;
|
||||
fastcgi_send_timeout 300;
|
||||
fastcgi_read_timeout 300;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
server_tokens off;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name <domain>;
|
||||
return 301 https://$server_name$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name <domain>;
|
||||
|
||||
root /var/www/pterodactyl/public;
|
||||
index index.php;
|
||||
|
||||
access_log /var/log/nginx/pterodactyl.app-access.log;
|
||||
error_log /var/log/nginx/pterodactyl.app-error.log error;
|
||||
|
||||
# allow larger file uploads and longer script runtimes
|
||||
client_max_body_size 100m;
|
||||
client_body_timeout 120s;
|
||||
|
||||
sendfile off;
|
||||
|
||||
# SSL Configuration
|
||||
ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
# See https://hstspreload.org/ before uncommenting the line below.
|
||||
# add_header Strict-Transport-Security "max-age=15768000; preload;";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header Content-Security-Policy "frame-ancestors 'self'";
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header Referrer-Policy same-origin;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
fastcgi_connect_timeout 300;
|
||||
fastcgi_send_timeout 300;
|
||||
fastcgi_read_timeout 300;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name <domain>;
|
||||
|
||||
root /var/www/pterodactyl/public;
|
||||
index index.html index.htm index.php;
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
access_log off;
|
||||
error_log /var/log/nginx/pterodactyl.app-error.log error;
|
||||
|
||||
# allow larger file uploads and longer script runtimes
|
||||
client_max_body_size 100m;
|
||||
client_body_timeout 120s;
|
||||
|
||||
sendfile off;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
fastcgi_connect_timeout 300;
|
||||
fastcgi_send_timeout 300;
|
||||
fastcgi_read_timeout 300;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
server_tokens off;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name <domain>;
|
||||
return 301 https://$server_name$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name <domain>;
|
||||
|
||||
root /var/www/pterodactyl/public;
|
||||
index index.php;
|
||||
|
||||
access_log /var/log/nginx/pterodactyl.app-access.log;
|
||||
error_log /var/log/nginx/pterodactyl.app-error.log error;
|
||||
|
||||
# allow larger file uploads and longer script runtimes
|
||||
client_max_body_size 100m;
|
||||
client_body_timeout 120s;
|
||||
|
||||
sendfile off;
|
||||
|
||||
# SSL Configuration
|
||||
ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
# See https://hstspreload.org/ before uncommenting the line below.
|
||||
# add_header Strict-Transport-Security "max-age=15768000; preload;";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header Content-Security-Policy "frame-ancestors 'self'";
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header Referrer-Policy same-origin;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
fastcgi_connect_timeout 300;
|
||||
fastcgi_send_timeout 300;
|
||||
fastcgi_read_timeout 300;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
server {
|
||||
# Replace the example <domain> with your domain name or IP address
|
||||
listen 80;
|
||||
server_name <domain>;
|
||||
|
||||
root /var/www/pterodactyl/public;
|
||||
index index.html index.htm index.php;
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
access_log off;
|
||||
error_log /var/log/nginx/pterodactyl.app-error.log error;
|
||||
|
||||
# allow larger file uploads and longer script runtimes
|
||||
client_max_body_size 100m;
|
||||
client_body_timeout 120s;
|
||||
|
||||
sendfile off;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
fastcgi_connect_timeout 300;
|
||||
fastcgi_send_timeout 300;
|
||||
fastcgi_read_timeout 300;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
server_tokens off;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name <domain>;
|
||||
return 301 https://$server_name$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name <domain>;
|
||||
|
||||
root /var/www/pterodactyl/public;
|
||||
index index.php;
|
||||
|
||||
access_log /var/log/nginx/pterodactyl.app-access.log;
|
||||
error_log /var/log/nginx/pterodactyl.app-error.log error;
|
||||
|
||||
# allow larger file uploads and longer script runtimes
|
||||
client_max_body_size 100m;
|
||||
client_body_timeout 120s;
|
||||
|
||||
sendfile off;
|
||||
|
||||
# SSL Configuration - Replace the example <domain> with your domain
|
||||
ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
# See https://hstspreload.org/ before uncommenting the line below.
|
||||
# add_header Strict-Transport-Security "max-age=15768000; preload;";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Robots-Tag none;
|
||||
add_header Content-Security-Policy "frame-ancestors 'self'";
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header Referrer-Policy same-origin;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
fastcgi_connect_timeout 300;
|
||||
fastcgi_send_timeout 300;
|
||||
fastcgi_read_timeout 300;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@ -1,156 +1,104 @@
|
||||
# CentOS 7
|
||||
In this guide we will install Pterodactyl v1.X — including all of it's dependencies — and configure our webserver
|
||||
to serve it using SSL.
|
||||
|
||||
This guide provides comprehensive instructions for installing Pterodactyl v1.X on CentOS 7, including all dependencies and SSL configuration.
|
||||
|
||||
[[toc]]
|
||||
|
||||
::: tip
|
||||
This guide is based off the [official installation documentation](/panel/1.0/getting_started.md) but is tailored specifically for CentOS 7.
|
||||
:::
|
||||
## Install Dependencies
|
||||
|
||||
## Install Requirements and Additional Utilities
|
||||
We will install all of Pterodactyl's [required](/panel/1.0/getting_started.md#dependencies) dependencies and a few aditional utilities.
|
||||
### SELinux Configuration
|
||||
|
||||
If SELinux is enabled (check with `sestatus`), install the following packages:
|
||||
|
||||
::: tip
|
||||
If you run `sestatus` and it shows `SELinux status: enabled` you should install the following packages for later
|
||||
:::
|
||||
|
||||
### SELinux tools
|
||||
```bash
|
||||
yum install -y policycoreutils policycoreutils-python selinux-policy selinux-policy-targeted libselinux-utils setroubleshoot-server setools setools-console mcstrans
|
||||
```
|
||||
|
||||
### MariaDB
|
||||
### Installing Dependencies
|
||||
|
||||
Run the following commands to install all necessary dependencies:
|
||||
|
||||
```bash
|
||||
## Install Repos
|
||||
cat <<EOF > /etc/yum.repos.d/mariadb.repo
|
||||
# MariaDB 10.5 CentOS repository list - created 2017-07-14 12:40 UTC
|
||||
# http://downloads.mariadb.org/mariadb/repositories/
|
||||
# Add MariaDB repository
|
||||
sudo tee /etc/yum.repos.d/mariadb.repo <<EOF
|
||||
[mariadb]
|
||||
name = MariaDB
|
||||
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
|
||||
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
|
||||
gpgcheck=1
|
||||
gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
|
||||
gpgcheck = 1
|
||||
EOF
|
||||
|
||||
## Get yum updates
|
||||
yum update -y
|
||||
# Install EPEL and Remi repositories
|
||||
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
|
||||
|
||||
## Install MariaDB 10.5
|
||||
yum install -y MariaDB-common MariaDB-server
|
||||
# Enable PHP 8.3 from Remi
|
||||
sudo yum install -y yum-utils
|
||||
sudo yum-config-manager --disable 'remi-php*'
|
||||
sudo yum-config-manager --enable remi-php83
|
||||
|
||||
## Start maraidb
|
||||
systemctl start mariadb
|
||||
systemctl enable mariadb
|
||||
sudo yum update -y
|
||||
|
||||
# Install dependencies
|
||||
sudo yum install -y MariaDB-common MariaDB-server php php-{common,fpm,cli,json,mysqlnd,mcrypt,gd,mbstring,pdo,zip,bcmath,dom,opcache} nginx zip unzip
|
||||
|
||||
# Install Redis
|
||||
sudo yum install -y --enablerepo=remi redis
|
||||
|
||||
# Start and enable services
|
||||
sudo systemctl enable --now mariadb nginx redis
|
||||
|
||||
# Configure firewall
|
||||
sudo firewall-cmd --add-service=http --permanent
|
||||
sudo firewall-cmd --add-service=https --permanent
|
||||
sudo firewall-cmd --reload
|
||||
|
||||
# Install Composer
|
||||
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
|
||||
```
|
||||
|
||||
### PHP 8.0
|
||||
We recommend the remi repo to get the latest php packages.
|
||||
## Server Configuration
|
||||
|
||||
### PHP Configuration
|
||||
|
||||
Create a new PHP-FPM configuration file in /etc/php-fpm.d/www-pterodactyl.conf:
|
||||
|
||||
```conf
|
||||
[pterodactyl]
|
||||
|
||||
user = nginx
|
||||
group = nginx
|
||||
|
||||
listen = /var/run/php-fpm/pterodactyl.sock
|
||||
listen.owner = nginx
|
||||
listen.group = nginx
|
||||
listen.mode = 0750
|
||||
|
||||
pm = ondemand
|
||||
pm.max_children = 9
|
||||
pm.process_idle_timeout = 10s
|
||||
pm.max_requests = 200
|
||||
```
|
||||
|
||||
Start and enable PHP-FPM:
|
||||
|
||||
```bash
|
||||
## Install Repos
|
||||
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
|
||||
yum install -y yum-utils
|
||||
yum-config-manager --disable 'remi-php*'
|
||||
yum-config-manager --enable remi-php80
|
||||
|
||||
## Get yum updates
|
||||
yum update -y
|
||||
|
||||
## Install PHP 8.0
|
||||
yum install -y php php-{common,fpm,cli,json,mysqlnd,mcrypt,gd,mbstring,pdo,zip,bcmath,dom,opcache}
|
||||
sudo systemctl enable --now php-fpm
|
||||
```
|
||||
|
||||
### Composer
|
||||
```bash
|
||||
yum install -y zip unzip # Required for Composer
|
||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
```
|
||||
### SELinux configuration
|
||||
|
||||
## Install Utility Packages
|
||||
The following command will allow nginx to work with redis.
|
||||
|
||||
|
||||
### Nginx
|
||||
```bash
|
||||
yum install -y nginx
|
||||
|
||||
firewall-cmd --add-service=http --permanent
|
||||
firewall-cmd --add-service=https --permanent
|
||||
firewall-cmd --reload
|
||||
```
|
||||
|
||||
### Redis
|
||||
```bash
|
||||
yum install -y --enablerepo=remi redis
|
||||
|
||||
systemctl start redis
|
||||
systemctl enable redis
|
||||
```
|
||||
|
||||
#### SELinux commands
|
||||
|
||||
The following command will allow nginx to work with redis and
|
||||
```bash
|
||||
setsebool -P httpd_can_network_connect 1
|
||||
setsebool -P httpd_execmem 1
|
||||
setsebool -P httpd_unified 1
|
||||
```
|
||||
|
||||
## Server Configuration
|
||||
This following section covers the configuration of parts of the server to run the panel.
|
||||
|
||||
### Configuring MariaDB
|
||||
The fastest way to set up mariadb is to use the `mysql_secure_installation` command and follow prompts
|
||||
|
||||
```bash
|
||||
mysql_secure_installation
|
||||
```
|
||||
|
||||
The following are safe defaults.
|
||||
|
||||
Change to your own secure password
|
||||
`Set root password? [Y/n] Y`
|
||||
|
||||
Get rid of users that could access the db by default
|
||||
`Remove anonymous users? [Y/n] Y`
|
||||
|
||||
Keep root off the external interfaces
|
||||
`Disallow root login remotely? [Y/n] Y`
|
||||
|
||||
Extra databases that aren't needed
|
||||
`Remove test database and access to it? [Y/n] Y`
|
||||
|
||||
Clears and sets all the changes made
|
||||
`Reload privilege tables now? [Y/n] Y`
|
||||
|
||||
All done! If you've completed all of the above steps, your MariaDB
|
||||
installation should now be secure.
|
||||
|
||||
#### Adding MariaDB user
|
||||
To add your first user to the database, see our tutorial on [setting up MySQL](/tutorials/mysql_setup.md).
|
||||
|
||||
### Setup PHP
|
||||
Place the contents below in a file inside the `/etc/php-fpm.d` folder. The file can be named anything, but a good standard is `www-pterodactyl.conf`. This config will match the nginx config later in the guide.
|
||||
|
||||
<<< @/.snippets/php-fpm/pterodactyl-centos.conf
|
||||
|
||||
Start and enable php-fpm on the system.
|
||||
```bash
|
||||
systemctl enable php-fpm
|
||||
systemctl start php-fpm
|
||||
```
|
||||
|
||||
### Nginx
|
||||
Please check our [tutorial](/tutorials/creating_ssl_certificates.md) on generating SSL certificates for more information.
|
||||
|
||||
#### SSL Configuration
|
||||
<<< @/.snippets/webservers/nginx-centos.conf{5,11,26-27}
|
||||
|
||||
### Redis Setup
|
||||
The default Redis install is perfectly fine for the panel. If you have Redis already in use you may want to look into
|
||||
[running another Redis instance](https://community.pivotal.io/s/article/How-to-setup-and-run-multiple-Redis-server-instances-on-a-Linux-host).
|
||||
|
||||
## Installing the Panel
|
||||
Excellent, we now have all of the required dependencies installed and configured. From here, follow the [official Panel installation documentation](/panel/1.0/getting_started.md#download-files).
|
||||
|
||||
::: tip
|
||||
You will need to change the fastcgi_pass path in the Nginx configuration to `/var/run/php-fpm/pterodactyl.sock`
|
||||
:::
|
||||
@ -1,144 +1,84 @@
|
||||
# CentOS 8, Rocky Linux 8, AlmaLinux 8, Fedora Server 38
|
||||
In this guide we will install Pterodactyl v1.X — including all of it's dependencies — and configure our webserver to serve it using SSL.
|
||||
# Enterprise Linux 8 and Fedora Server 40
|
||||
|
||||
This guide provides comprehensive instructions for installing Pterodactyl v1.X on CentOS 8, Rocky Linux 8, AlmaLinux 8, and Fedora Server 40, including all dependencies.
|
||||
|
||||
[[toc]]
|
||||
|
||||
::: tip
|
||||
This guide is based off the [official installation documentation](/panel/1.0/getting_started.md) but is tailored specifically for Enterprise Linux 8.
|
||||
:::
|
||||
## Install Dependencies
|
||||
|
||||
## Install Requirements and Additional Utilities
|
||||
We will install all of Pterodactyl's [required](/panel/1.0/getting_started.md#dependencies) dependencies and a few aditional utilities.
|
||||
### SELinux Configuration
|
||||
|
||||
::: tip
|
||||
If you run `sestatus` and it shows `SELinux status: enabled` you should install the following packages for later
|
||||
:::
|
||||
|
||||
### SELinux tools
|
||||
```bash
|
||||
dnf install -y policycoreutils selinux-policy selinux-policy-targeted setroubleshoot-server setools setools-console mcstrans
|
||||
```
|
||||
|
||||
### MariaDB
|
||||
```bash
|
||||
dnf install -y mariadb mariadb-server
|
||||
|
||||
## Start maraidb
|
||||
systemctl start mariadb
|
||||
systemctl enable mariadb
|
||||
```
|
||||
|
||||
### PHP 8.0
|
||||
We recommend the remi repo to get the latest php packages. (Skip to next section if on Fedora 38)
|
||||
If SELinux is enabled (check with `sestatus`), install the following packages:
|
||||
|
||||
```bash
|
||||
## Install Repos
|
||||
dnf install epel-release
|
||||
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
|
||||
dnf module enable php:remi-8.0
|
||||
|
||||
## Get dnf updates
|
||||
dnf update -y
|
||||
|
||||
## Install PHP 8.0
|
||||
dnf install -y php php-{common,fpm,cli,json,mysqlnd,gd,mbstring,pdo,zip,bcmath,dom,opcache}
|
||||
sudo dnf install -y policycoreutils selinux-policy selinux-policy-targeted setroubleshoot-server setools setools-console mcstrans
|
||||
```
|
||||
|
||||
### If using Fedora Server 38 install PHP 8.1 and Dependencies from this section. If not, skip this section.
|
||||
```bash
|
||||
dnf install https://rpms.remirepo.net/fedora/remi-release-38.rpm
|
||||
dnf module enable php:remi-8.1
|
||||
dnf install php php-{common,fpm,cli,json,mysqlnd,gd,mbstring,pdo,zip,bcmath,dom,opcache,process}
|
||||
```
|
||||
### Installing Dependencies
|
||||
|
||||
### Composer
|
||||
```bash
|
||||
dnf install -y zip unzip tar # Required for Composer
|
||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
```
|
||||
|
||||
## Install Utility Packages
|
||||
|
||||
|
||||
### Nginx
|
||||
```bash
|
||||
dnf install -y nginx
|
||||
|
||||
firewall-cmd --add-service=http --permanent
|
||||
firewall-cmd --add-service=https --permanent
|
||||
firewall-cmd --reload
|
||||
```
|
||||
|
||||
### Redis
|
||||
```bash
|
||||
dnf install -y redis
|
||||
|
||||
systemctl start redis
|
||||
systemctl enable redis
|
||||
```
|
||||
|
||||
#### SELinux commands
|
||||
|
||||
The following command will allow nginx to work with redis and
|
||||
```bash
|
||||
setsebool -P httpd_can_network_connect 1
|
||||
setsebool -P httpd_execmem 1
|
||||
setsebool -P httpd_unified 1
|
||||
```
|
||||
|
||||
## Server Configuration
|
||||
This following section covers the configuration of parts of the server to run the panel.
|
||||
|
||||
### Configuring MariaDB
|
||||
The fastest way to set up mariadb is to use the `mysql_secure_installation` command and follow prompts
|
||||
Run the following commands to install all necessary dependencies:
|
||||
|
||||
```bash
|
||||
mysql_secure_installation
|
||||
# Update system
|
||||
sudo dnf update -y
|
||||
|
||||
# Install EPEL and Remi repository
|
||||
sudo dnf install -y epel-release
|
||||
# Add additional repositories for PHP (Enterprise Linux 8)
|
||||
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
|
||||
# Add additional repositories for PHP (Fedora Server 40)
|
||||
sudo dnf install -y https://rpms.remirepo.net/fedora/remi-release-40.rpm
|
||||
|
||||
# Enable PHP 8.3 from Remi
|
||||
sudo dnf module reset php
|
||||
sudo dnf module enable php:remi-8.3 -y
|
||||
|
||||
# Install dependencies
|
||||
sudo dnf install -y php php-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} mariadb mariadb-server nginx redis zip unzip tar
|
||||
|
||||
# Start and enable services
|
||||
sudo systemctl enable --now mariadb nginx redis
|
||||
|
||||
# Configure firewall
|
||||
sudo firewall-cmd --add-service=http --permanent
|
||||
sudo firewall-cmd --add-service=https --permanent
|
||||
sudo firewall-cmd --reload
|
||||
|
||||
# Install Composer
|
||||
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
|
||||
```
|
||||
|
||||
The following are safe defaults.
|
||||
## PHP Configuration
|
||||
|
||||
Change to your own secure password
|
||||
`Set root password? [Y/n] Y`
|
||||
Create a new PHP-FPM configuration file in /etc/php-fpm.d/www-pterodactyl.conf:
|
||||
|
||||
Get rid of users that could access the db by default
|
||||
`Remove anonymous users? [Y/n] Y`
|
||||
```conf
|
||||
[pterodactyl]
|
||||
|
||||
Keep root off the external interfaces
|
||||
`Disallow root login remotely? [Y/n] Y`
|
||||
user = nginx
|
||||
group = nginx
|
||||
|
||||
Extra databases that aren't needed
|
||||
`Remove test database and access to it? [Y/n] Y`
|
||||
listen = /var/run/php-fpm/pterodactyl.sock
|
||||
listen.owner = nginx
|
||||
listen.group = nginx
|
||||
listen.mode = 0750
|
||||
|
||||
Clears and sets all the changes made
|
||||
`Reload privilege tables now? [Y/n] Y`
|
||||
pm = ondemand
|
||||
pm.max_children = 9
|
||||
pm.process_idle_timeout = 10s
|
||||
pm.max_requests = 200
|
||||
```
|
||||
|
||||
All done! If you've completed all of the above steps, your MariaDB
|
||||
installation should now be secure.
|
||||
Start and enable PHP-FPM:
|
||||
|
||||
#### Adding MariaDB user
|
||||
To add your first user to the database, see our tutorial on [setting up MySQL](/tutorials/mysql_setup.md).
|
||||
|
||||
### Setup PHP
|
||||
Place the contents below in a file inside the `/etc/php-fpm.d` folder. The file can be named anything, but a good standard is `www-pterodactyl.conf`. This config will match the nginx config later in the guide.
|
||||
|
||||
<<< @/.snippets/php-fpm/pterodactyl-centos.conf
|
||||
|
||||
Start and enable php-fpm on the system.
|
||||
```bash
|
||||
systemctl enable php-fpm
|
||||
systemctl start php-fpm
|
||||
sudo systemctl enable --now php-fpm
|
||||
```
|
||||
|
||||
### Nginx
|
||||
Please check our [tutorial](/tutorials/creating_ssl_certificates.md) on generating SSL certificates for more information.
|
||||
|
||||
#### SSL Configuration
|
||||
<<< @/.snippets/webservers/nginx-centos.conf{5,11,26-27}
|
||||
|
||||
### Redis Setup
|
||||
The default Redis install is perfectly fine for the panel. If you have Redis already in use you may want to look into
|
||||
[running another Redis instance](https://community.pivotal.io/s/article/How-to-setup-and-run-multiple-Redis-server-instances-on-a-Linux-host).
|
||||
|
||||
## Installing the Panel
|
||||
Excellent, we now have all of the required dependencies installed and configured. From here, follow the [official Panel installation documentation](/panel/1.0/getting_started.md#download-files).
|
||||
|
||||
|
||||
::: tip
|
||||
You will need to change the fastcgi_pass path in the Nginx configuration to `/var/run/php-fpm/pterodactyl.sock`
|
||||
:::
|
||||
@ -11,40 +11,27 @@ This guide is based off the [official installation documentation](/panel/1.0/get
|
||||
In this guide, we will install the required dependencies for the Pterodactyl panel. After that, you can follow the official installation documentation.
|
||||
|
||||
```bash
|
||||
# Update package lists
|
||||
apt update -y
|
||||
|
||||
# Install necessary packages
|
||||
apt -y install software-properties-common curl ca-certificates gnupg2 sudo lsb-release
|
||||
|
||||
# Add repository for PHP
|
||||
# Add additional repositories for PHP
|
||||
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 | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/sury-keyring.gpg
|
||||
|
||||
# Add repository for Redis
|
||||
# Add Redis official APT repository
|
||||
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
|
||||
|
||||
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
|
||||
|
||||
# Update package lists
|
||||
apt update -y
|
||||
|
||||
# Install PHP and required extensions
|
||||
apt install -y php8.1 php8.1-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip}
|
||||
|
||||
# MariaDB repo setup script
|
||||
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
|
||||
|
||||
# Install the rest of dependencies
|
||||
apt install -y mariadb-server nginx tar unzip git redis-server
|
||||
|
||||
# Install Dependencies
|
||||
apt install -y php8.3 php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} mariadb-server nginx tar unzip git redis-server
|
||||
```
|
||||
|
||||
### Installing Composer
|
||||
|
||||
Composer is a dependency manager for PHP that allows us to ship everything you'll need code wise to operate the Panel. You'll
|
||||
need composer installed before continuing in this process.
|
||||
Composer is a dependency manager for PHP that allows us to ship everything you'll need code wise to operate the Panel. You'll need composer installed before continuing in this process.
|
||||
|
||||
``` bash
|
||||
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
@ -1,16 +1,9 @@
|
||||
# CentOS 7
|
||||
In this guide we will install Pterodactyl's Wings v1.X — including all of it's dependencies — and configure it to use a SSL connection.
|
||||
This guide provides comprehensive instructions for installing Pterodactyl Wings v1.X on CentOS 7.
|
||||
|
||||
[[toc]]
|
||||
|
||||
::: tip
|
||||
This guide is based off the [official installation documentation](/wings/1.0/installing.md) but is tailored specifically for CentOS 7.
|
||||
:::
|
||||
|
||||
## Install Requirements
|
||||
We will first begin by installing all of Wings' [required](/wings/1.0/installing.md#dependencies) dependencies.
|
||||
|
||||
### Docker
|
||||
## Install Dependencies
|
||||
|
||||
```bash
|
||||
## Install yum tools
|
||||
@ -23,12 +16,9 @@ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce
|
||||
yum install -y docker-ce docker-ce-cli
|
||||
|
||||
## Enable docker service
|
||||
systemctl enable docker
|
||||
systemctl start docker
|
||||
```
|
||||
systemctl enable --now docker
|
||||
|
||||
### FirewallD Changes
|
||||
```bash
|
||||
# Configure firewall
|
||||
firewall-cmd --add-port 8080/tcp --permanent
|
||||
firewall-cmd --add-port 2022/tcp --permanent
|
||||
firewall-cmd --permanent --zone=trusted --change-interface=docker0
|
||||
|
||||
@ -1,34 +1,26 @@
|
||||
# CentOS 8, Rocky Linux 8, AlmaLinux 8
|
||||
In this guide we will install Pterodactyl's Wings v1.X — including all of it's dependencies — and configure it to use a SSL connection.
|
||||
# Enterprise Linux 8 and Fedora Server 40
|
||||
This guide provides comprehensive instructions for installing Pterodactyl Wings v1.X on CentOS 8, Rocky Linux 8, AlmaLinux 8 and Fedora Server 40.
|
||||
|
||||
[[toc]]
|
||||
|
||||
::: tip
|
||||
This guide is based off the [official installation documentation](/wings/1.0/installing.md) but is tailored specifically for Enterprise Linux 8.
|
||||
:::
|
||||
|
||||
## Install Requirements
|
||||
We will first begin by installing all of the Wings' [required](/wings/1.0/installing.md#dependencies) dependencies.
|
||||
|
||||
### Docker
|
||||
## Install Dependencies
|
||||
|
||||
```bash
|
||||
## Install yum tools
|
||||
dnf install -y dnf-utils device-mapper-persistent-data lvm2
|
||||
# Install required packages
|
||||
sudo dnf install -y dnf-utils device-mapper-persistent-data lvm2
|
||||
|
||||
## Add the docker repo
|
||||
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
|
||||
# Add Docker repository (Enterprise Linux 8)
|
||||
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
|
||||
# Add Docker repository (Fedora Server 40)
|
||||
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
||||
|
||||
## Install docker
|
||||
dnf install -y docker-ce --nobest
|
||||
## Install Docker
|
||||
sudo dnf install -y docker-ce docker-ce-cli containerd.io
|
||||
|
||||
## Enable docker service
|
||||
systemctl enable docker
|
||||
systemctl start docker
|
||||
```
|
||||
## Enable Docker service
|
||||
systemctl enable --now docker
|
||||
|
||||
### FirewallD Changes
|
||||
```bash
|
||||
# Configure firewall
|
||||
firewall-cmd --add-port 8080/tcp --permanent
|
||||
firewall-cmd --add-port 2022/tcp --permanent
|
||||
firewall-cmd --permanent --zone=trusted --change-interface=pterodactyl0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user