178 lines
29 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>CentOS 7 | Pterodactyl</title>
<meta name="generator" content="VuePress 1.8.2">
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#0e4688">
<link rel="manifest" href="/favicons/site.webmanifest">
<link rel="shortcut icon" href="/favicons/favicon.ico">
<meta name="description" content="Pterodactyl is an open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.">
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
<meta name="theme-color" content="#0e4688">
<link rel="preload" href="/assets/css/0.styles.b3d0dfa6.css" as="style"><link rel="preload" href="/assets/js/app.e5d692cc.js" as="script"><link rel="preload" href="/assets/js/4.c34bdd00.js" as="script"><link rel="preload" href="/assets/js/1.19e16341.js" as="script"><link rel="preload" href="/assets/js/35.92028599.js" as="script"><link rel="prefetch" href="/assets/js/10.cdd4a61d.js"><link rel="prefetch" href="/assets/js/11.edf57bce.js"><link rel="prefetch" href="/assets/js/12.70f651d9.js"><link rel="prefetch" href="/assets/js/13.bd04c4ec.js"><link rel="prefetch" href="/assets/js/14.574fe6a2.js"><link rel="prefetch" href="/assets/js/15.e88515bc.js"><link rel="prefetch" href="/assets/js/16.24317aa9.js"><link rel="prefetch" href="/assets/js/17.99a727ea.js"><link rel="prefetch" href="/assets/js/18.fcb158a9.js"><link rel="prefetch" href="/assets/js/19.5c29a0ca.js"><link rel="prefetch" href="/assets/js/2.21e1a937.js"><link rel="prefetch" href="/assets/js/20.e4bdca81.js"><link rel="prefetch" href="/assets/js/21.aba75f57.js"><link rel="prefetch" href="/assets/js/22.e3d1f582.js"><link rel="prefetch" href="/assets/js/23.2e2e0abb.js"><link rel="prefetch" href="/assets/js/24.cef1e6d4.js"><link rel="prefetch" href="/assets/js/25.0d90b696.js"><link rel="prefetch" href="/assets/js/26.199e42e5.js"><link rel="prefetch" href="/assets/js/27.53b2955f.js"><link rel="prefetch" href="/assets/js/28.b1cca863.js"><link rel="prefetch" href="/assets/js/29.34880c0e.js"><link rel="prefetch" href="/assets/js/30.6cc47499.js"><link rel="prefetch" href="/assets/js/31.db5aa011.js"><link rel="prefetch" href="/assets/js/32.d21489df.js"><link rel="prefetch" href="/assets/js/33.1a1ebdff.js"><link rel="prefetch" href="/assets/js/34.f044669f.js"><link rel="prefetch" href="/assets/js/36.e7b7e83e.js"><link rel="prefetch" href="/assets/js/37.c5e4e1df.js"><link rel="prefetch" href="/assets/js/38.b5b4f5ac.js"><link rel="prefetch" href="/assets/js/39.582c9238.js"><link rel="prefetch" href="/assets/js/40.7ac7df6e.js"><link rel="prefetch" href="/assets/js/41.d1176c80.js"><link rel="prefetch" href="/assets/js/42.42b795d0.js"><link rel="prefetch" href="/assets/js/43.87824034.js"><link rel="prefetch" href="/assets/js/44.73bec5d3.js"><link rel="prefetch" href="/assets/js/45.d370a0c3.js"><link rel="prefetch" href="/assets/js/46.7e0f2b72.js"><link rel="prefetch" href="/assets/js/47.e804c12a.js"><link rel="prefetch" href="/assets/js/48.28d35671.js"><link rel="prefetch" href="/assets/js/49.3bc646ce.js"><link rel="prefetch" href="/assets/js/5.2366f5e0.js"><link rel="prefetch" href="/assets/js/50.72a8a2f1.js"><link rel="prefetch" href="/assets/js/51.c78b748d.js"><link rel="prefetch" href="/assets/js/52.c69a9cce.js"><link rel="prefetch" href="/assets/js/53.9c3cab69.js"><link rel="prefetch" href="/assets/js/54.5fed4f57.js"><link rel="prefetch" href="/assets/js/55.398d2689.js"><link rel="prefetch" href="/assets/js/56.206b0ab1.js"><link rel="prefetch" href="/assets/js/57.fdfaf056.js"><link rel="prefetch" href="/assets/js/58.9cc1b910.js"><link rel="prefetch" href="/assets/js/59.443c58f6.js"><link rel="prefetch" href="/assets/js/6.92501184.js"><link rel="prefetch" href="/assets/js/60.f253682c.js"><link rel="prefetch" href="/assets/js/61.e1b2bc1e.js"><link rel="prefetch" href="/assets/js/62.b082266a.js"><link rel="prefetch" href="/assets/js/63.2fe954fd.js"><link rel="prefetch" href="/assets/js/64.0dffd897.js"><link rel="prefetch" href="/assets/js/65.98dc8be8.js"><link rel="prefetch" href="/assets/js/66.74f688e5.js"><link rel="prefetch" href="/assets/js/67.45d379df.js"><link rel="prefetch" href="/assets/js/68.ff8298fd.js"><link rel="prefetch" href="/assets/js/69.145d59c4.js"><link rel="prefetch" href="/assets/js/7.c41300e2.js"><link rel="prefetch" href="/assets/js/70.3ecf8a31.js"><link rel="prefetch" href="/assets/js/71.6b549e82.js"><link rel="prefetch" href="/assets/js/72.95e9bf6c.js"><link rel="prefetch" href="/assets/js/73.880125ed.js"><link rel="prefetch" href="/assets/js/74.7f4bdb91.js"><link rel="prefetch" href="/assets/js/75.b97c5e9c.js"><link rel="prefetch" href="/assets/js/8.324a951f.js"><link rel="prefetch" href="/assets/js/9.28a16f41.js">
<link rel="stylesheet" href="/assets/css/0.styles.b3d0dfa6.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div><div class="fixed h-12 w-full z-50 top-0"><div class="h-12 w-full bg-black flex items-center justify-center px-4"><p class="text-grey-lightest font-semibold">
Stand with Ukraine 🇺🇦 
<a href="https://www.savethechildren.org/us/where-we-work/ukraine" target="_blank" rel="noindex nofollow noopener" class="text-blue-lighter">Donate</a> <a href="https://razomforukraine.org/" target="_blank" rel="noindex nofollow noopener" class="text-blue-lighter">Today.</a></p></div></div> <div class="theme-container mt-12"><header class="nav"><div class="sidebar-button block md:hidden flex-no-shrink"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <div class="logo-container"><a href="/" class="home-link router-link-active"><img src="/logos/pterry.svg" class="logo"> <span class="site-name hidden md:inline can-hide">Pterodactyl</span></a></div> <div class="w-full"><div class="flex"><div class="search-box"><input aria-label="Search" placeholder="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links flex-no-shrink hidden md:flex"><div class="nav-item"><a href="/project/introduction.html" class="nav-link">Documentation
</a></div><div class="nav-item"><a href="/community/about.html" class="nav-link">Community Guides
</a></div><div class="nav-item"><a href="https://discord.gg/pterodactyl" target="_blank" rel="noopener noreferrer" class="nav-link external">
Get Help
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://dashflo.net/docs/api/pterodactyl/v1/" target="_blank" rel="noopener noreferrer" class="nav-link external">
API
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <div class="nav-item"><a href="https://github.com/pterodactyl/panel" target="_blank" rel="noopener noreferrer" class="nav-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div></nav></div></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links flex-no-shrink block md:hidden"><div class="nav-item"><a href="/project/introduction.html" class="nav-link">Documentation
</a></div><div class="nav-item"><a href="/community/about.html" class="nav-link">Community Guides
</a></div><div class="nav-item"><a href="https://discord.gg/pterodactyl" target="_blank" rel="noopener noreferrer" class="nav-link external">
Get Help
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://dashflo.net/docs/api/pterodactyl/v1/" target="_blank" rel="noopener noreferrer" class="nav-link external">
API
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <div class="nav-item"><a href="https://github.com/pterodactyl/panel" target="_blank" rel="noopener noreferrer" class="nav-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div></nav> <ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading"><span>Community Guides</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/community/about.html" class="sidebar-link">Community Guides and Tutorials</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading open"><span>Panel Installation</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/community/installation-guides/panel/centos7.html" aria-current="page" class="active sidebar-link">CentOS 7</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/community/installation-guides/panel/centos7.html#install-requirements-and-additional-utilities" class="sidebar-link">Install Requirements and Additional Utilities</a></li><li class="sidebar-sub-header"><a href="/community/installation-guides/panel/centos7.html#install-utility-packages" class="sidebar-link">Install Utility Packages</a></li><li class="sidebar-sub-header"><a href="/community/installation-guides/panel/centos7.html#server-configuration" class="sidebar-link">Server Configuration</a></li><li class="sidebar-sub-header"><a href="/community/installation-guides/panel/centos7.html#installing-the-panel" class="sidebar-link">Installing the Panel</a></li></ul></li><li><a href="/community/installation-guides/panel/centos8.html" class="sidebar-link">CentOS 8, Rocky Linux 8, AlmaLinux 8, Fedora Server 38</a></li><li><a href="/community/installation-guides/panel/debian.html" class="sidebar-link">Debian 11 &amp; 12</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Wings Installation</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/community/installation-guides/wings/centos7.html" class="sidebar-link">CentOS 7</a></li><li><a href="/community/installation-guides/wings/centos8.html" class="sidebar-link">CentOS 8, Rocky Linux 8, AlmaLinux 8</a></li><li><a href="/community/installation-guides/wings/debian.html" class="sidebar-link">Debian 11 &amp; 12</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Creating Eggs</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/community/config/eggs/creating_a_custom_egg.html" class="sidebar-link">Creating a Custom Egg</a></li><li><a href="/community/config/eggs/creating_a_custom_image.html" class="sidebar-link">Creating a Custom Docker Image</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Game Configuration</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/community/games/minecraft.html" class="sidebar-link">Minecraft</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Tutorials</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/community/config/nodes/add_node.html" class="sidebar-link">Creating a New Node</a></li><li><a href="/community/tutorials/artisan.html" class="sidebar-link">Artisan CLI</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Customization</span> <!----> <!----></p> <ul class="sidebar-group-items"><li><a href="/community/customization/panel.html" class="sidebar-link">Building Panel Assets</a></li><li><a href="/community/customization/wings.html" class="sidebar-link">Building Wings</a></li></ul></div></li></ul> </div> <div class="page"> <div class="content content__default"><h1 id="centos-7"><a href="#centos-7" class="header-anchor">#</a> CentOS 7</h1> <p>In this guide we will install Pterodactyl v1.X — including all of it's dependencies — and configure our webserver
to serve it using SSL.</p> <p></p><div class="table-of-contents"><ul><li><a href="#install-requirements-and-additional-utilities">Install Requirements and Additional Utilities</a><ul><li><a href="#selinux-tools">SELinux tools</a></li><li><a href="#mariadb">MariaDB</a></li><li><a href="#php-8-0">PHP 8.0</a></li><li><a href="#composer">Composer</a></li></ul></li><li><a href="#install-utility-packages">Install Utility Packages</a><ul><li><a href="#nginx">Nginx</a></li><li><a href="#redis">Redis</a></li></ul></li><li><a href="#server-configuration">Server Configuration</a><ul><li><a href="#configuring-mariadb">Configuring MariaDB</a></li><li><a href="#setup-php">Setup PHP</a></li><li><a href="#nginx">Nginx</a></li><li><a href="#redis-setup">Redis Setup</a></li></ul></li><li><a href="#installing-the-panel">Installing the Panel</a></li></ul></div><p></p> <div class="custom-block tip"><p class="custom-block-title">TIP</p> <p>This guide is based off the <a href="/panel/1.0/getting_started.html">official installation documentation</a> but is tailored specifically for CentOS 7.</p></div> <h2 id="install-requirements-and-additional-utilities"><a href="#install-requirements-and-additional-utilities" class="header-anchor">#</a> Install Requirements and Additional Utilities</h2> <p>We will install all of Pterodactyl's <a href="/panel/1.0/getting_started.html#dependencies">required</a> dependencies and a few aditional utilities.</p> <div class="custom-block tip"><p class="custom-block-title">TIP</p> <p>If you run <code>sestatus</code> and it shows <code>SELinux status: enabled</code> you should install the following packages for later</p></div> <h3 id="selinux-tools"><a href="#selinux-tools" class="header-anchor">#</a> SELinux tools</h3> <div class="language-bash extra-class"><pre class="language-bash"><code>yum <span class="token function">install</span> -y policycoreutils policycoreutils-python selinux-policy selinux-policy-targeted libselinux-utils setroubleshoot-server setools setools-console mcstrans
</code></pre></div><h3 id="mariadb"><a href="#mariadb" class="header-anchor">#</a> MariaDB</h3> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment">## Install Repos</span>
<span class="token function">cat</span> <span class="token operator">&lt;&lt;</span>EOF <span class="token operator">&gt;</span> /etc/yum.repos.d/mariadb.repo
<span class="token comment"># MariaDB 10.5 CentOS repository list - created 2017-07-14 12:40 UTC</span>
<span class="token comment"># http://downloads.mariadb.org/mariadb/repositories/</span>
<span class="token punctuation">[</span>mariadb<span class="token punctuation">]</span>
name <span class="token operator">=</span> MariaDB
baseurl <span class="token operator">=</span> http://yum.mariadb.org/10.5/centos7-amd64
<span class="token assign-left variable">gpgkey</span><span class="token operator">=</span>https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
<span class="token assign-left variable">gpgcheck</span><span class="token operator">=</span><span class="token number">1</span>
EOF
<span class="token comment">## Get yum updates</span>
yum update -y
<span class="token comment">## Install MariaDB 10.5</span>
yum <span class="token function">install</span> -y MariaDB-common MariaDB-server
<span class="token comment">## Start maraidb</span>
systemctl start mariadb
systemctl <span class="token builtin class-name">enable</span> mariadb
</code></pre></div><h3 id="php-8-0"><a href="#php-8-0" class="header-anchor">#</a> PHP 8.0</h3> <p>We recommend the remi repo to get the latest php packages.</p> <div class="language-bash extra-class"><pre class="language-bash"><code><span class="token comment">## Install Repos</span>
yum -y <span class="token function">install</span> https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y <span class="token function">install</span> https://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum <span class="token function">install</span> -y yum-utils
yum-config-manager --disable <span class="token string">'remi-php*'</span>
yum-config-manager --enable remi-php80
<span class="token comment">## Get yum updates</span>
yum update -y
<span class="token comment">## Install PHP 8.0</span>
yum <span class="token function">install</span> -y php php-<span class="token punctuation">{</span>common,fpm,cli,json,mysqlnd,mcrypt,gd,mbstring,pdo,zip,bcmath,dom,opcache<span class="token punctuation">}</span>
</code></pre></div><h3 id="composer"><a href="#composer" class="header-anchor">#</a> Composer</h3> <div class="language-bash extra-class"><pre class="language-bash"><code>yum <span class="token function">install</span> -y <span class="token function">zip</span> <span class="token function">unzip</span> <span class="token comment"># Required for Composer</span>
<span class="token function">curl</span> -sS https://getcomposer.org/installer <span class="token operator">|</span> php -- --install-dir<span class="token operator">=</span>/usr/local/bin --filename<span class="token operator">=</span>composer
</code></pre></div><h2 id="install-utility-packages"><a href="#install-utility-packages" class="header-anchor">#</a> Install Utility Packages</h2> <h3 id="nginx"><a href="#nginx" class="header-anchor">#</a> Nginx</h3> <div class="language-bash extra-class"><pre class="language-bash"><code>yum <span class="token function">install</span> -y nginx
firewall-cmd --add-service<span class="token operator">=</span>http --permanent
firewall-cmd --add-service<span class="token operator">=</span>https --permanent
firewall-cmd --reload
</code></pre></div><h3 id="redis"><a href="#redis" class="header-anchor">#</a> Redis</h3> <div class="language-bash extra-class"><pre class="language-bash"><code>yum <span class="token function">install</span> -y --enablerepo<span class="token operator">=</span>remi redis
systemctl start redis
systemctl <span class="token builtin class-name">enable</span> redis
</code></pre></div><h4 id="selinux-commands"><a href="#selinux-commands" class="header-anchor">#</a> SELinux commands</h4> <p>The following command will allow nginx to work with redis and</p> <div class="language-bash extra-class"><pre class="language-bash"><code>setsebool -P httpd_can_network_connect <span class="token number">1</span>
setsebool -P httpd_execmem <span class="token number">1</span>
setsebool -P httpd_unified <span class="token number">1</span>
</code></pre></div><h2 id="server-configuration"><a href="#server-configuration" class="header-anchor">#</a> Server Configuration</h2> <p>This following section covers the configuration of parts of the server to run the panel.</p> <h3 id="configuring-mariadb"><a href="#configuring-mariadb" class="header-anchor">#</a> Configuring MariaDB</h3> <p>The fastest way to set up mariadb is to use the <code>mysql_secure_installation</code> command and follow prompts</p> <div class="language-bash extra-class"><pre class="language-bash"><code>mysql_secure_installation
</code></pre></div><p>The following are safe defaults.</p> <p>Change to your own secure password<br> <code>Set root password? [Y/n] Y</code></p> <p>Get rid of users that could access the db by default<br> <code>Remove anonymous users? [Y/n] Y</code></p> <p>Keep root off the external interfaces<br> <code>Disallow root login remotely? [Y/n] Y</code></p> <p>Extra databases that aren't needed<br> <code>Remove test database and access to it? [Y/n] Y</code></p> <p>Clears and sets all the changes made<br> <code>Reload privilege tables now? [Y/n] Y</code></p> <p>All done! If you've completed all of the above steps, your MariaDB<br>
installation should now be secure.</p> <h4 id="adding-mariadb-user"><a href="#adding-mariadb-user" class="header-anchor">#</a> Adding MariaDB user</h4> <p>To add your first user to the database, see our tutorial on <a href="/tutorials/mysql_setup.html">setting up MySQL</a>.</p> <h3 id="setup-php"><a href="#setup-php" class="header-anchor">#</a> Setup PHP</h3> <p>Place the contents below in a file inside the <code>/etc/php-fpm.d</code> folder. The file can be named anything, but a good standard is <code>www-pterodactyl.conf</code>. This config will match the nginx config later in the guide.</p> <div class="language-conf extra-class"><pre class="language-text"><code>[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</code></pre></div><p>Start and enable php-fpm on the system.</p> <div class="language-bash extra-class"><pre class="language-bash"><code>systemctl <span class="token builtin class-name">enable</span> php-fpm
systemctl start php-fpm
</code></pre></div><h3 id="nginx-2"><a href="#nginx-2" class="header-anchor">#</a> Nginx</h3> <p>Please check our <a href="/tutorials/creating_ssl_certificates.html">tutorial</a> on generating SSL certificates for more information.</p> <h4 id="ssl-configuration"><a href="#ssl-configuration" class="header-anchor">#</a> SSL Configuration</h4> <div class="language-conf extra-class"><div class="highlight-lines"><br><br><br><br><div class="highlighted"> </div><br><br><br><br><br><div class="highlighted"> </div><br><br><br><br><br><br><br><br><br><br><br><br><br><br><div class="highlighted"> </div><div class="highlighted"> </div><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></div><pre class="language-text"><code>server_tokens off;
server {
listen 80;
server_name &lt;domain&gt;;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name &lt;domain&gt;;
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/&lt;domain&gt;/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/&lt;domain&gt;/privkey.pem;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers &quot;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&quot;;
ssl_prefer_server_ciphers on;
# See https://hstspreload.org/ before uncommenting the line below.
# add_header Strict-Transport-Security &quot;max-age=15768000; preload;&quot;;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection &quot;1; mode=block&quot;;
add_header X-Robots-Tag none;
add_header Content-Security-Policy &quot;frame-ancestors 'self'&quot;;
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:/var/run/php-fpm/pterodactyl.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE &quot;upload_max_filesize = 100M \n post_max_size=100M&quot;;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY &quot;&quot;;
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;
}
}</code></pre></div><h3 id="redis-setup"><a href="#redis-setup" class="header-anchor">#</a> Redis Setup</h3> <p>The default Redis install is perfectly fine for the panel. If you have Redis already in use you may want to look into
<a href="https://community.pivotal.io/s/article/How-to-setup-and-run-multiple-Redis-server-instances-on-a-Linux-host" target="_blank" rel="noopener noreferrer">running another Redis instance<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</p> <h2 id="installing-the-panel"><a href="#installing-the-panel" class="header-anchor">#</a> Installing the Panel</h2> <p>Excellent, we now have all of the required dependencies installed and configured. From here, follow the <a href="/panel/1.0/getting_started.html#download-files">official Panel installation documentation</a>.</p></div> <div class="page-edit"><div class="edit-link"><a href="https://github.com/pterodactyl/documentation/edit/master/community/installation-guides/panel/centos7.md" target="_blank" rel="noopener noreferrer">Help us improve this page.</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <!----></div> <div class="page-nav"><p class="inner"></p> <div class="prev"><span>
<a href="/community/about.html">Community Guides and Tutorials</a></span></div> <div class="next"><span><a href="/community/installation-guides/panel/centos8.html">CentOS 8, Rocky Linux 8, AlmaLinux 8, Fedora Server 38</a>
</span></div></div> </div></div></div><div class="global-ui"></div></div>
<script src="/assets/js/app.e5d692cc.js" defer></script><script src="/assets/js/4.c34bdd00.js" defer></script><script src="/assets/js/1.19e16341.js" defer></script><script src="/assets/js/35.92028599.js" defer></script>
</body>
</html>