Advertisement
dymbaun

Untitled

Oct 9th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.63 KB | None | 0 0
  1. ----------------------------------------------------------------------------------------------
  2. SETTING SYSTEM
  3.  
  4. apt--get update
  5.  
  6. apt--get install vim
  7.  
  8. rm --f /usr/bin/vi
  9.  
  10. ln --s /usr/bin/vim /usr/bin/vi
  11.  
  12. echo --e 'syntax on\nset number' > .vimrc
  13.  
  14. echo --e 'deb http://packages.dotdeb.org jessie all\ndeb--src http://packages.dotdeb.org jessie all\ndeb [arch=amd64,i386] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/debian jessie main' >> /etc/apt/sources.list
  15.  
  16. wget http://www.dotdeb.org/dotdeb.gpg
  17.  
  18. apt--key add dotdeb.gpg
  19.  
  20. apt--get install python--software--properties --y
  21.  
  22. apt--key adv ----recv--keys ----keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
  23.  
  24. apt--get update && apt--get upgrade --y
  25.  
  26. rm --f dotdeb.gpg
  27.  
  28. ----------------------------------------------------------------------------------------------------
  29. SETTING PHP (lebih tepatnya PHP5--FPM)
  30.  
  31. apt--get install php5--fpm php5--mysqlnd php5--gd php5--curl --y
  32.  
  33. sed --i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php5/fpm/php.ini
  34.  
  35. sed --i 's/upload_max_filesize = 2M/upload_max_filesize = 50M/' /etc/php5/fpm/php.ini
  36. ------------------------------------------------------------------------------------------------------
  37. SETTING MARIA DB
  38.  
  39. apt--get install mariadb--server --y
  40.  
  41. mysql_secure_installation
  42. N, Y, Y, Y, Y
  43.  
  44. --------------------------------------------------------------------------------------------------------
  45. Setting Nginx
  46.  
  47. apt--get install nginx --y
  48.  
  49. sed --i '/http {/a \\tclient_max_body_size 100m;' /etc/nginx/nginx.conf
  50.  
  51. vi /etc/nginx/sites--available/example.com
  52.  
  53. server {
  54. listen 80;
  55. server_name www.example.com;
  56. return 301 http://example.com$request_uri;
  57. }
  58.  
  59. server {
  60. listen 80;
  61.  
  62. root /var/www/html/example.com;
  63. index index.html index.htm index.php;
  64.  
  65. access_log /var/log/nginx/example.com.access.log;
  66. error_log /var/log/nginx/example.com.error.log;
  67.  
  68. server_name example.com;
  69.  
  70. location / {
  71. try_files $uri $uri/ /index.php?$args;
  72. }
  73.  
  74. location ~ \.php$ {
  75. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  76. fastcgi_pass unix:/var/run/php5--fpm.sock;
  77. fastcgi_index index.php;
  78. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  79. include fastcgi_params;
  80. }
  81.  
  82. location ~ /\.ht {
  83. deny all;
  84. }
  85.  
  86. }
  87.  
  88.  
  89. ----------------------------------------------------------------------------------------------------------------------
  90. ln --s /etc/nginx/sites--available/example.com /etc/nginx/sites--enabled/
  91.  
  92. service nginx restart
  93.  
  94.  
  95. service mysql restart
  96.  
  97. service php5--fpm restart
  98.  
  99. ------------------------------------------------------------------------------------------------------------------------
  100. SETTING DATA BASE
  101.  
  102. mysql --u root --p
  103.  
  104. --------------------------------------------------------------------------------------------------------------------------
  105. CREATE DATABASE db_example;
  106. CREATE USER 'u_example'@'localhost' IDENTIFIED BY 'password';
  107. GRANT ALL PRIVILEGES ON db_example.* TO 'u_example'@'localhost';
  108. flush privileges;
  109. quit;
  110. --------------------------------------------------------------------------------------------------------------------------
  111. ----------------------------------------------------------------------------------------------------------------------------
  112. INSTALL WORDPRESS DI VPS LINUX DEBIAN
  113.  
  114. wget https://wordpress.org/latest.tar.gz
  115.  
  116. tar --xf latest.tar.gz
  117.  
  118. rm --f latest.tar.gz
  119.  
  120. mv wordpress example.com
  121.  
  122. mv example.com /var/www/html/
  123.  
  124. chown --R www--data:www--data /var/www/html/example.com
  125. ----------------------------------------------------------------------------------------------------------------------------
  126.  
  127. MENAMBAH DOMAIN
  128. cp /etc/nginx/sites-available/default /etc/nginx/sites-available/example.org.block
  129.  
  130. vi /etc/nginx/sites-available/example.org.block
  131.  
  132. ln -s /etc/nginx/sites-available/example.org.block /etc/nginx/sites-enabled/
  133.  
  134. service nginx reload
  135.  
  136. mkdir -p /var/www/html/example.org
  137.  
  138. service mysql restart
  139.  
  140. service php5--fpm restart
  141.  
  142. mysql --u root --p
  143.  
  144. --------------------------------------------------------------------------------------------------------------------------
  145. CREATE DATABASE db_example;
  146. CREATE USER 'u_example'@'localhost' IDENTIFIED BY 'password';
  147. GRANT ALL PRIVILEGES ON db_example.* TO 'u_example'@'localhost';
  148. flush privileges;
  149. quit;
  150. --------------------------------------------------------------------------------------------------------------------------
  151. INSTALL WORDPRESS DI VPS LINUX DEBIAN
  152.  
  153. wget https://wordpress.org/latest.tar.gz
  154.  
  155. tar --xf latest.tar.gz
  156.  
  157. rm --f latest.tar.gz
  158.  
  159. mv wordpress example.com
  160.  
  161. mv example.com /var/www/html/
  162.  
  163. chown --R www--data:www--data /var/www/html/example.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement