SHARE
TWEET

vm config

a guest Feb 12th, 2019 320 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. iptables -A INPUT -p tcp --dport 7171 -j ACCEPT
  2. iptables -A INPUT -p tcp --dport 7172 -j ACCEPT
  3. iptables -A INPUT -p tcp --dport 80 -j ACCEPT
  4. iptables -A INPUT -p tcp --dport 8090 -j ACCEPT
  5. iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
  6. iptables -A INPUT -p tcp --dport 443 -j ACCEPT
  7. iptables -A INPUT -p tcp --dport 4499 -j ACCEPT
  8. iptables -A INPUT -p tcp --dport 8245 -j ACCEPT
  9. iptables -A INPUT -p tcp --dport 7173 -j ACCEPT
  10.  
  11. apt-get update
  12. apt-get upgrade
  13.  
  14. apt-get install nginx
  15.  
  16. service nginx start
  17.  
  18. lscpu
  19.  
  20. nano /etc/nginx/nginx.conf
  21.  
  22.     worker_processes 4; -- troca o 4 pela quantidade de cpu q seu pc tem
  23.  
  24. service nginx restart
  25.  
  26. nano /etc/nginx/sites-available/default
  27.  
  28.     server {
  29.       listen 80;
  30.       listen [::]:80;
  31.       ***server_name EXTERNAL IP;***
  32.       root /usr/share/nginx/html;
  33.       index ***index.php*** index.html index.htm;
  34.       # Make site accessible from http://localhost/
  35.       server_name server.unixmen.local
  36.     }
  37.    
  38.     location ~ \.php$ {
  39.          ***try_files $uri =404;   ---------> Add this line
  40.          fastcgi_split_path_info ^(.+\.php)(/.+)$;
  41.          #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  42.          #
  43.          #       # With php5-cgi alone:
  44.          #      fastcgi_pass 127.0.0.1:9000;
  45.          #       # With php5-fpm:
  46.                 fastcgi_pass unix:/var/run/php5-fpm.sock;
  47.          fastcgi_index index.php;
  48.          include fastcgi.conf;
  49.     }
  50.    
  51.    
  52. nginx -t
  53.  
  54. service nginx restart
  55.  
  56. apt-get install mariadb-server mariadb-client
  57.  
  58. service mysql status ---------- opcional
  59.  
  60. apt-get install php5 php5-fpm php5-mysql
  61.  
  62. nano /etc/php5/fpm/php.ini
  63.  
  64. ctrl+w -> cgi.fix_pathinfo=1 --------- tirar ; e mudar 1 para 0
  65.  
  66. service php5-fpm restart
  67.  
  68. nano /usr/share/nginx/html/info.php
  69.  
  70.     <?php phpinfo() ?>
  71.    
  72. nano /etc/php5/fpm/pool.d/www.conf
  73. ctrl+w -> listen = /var/run/php5-fpm.sock ---------- tirar ; e trocar /var/run/php5-fpm.sock por 127.0.0.1:9000
  74.  
  75. service php5-fpm restart
  76.  
  77. nano /etc/nginx/sites-available/default
  78.  
  79. ctrl+w -> fastcgi_pass unix:/var/run/php5-fpm.sock ------ comentar com # e descomentar a linha fastcgi_pass 127.0.0.1:9000;
  80.  
  81. service nginx restart
  82.  
  83. apt-get install phpmyadmin
  84.  
  85. ln -s /usr/share/phpmyadmin/ /usr/share/nginx/html
  86.  
  87. service nginx restart
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top