masteras

Install OwnCloud 9

Oct 28th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.67 KB | None | 0 0
  1. sudo nano /etc/hosts
  2. +-> 127.0.0.1 HOSTNAME
  3.  
  4. sudo reboot
  5.  
  6. sudo apt-get update
  7. sudo apt-get upgrade
  8.  
  9. sudo groupadd www-data
  10. sudo usermod -a -G www-data www-data
  11.  
  12. sudo apt-get install nginx openssl ssl-cert php5-cli php5-sqlite php5-gd php5-common php5-cgi sqlite3 php-pear php-apc curl libapr1 libtool curl libcurl4-openssl-dev php-xml-parser php5 php5-dev php5-curl php5-gd php5-fpm memcached php5-memcache varnish
  13.  
  14. sudo openssl req $@ -new -x509 -days 730 -nodes -out /etc/nginx/cert.pem -keyout /etc/nginx/cert.key
  15. GR
  16. MESSINIAS
  17. KALAMATA
  18. HOME
  19. IT
  20. 172.16.1.179
  21.  
  22. sudo chmod 600 /etc/nginx/cert.pem
  23. sudo chmod 600 /etc/nginx/cert.key
  24.  
  25. sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default_old
  26.  
  27. sudo nano /etc/nginx/sites-available/default
  28.  
  29. upstream php-handler {
  30. server 127.0.0.1:9000;
  31. #server unix:/var/run/php5-fpm.sock;
  32. }
  33.  
  34. server {
  35. listen 80;
  36. server_name 172.16.1.179;
  37. return 301 https://$server_name$request_uri; # enforce https
  38. }
  39.  
  40. server {
  41. listen 443 ssl;
  42. server_name 172.16.1.179;
  43. ssl_certificate /etc/nginx/cert.pem;
  44. ssl_certificate_key /etc/nginx/cert.key;
  45. # Path to the root of your installation
  46. root /var/www/owncloud;
  47. client_max_body_size 1000M; # set max upload size
  48. fastcgi_buffers 64 4K;
  49. rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
  50. rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
  51. rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
  52. index index.php;
  53. error_page 403 /core/templates/403.php;
  54. error_page 404 /core/templates/404.php;
  55. location = /robots.txt {
  56. allow all;
  57. log_not_found off;
  58. access_log off;
  59. }
  60. location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
  61. deny all;
  62. }
  63. location / {
  64. # The following 2 rules are only needed with webfinger
  65. rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
  66. rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
  67. rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
  68. rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
  69. rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
  70. try_files $uri $uri/ index.php;
  71. }
  72. location ~ \.php(?:$|/) {
  73. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  74. include fastcgi_params;
  75. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  76. fastcgi_param PATH_INFO $fastcgi_path_info;
  77. fastcgi_param HTTPS on;
  78. fastcgi_pass php-handler;
  79. }
  80. # Optional: set long EXPIRES header on static assets
  81. location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
  82. expires 30d;
  83. # Optional: Don't log access to assets
  84. access_log off;
  85. }
  86. }
  87.  
  88. sudo nano /etc/php5/fpm/php.ini
  89. Αλλαγες
  90. -> upload_max_filesize = 2000M
  91. -> post_max_size = 2000M
  92.  
  93.  
  94. sudo nano /etc/php5/fpm/pool.d/www.conf
  95.  
  96. listen = /var/run/php5-fpm.sock
  97. to
  98. listen = 127.0.0.1:9000
  99.  
  100. sudo nano /etc/dphys-swapfile
  101.  
  102. CONF_SWAPSIZE=100
  103. to
  104. CONF_SWAPSIZE=512
  105.  
  106. sudo reboot
  107.  
  108. sudo mkdir -p /var/www/owncloud
  109. sudo wget https://download.owncloud.org/community/owncloud-10.0.3.tar.bz2
  110. sudo tar xvf owncloud-10.0.3.tar.bz2
  111. sudo mv owncloud/ /var/www/
  112. sudo chown -R www-data:www-data /var/www
  113. rm -rf owncloud owncloud-10.0.3.tar.bz2
  114.  
  115. https://172.16.1.179/index.php
  116.  
  117. Mounting and Setting up a drive EXTERNAL
  118.  
  119. sudo apt-get install ntfs-3g
  120. sudo mkdir /media/ownclouddrive
  121. sudo groupadd www-data
  122. sudo usermod -a -G www-data www-data
  123. sudo chown -R www-data:www-data /media/ownclouddrive
  124. sudo chmod -R 775 /media/ownclouddrive
  125.  
  126. id -g www-data
  127. id -u www-data
  128. ls -l /dev/disk/by-uuid
  129.  
  130. sudo nano /etc/fstab
  131. UUID=F21A897F1A894219 /media/ownclouddrive auto nofail,uid=33,gid=33,umask=0027,dmask=0027,noatime 0 0
  132.  
  133. sudo reboot
  134.  
  135. sudo ls /media/ownclouddrive
  136.  
  137. https://172.16.1.179/index.php
  138. Username: ...
  139. Password: ...
  140.  
  141. /media/ownclouddrive
  142.  
  143. Port Forward 443 to local ip & trust Domain
  144.  
  145. sudo nano /var/www/owncloud/config/config.php
  146.  
  147. <?php
  148. $CONFIG = array (
  149. 'instanceid' => 'oc4z35zczv47',
  150. 'passwordsalt' => 'Ce6215RjUM+B/RDLJ66ZNXau64WlBi',
  151. 'secret' => 'iTL/AU9ax5BSibeU8HocVT+iOfzEUDJURMOrjV1TnAHEJtoN',
  152. 'trusted_domains' =>
  153. array (
  154. 0 => '172.16.1.179',
  155. 1 => 'masteras.myds.me',
  156. ),
  157. 'datadirectory' => '/media/ownclouddrive',
  158. 'overwrite.cli.url' => 'https://masteras.myds.me',
  159. 'dbtype' => 'sqlite3',
  160. 'version' => '10.0.3.3',
  161. 'logtimezone' => 'UTC',
  162. 'installed' => true,
  163. );
  164.  
  165.  
  166. sudo service nginx restart
  167.  
  168. WebDAV
  169. https://USER@IPADDRESS/remote.php/webdav
  170.  
  171. https://[email protected]/remote.php/webdav
Add Comment
Please, Sign In to add comment