Advertisement
felixcrazzy

web server drupal

Aug 6th, 2018
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. Router //
  2. #Routing
  3. tambah eth1
  4. nano /etc/sysctl.conf > hapus pagar net.ipv4.ip_forward=1
  5. nano /etc/rc.local > tambah iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  6. retart
  7.  
  8.  
  9.  
  10.  
  11. //WEB SERVER
  12. #install awal
  13. apt-get install net-tools ssh proftpd unzip
  14.  
  15. #install php7.0 butuh koneksi internet
  16. echo "deb http://ftp.de.debian.org/debian stretch main" >> /etc/apt/sources.list
  17. apt-get update
  18. apt-get install postgresql php7.0-pgsql php7.0-gd php7.0-fpm php7.0-xml php7.0-cli nginx
  19.  
  20. #konfigurasi nginx
  21. nano /etc/nginx/sites-available/default
  22. >tambah index.php
  23. >hapus semua # dibagian location ~\.php$ KECUALI fastcgi_pass 127.0.0.1:9000
  24.  
  25. #konfigurasi php5-fpm
  26. >ctrw+w cari cgi.fix_path
  27. >hapus ; & hapus 0
  28.  
  29. #restart nginx & php5.6-fpm
  30. service nginx restart
  31. service php5.6-fpm restart
  32.  
  33. #beri akses penuh /var/www/html/
  34. chmod 777 /var/www/html/
  35.  
  36. #buat database
  37. su postgres
  38. createuser -P felix #membuat user
  39. createdb -O felix drupal #membuat database O < o kapital
  40. exit
  41.  
  42. #installasi drupal
  43. >copy drupal.zip ke /var/www/html/
  44. cd /var/www/html/
  45. unzip drupal.zip
  46. cd drupal/sites/default
  47. mkdir files
  48. chmod 777 files
  49. cp default.settings.php settings.php
  50. chmod 777 settings.php
  51.  
  52.  
  53.  
  54.  
  55. //DNS
  56. //instal dns
  57. apt-get install bind9
  58. >atur seperti biasa
  59. nano named.conf.options > forwarders
  60. nano /etc/resolv.conf > ip server
  61. >restart bind
  62. >tambahkan ip di nano /etc/resolv.conf
  63. >restart network
  64.  
  65.  
  66.  
  67. //SSL
  68. //install openvpn
  69. apt-get install openvpn
  70. cp -R /usr/share/easy-rsa/ /etc/nginx/
  71. cd /etc/nginx/easy-rsa/
  72. nano vars
  73. > export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA` ubah menjadi
  74. export KEY_CONFIG=/etc/nginx/easy-rsa/openssl-1.0.0.cnf
  75. source vars
  76. ./clean-all
  77. ./build-ca
  78. ./build-dh
  79. cd keys
  80. cp ca.* dh2048.pem /etc/nginx
  81. nano /etc/nginx/sites-available/default
  82. >hapus pagar di depan listen 443
  83. >tambahkan
  84. ssl_certificate ca.crt;
  85. ssl_certificate_key ca.key;
  86.  
  87.  
  88. //Virtual Host
  89. atur dns tambahkan sub domain
  90. cd /etc/nginx/sites-available/
  91. cp default web
  92. listen 80 hilangkan default server
  93. ssl hilangkan default server
  94. root /var/www/html/drupal
  95. server_name subdomain
  96. chmod 777 web
  97. ln -s /etc/nginx/sites-available/web /etc/nginx/sites-enabled
  98. service nginx restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement