Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.33 KB | None | 0 0
  1. apt -y install software-properties-common
  2. add-apt-repository -y ppa:ondrej/php
  3. add-apt-repository -y ppa:chris-lea/redis-server
  4. curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
  5. apt update
  6. apt -y install php7.2 php7.2-cli php7.2-gd php7.2-mysql php7.2-pdo php7.2-mbstring php7.2-tokenizer php7.2-bcmath php7.2-xml php7.2-fpm php7.2-curl php7.2-zip mariadb-server nginx curl tar unzip git redis-server
  7. senha: senhadomysql
  8. mkdir -p /var/www/pterodactyl
  9. cd /var/www/pterodactyl
  10. curl -Lo panel.tar.gz https://github.com/pterodactyl/panel/releases/download/v0.7.11/panel.tar.gz
  11. tar --strip-components=1 -xzvf panel.tar.gz
  12. chmod -R 755 storage/* bootstrap/cache/
  13. curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
  14. cp .env.example .env
  15. composer install --no-dev --optimize-autoloader
  16. php artisan key:generate --force
  17. copiar a key e guardar
  18. mysql -u root -p
  19. USE mysql;
  20. CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'senhadomysql';
  21. CREATE DATABASE panel;
  22. GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1';
  23. FLUSH PRIVILEGES;
  24. exit
  25. php artisan p:environment:setup
  26. seuemail@gmail.com
  27. https://link.do.painel
  28. Europe/Amsterdam
  29. enter,enter,enter,yes
  30. php artisan p:environment:database
  31. 127.0.0.1
  32. 3306
  33. panel
  34. pterodactyl
  35. senhadomysql
  36. php artisan p:environment:mail
  37. mail
  38. seuemail@gmail.com
  39. Pterodactyl Panel
  40. sll
  41. php artisan migrate --seed
  42. yes
  43. php artisan p:user:make
  44. yes,seuemail@gmail.com,usuario,Nome,Sobrenome,senhadeacesso
  45. chown -R www-data:www-data *
  46. apt-get nano
  47. apt-get install nano
  48. sudo crontab -e
  49. 2,colar o codigo * * * * * php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1 la em baixo.
  50. service cron start
  51. nano /etc/systemd/system/pteroq.service
  52.  
  53. # Pterodactyl Queue Worker File
  54. # ----------------------------------
  55.  
  56. [Unit]
  57. Description=Pterodactyl Queue Worker
  58. After=redis-server.service
  59.  
  60. [Service]
  61. # On some systems the user and group might be different.
  62. # Some systems use `apache` or `nginx` as the user and group.
  63. User=www-data
  64. Group=www-data
  65. Restart=always
  66. ExecStart=/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
  67.  
  68. [Install]
  69. WantedBy=multi-user.target
  70.  
  71. systemctl enable pteroq.service
  72. systemctl start pteroq
  73. apt-get install letsencrypt
  74. y
  75. letsencrypt certonly -d link.do.painel
  76. 1,seuemail@gmail.com,A,N
  77. nano /etc/nginx/sites-available/pterodactyl.conf
  78.  
  79. todos que tiver <domain> troca para o dominio
  80.  
  81. server_tokens off;
  82.  
  83. server {
  84. listen 80;
  85. server_name <domain>;
  86. return 301 https://$server_name$request_uri;
  87. }
  88.  
  89. server {
  90. listen 443 ssl http2;
  91. server_name <domain>;
  92.  
  93. root /var/www/pterodactyl/public;
  94. index index.php;
  95.  
  96. access_log /var/log/nginx/pterodactyl.app-access.log;
  97. error_log /var/log/nginx/pterodactyl.app-error.log error;
  98.  
  99. # allow larger file uploads and longer script runtimes
  100. client_max_body_size 100m;
  101. client_body_timeout 120s;
  102.  
  103. sendfile off;
  104.  
  105. # SSL Configuration
  106. ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
  107. ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
  108. ssl_session_cache shared:SSL:10m;
  109. ssl_protocols TLSv1.2;
  110. ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
  111. ssl_prefer_server_ciphers on;
  112.  
  113. # See https://hstspreload.org/ before uncommenting the line below.
  114. # add_header Strict-Transport-Security "max-age=15768000; preload;";
  115. add_header X-Content-Type-Options nosniff;
  116. add_header X-XSS-Protection "1; mode=block";
  117. add_header X-Robots-Tag none;
  118. add_header Content-Security-Policy "frame-ancestors 'self'";
  119. add_header X-Frame-Options DENY;
  120. add_header Referrer-Policy same-origin;
  121.  
  122. location / {
  123. try_files $uri $uri/ /index.php?$query_string;
  124. }
  125.  
  126. location ~ \.php$ {
  127. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  128. fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  129. fastcgi_index index.php;
  130. include fastcgi_params;
  131. fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
  132. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  133. fastcgi_param HTTP_PROXY "";
  134. fastcgi_intercept_errors off;
  135. fastcgi_buffer_size 16k;
  136. fastcgi_buffers 4 16k;
  137. fastcgi_connect_timeout 300;
  138. fastcgi_send_timeout 300;
  139. fastcgi_read_timeout 300;
  140. include /etc/nginx/fastcgi_params;
  141. }
  142.  
  143. location ~ /\.ht {
  144. deny all;
  145. }
  146. }
  147.  
  148. sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
  149. service nginx restart
  150. systemctl status nginx.service
  151. CTRL + C
  152. letsencrypt certonly -d link.do.painel
  153. Colocar: 1
  154. service nginx restart
  155. systemctl status nginx.service
  156. tem que estar ativo o nginx
  157.  
  158.  
  159. cd
  160.  
  161. **INSTALAÇÃO DAEMON**
  162.  
  163. curl -sSL https://get.docker.com/ | CHANNEL=stable bash
  164. systemctl enable docker
  165. sudo update-grub
  166. GRUB_CMDLINE_LINUX_DEFAULT="swapaccount=1"
  167. curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
  168. apt -y install nodejs make gcc g++
  169. mkdir -p /srv/daemon /srv/daemon-data
  170. cd /srv/daemon
  171. curl -L https://github.com/pterodactyl/daemon/releases/download/v0.6.12/daemon.tar.gz | tar --strip-components=1 -xzv
  172. npm install --only=production
  173. nano /srv/daemon/config/core.json
  174. Colar o Core.
  175. sudo npm start
  176. nano /etc/systemd/system/wings.service
  177.  
  178. [Unit]
  179. Description=Pterodactyl Wings Daemon
  180. After=docker.service
  181.  
  182. [Service]
  183. User=root
  184. #Group=some_group
  185. WorkingDirectory=/srv/daemon
  186. LimitNOFILE=4096
  187. PIDFile=/var/run/wings/daemon.pid
  188. ExecStart=/usr/bin/node /srv/daemon/src/index.js
  189. Restart=on-failure
  190. StartLimitInterval=600
  191.  
  192. [Install]
  193. WantedBy=multi-user.target
  194.  
  195. systemctl enable --now wings
  196. systemctl status wings
  197. apt install make gcc g++
  198. apt autoremove
  199. cd /srv/daemon && npm start
  200. cd /var/www/pterodactyl/public/
  201. wget https://files.phpmyadmin.net/phpMyAdmin/4.8.5/phpMyAdmin-4.8.5-all-languages.zip
  202. unzip phpMyAdmin-4.8.5-all-languages.zip
  203. mv phpMyAdmin-4.8.5-all-languages phpMyAdmin
  204. ai acessa por dominio.com/phpMyAdmin
  205.  
  206. e configurar o painel
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement