{"id":797,"date":"2017-10-23T08:16:44","date_gmt":"2017-10-23T08:16:44","guid":{"rendered":"http:\/\/parsvds.com\/wiki\/?p=797"},"modified":"2017-10-23T08:16:44","modified_gmt":"2017-10-23T08:16:44","slug":"how-to-install-nextcloud-on-ubuntu-17-04","status":"publish","type":"post","link":"https:\/\/parsvds.com\/wikitest\/2017\/10\/23\/how-to-install-nextcloud-on-ubuntu-17-04\/","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 \u0646\u0635\u0628 NextCloud \u0628\u0631 \u0631\u0648\u06cc Ubuntu 17.04"},"content":{"rendered":"<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-medium wp-image-1414 aligncenter\" src=\"http:\/\/parsvds.com\/wiki\/wp-content\/uploads\/2017\/10\/Nextcloud-logo-300x235.png\" alt=\"\" width=\"300\" height=\"235\"><\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0642\u0635\u062f \u062f\u0627\u0631\u06cc\u0645 \u0631\u0648\u0634 \u0646\u0635\u0628 \u0628\u0631\u0646\u0627\u0645\u0647&nbsp;<strong>NextCloud&nbsp;<\/strong>\u0631\u0627 \u0622\u0645\u0648\u0632\u0634 \u062f\u0647\u06cc\u0645.<\/p>\n<p>\u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0631\u0627\u06cc \u0648\u0628 \u0633\u0631\u0648\u0631 \u0647\u0627&nbsp; \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f \u0648 \u0628\u0627\u0639\u062b \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0648 \u0646\u0635\u0628 \u0633\u0627\u062f\u0647 \u062a\u0631\u0647 \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647 SSL \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<p>\u0622\u0645\u0648\u0632\u0634 \u0628\u0631 \u0627\u0633\u0627\u0633&nbsp;<strong>NextCloud 12&nbsp;<\/strong>\u0622\u0645\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a \u0648\u0644\u06cc \u0628\u0631\u0627\u06cc \u0646\u0633\u062e\u0647 \u0647\u0627\u06cc \u0628\u0627\u0644\u0627 \u062a\u0631 \u0646\u06cc\u0632 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0628\u0627\u0634\u062f.<\/p>\n<p>\u0642\u0628\u0644 \u0627\u0632 \u0647\u0631 \u06a9\u0627\u0631\u06cc \u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f \u0633\u0631\u0648\u0631 \u0634\u0645\u0627 \u0622\u067e\u062f\u06cc\u062a \u0634\u062f\u0647 \u0627\u0633\u062a \u0648 PHP 7.1 \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0646\u0635\u0628 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/p>\n<pre><code>apt-get update\napt-get upgrade -y\napt-get install software-properties-common unzip\n<\/code><\/pre>\n<h3>PHP 7.1<\/h3>\n<p>\u0646\u0635\u0628 \u0648 \u06a9\u0627\u0646\u0641\u06cc\u06af PHP 7.1.<\/p>\n<pre><code>apt-get install -y python-software-properties\nadd-apt-repository -y ppa:ondrej\/php\napt-get update -y\napt-get install -y php7.1 php7.1-fpm php7.1-cli php7.1-json php7.1-curl php7.1-imap php7.1-gd php7.1-mysql php7.1-xml php7.1-zip php7.1-intl php7.1-mcrypt php-imagick php7.1-mbstring\n<\/code><\/pre>\n<p>\u0634\u0645\u0627 \u0645\u06cc \u0628\u0627\u06cc\u0633\u062a \u0641\u0627\u06cc\u0644&nbsp;<code>\/etc\/php\/7.1\/fpm\/pool.d\/www.conf<\/code>&nbsp;\u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0648\u06cc\u0631\u0627\u06cc\u0634 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre><code>;listen = \/run\/php\/php7.1-fpm.sock\nlisten = 127.0.0.1:9000\n<\/code><\/pre>\n<p>\u0627\u06a9\u0646\u0648\u0646 PHP7.1-fpm \u0631\u0627\u0631\u06cc\u0633\u062a \u06a9\u0646\u06cc\u062f.<\/p>\n<pre><code>service php7.1-fpm restart\n<\/code><\/pre>\n<h3>Caddy<\/h3>\n<p>\u0645\u0631\u062d\u0644\u0647 \u0628\u0639\u062f \u0645\u06cc \u0628\u0627\u06cc\u0633\u062a Caddy \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u0645<\/p>\n<p>Caddy \u0628\u0647 \u0635\u0648\u0631\u062a \u062e\u0648\u062f\u06a9\u0627\u0631 \u0645\u0639\u0645\u0627\u0631\u06cc \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u0631\u0627 \u062a\u0634\u062e\u06cc\u0635 \u0645\u06cc \u062f\u0647\u062f \u06a9\u0647 \u0627\u0632 32-bit \u06cc\u0627 64-bit \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/p>\n<pre><code>curl https:\/\/getcaddy.com | bash\n<\/code><\/pre>\n<p>\u067e\u0648\u0634\u0647 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u0628\u0633\u0627\u0632\u06cc\u062f<\/p>\n<pre><code>mkdir -p \/var\/www\/nextcloud\n<\/code><\/pre>\n<p>\u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre><code>mkdir -p \/etc\/caddy\nnano \/etc\/caddy\/Caddyfile\n<\/code><\/pre>\n<p>\u062f\u0631 \u0641\u0627\u06cc\u0644 \u062c\u062f\u06cc\u062f \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre><code>your-domain-here.com {\n\nroot   \/var\/www\/nextcloud\nlog    \/var\/log\/nextcloud_access.log\nerrors \/var\/log\/nextcloud_errors.log\n\nfastcgi \/ 127.0.0.1:9000 php {\n    env PATH \/bin\n}\n\nrewrite {\n    r ^\/index.php\/.*$\n    to \/index.php?{query}\n}\n\n# client support (e.g. os x calendar \/ contacts)\nredir \/.well-known\/carddav \/remote.php\/carddav 301\nredir \/.well-known\/caldav \/remote.php\/caldav 301\n\n# remove trailing \/ as it causes errors with php-fpm\nrewrite {\n    r ^\/remote.php\/(webdav|caldav|carddav|dav)(\\\/?)$\n    to \/remote.php\/{1}\n}\n\nrewrite {\n    r ^\/remote.php\/(webdav|caldav|carddav|dav)\/(.+?)(\\\/?)$\n    to \/remote.php\/{1}\/{2}\n}\n\nrewrite {\n    r ^\/public.php\/(.+?)(\\\/?)$\n    to \/public.php\/(.+?)(\\\/?)$\n}\n\n# .htaccess \/ data \/ config \/ ... shouldn't be accessible from outside\nstatus 403 {\n    \/.htacces\n    \/data\n    \/config\n    \/db_structure\n    \/.xml\n    \/README\n}\n\nheader \/ Strict-Transport-Security \"max-age=31536000;\"\n\n}\n<\/code><\/pre>\n<p>\u0627\u06cc\u0646 \u0641\u0627\u06cc\u0644 \u0631\u0627 \u0648\u06cc\u0631\u0627\u06cc\u0634 \u06a9\u0646\u06cc\u062f \u0648 \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f&nbsp;<code>\/etc\/systemd\/system\/caddy.service<\/code>.<\/p>\n<pre><code>[Unit]\nDescription=Caddy HTTP\/2 web server %I\nDocumentation=https:\/\/caddyserver.com\/docs\nAfter=network-online.target\nWants=network-online.target\nWants=systemd-networkd-wait-online.service\n\n[Service]\n; run user and group for caddy\nUser=root\nGroup=root\nExecStart=\/usr\/local\/bin\/caddy -agree=true -conf=\/etc\/caddy\/Caddyfile\nRestart=on-failure\n\n; create a private temp folder that is not shared with other processes\nPrivateTmp=true\n\n; limit the number of file descriptors, see `man systemd.exec` for more limit settings\nLimitNOFILE=8192\n\n[Install]\nWantedBy=multi-user.target\n<\/code><\/pre>\n<p>Caddy \u0631\u0627 \u0641\u0639\u0627\u0644 \u0648 \u0633\u0631.\u06cc\u0633 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a startup \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre><code>systemctl enable caddy.service\nsystemctl start caddy.service\n<\/code><\/pre>\n<h3>MariaDB<\/h3>\n<p>\u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u0628\u0639\u062f \u06cc\u06a9 \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628&nbsp;NextCloud \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u06cc\u062f<\/p>\n<p><strong>\u062a\u0648\u062c\u0647<\/strong>: \u067e\u0633\u0648\u0631 \u0631\u0627 \u062f\u0631 \u0647\u0646\u06af\u0627\u0645 \u0646\u0635\u0628 \u0630\u062e\u06cc\u0631\u0647 \u0648 \u0628\u0647 \u06cc\u0627\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f!<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0646\u0635\u0628&nbsp;MariaDB \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre><code>apt-key adv --recv-keys --keyserver hkp:\/\/keyserver.ubuntu.com:80 0xF1656F24C74CD1D8\nadd-apt-repository 'deb [arch=amd64,i386] http:\/\/ftp.utexas.edu\/mariadb\/repo\/10.2\/ubuntu zesty main'\napt update\napt install mariadb-server -y\n<\/code><\/pre>\n<p>\u0628\u0627 \u0646\u0635\u0628 \u0634\u062f\u0646&nbsp;MariaDB \u0645\u0627 \u0628\u0627\u06cc\u062f \u06cc\u06a9 \u06cc\u0648\u0632\u0631 \u0648 \u06cc\u06a9 \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 NextCloud&nbsp; \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u0645.<\/p>\n<p>\u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<pre><code>mysql -u root -p\nCREATE DATABASE nextcloud;\nGRANT ALL PRIVILEGES ON nextcloud.* TO 'exampleUser'@'localhost' IDENTIFIED BY 'securepassword';\nFLUSH PRIVILEGES;\nexit\n<\/code><\/pre>\n<h3>NextCloud<\/h3>\n<p>\u0628\u0627 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0645\u062d\u0644 \u0627\u0635\u0644\u06cc \u0646\u0635\u0628 \u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<pre><code>cd \/var\/www\/nextcloud\nwget https:\/\/download.nextcloud.com\/server\/releases\/nextcloud-12.0.0.zip\nunzip nextcloud-*\nmv nextcloud\/* .\nchown -R www-data:www-data \/var\/www\/nextcloud\nrm -rf nextcloud-*.zip\n<\/code><\/pre>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u062f\u0627\u0645\u06cc\u0646 \u0648 \u06cc\u0627 \u0622\u06cc \u067e\u06cc \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0645\u0631\u0648\u0631\u06af\u0631 \u062e\u0648\u062f \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u0645\u0631\u062d\u0644\u0647 \u0646\u0635\u0628&nbsp;NextCloud \u0631\u0641\u062a\u0647 \u0648 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0648\u0628 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f.<\/p>\n<p><\/p>\n\n\n<p class=\"success\">\u067e\u0627\u0631\u0633 \u0648\u06cc \u062f\u06cc \u0627\u0633 \u0627\u0631\u0627\u0626\u0647 \u062f\u0647\u0646\u062f\u0647 \u06cc \u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc \u0627\u0632 39 \u06a9\u0634\u0648\u0631 <br><a href=\"https:\/\/parsvds.com\/virtual-server\/iran-ssd\">\u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc \u0627\u06cc\u0631\u0627\u0646<\/a> \u060c <a href=\"https:\/\/parsvds.com\/virtual-server\/france-pro\/\">\u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc \u0641\u0631\u0627\u0646\u0633\u0647<\/a> \u060c <a href=\"https:\/\/parsvds.com\/virtual-server\/america\/\">\u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc \u0622\u0645\u0631\u06cc\u06a9\u0627<\/a> \u0648 <a href=\"https:\/\/parsvds.com\/virtual-server\/all-locations\/\">39 \u06a9\u0634\u0648\u0631 \u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0642\u0635\u062f \u062f\u0627\u0631\u06cc\u0645 \u0631\u0648\u0634 \u0646\u0635\u0628 \u0628\u0631\u0646\u0627\u0645\u0647&nbsp;NextCloud&nbsp;\u0631\u0627 \u0622\u0645\u0648\u0632\u0634 \u062f\u0647\u06cc\u0645. \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0631\u0627\u06cc \u0648\u0628 \u0633\u0631\u0648\u0631 \u0647\u0627&nbsp; \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f \u0648 \u0628\u0627\u0639\u062b \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0648 \u0646\u0635\u0628 \u0633\u0627\u062f\u0647 \u062a\u0631\u0647 \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647 SSL \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0645\u06cc \u0634\u0648\u062f. \u0622\u0645\u0648\u0632\u0634 \u0628\u0631 \u0627\u0633\u0627\u0633&nbsp;NextCloud 12&nbsp;\u0622\u0645\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a \u0648\u0644\u06cc \u0628\u0631\u0627\u06cc \u0646\u0633\u062e\u0647 \u0647\u0627\u06cc \u0628\u0627\u0644\u0627 \u062a\u0631 \u0646\u06cc\u0632 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0628\u0627\u0634\u062f. \u0642\u0628\u0644 \u0627\u0632 \u0647\u0631 \u06a9\u0627\u0631\u06cc \u0645\u0637\u0645\u0626\u0646 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":3621,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[9,18,21],"tags":[311,312,528],"class_list":["post-797","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","category-server-apps","category-linux-guides","tag-nextcloud---ubuntu","tag-nextcloud-","tag---nextcloud"],"uagb_featured_image_src":{"full":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/10\/Nextcloud_Logo.svg_-1.jpg",420,236,false],"thumbnail":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/10\/Nextcloud_Logo.svg_-1-150x150.jpg",150,150,true],"medium":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/10\/Nextcloud_Logo.svg_-1-300x169.jpg",300,169,true],"medium_large":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/10\/Nextcloud_Logo.svg_-1.jpg",420,236,false],"large":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/10\/Nextcloud_Logo.svg_-1.jpg",420,236,false],"1536x1536":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/10\/Nextcloud_Logo.svg_-1.jpg",420,236,false],"2048x2048":["https:\/\/parsvds.com\/wikitest\/wp-content\/uploads\/2017\/10\/Nextcloud_Logo.svg_-1.jpg",420,236,false]},"uagb_author_info":{"display_name":"\u0645\u06cc\u062b\u0645 \u062f\u0631\u06cc\u06a9\u0648\u0646\u062f","author_link":"https:\/\/parsvds.com\/wikitest\/author\/amindk\/"},"uagb_comment_info":6,"uagb_excerpt":"\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0642\u0635\u062f \u062f\u0627\u0631\u06cc\u0645 \u0631\u0648\u0634 \u0646\u0635\u0628 \u0628\u0631\u0646\u0627\u0645\u0647&nbsp;NextCloud&nbsp;\u0631\u0627 \u0622\u0645\u0648\u0632\u0634 \u062f\u0647\u06cc\u0645. \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0631\u0627\u06cc \u0648\u0628 \u0633\u0631\u0648\u0631 \u0647\u0627&nbsp; \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f \u0648 \u0628\u0627\u0639\u062b \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0648 \u0646\u0635\u0628 \u0633\u0627\u062f\u0647 \u062a\u0631\u0647 \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647 SSL \u0628\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0645\u06cc \u0634\u0648\u062f. \u0622\u0645\u0648\u0632\u0634 \u0628\u0631 \u0627\u0633\u0627\u0633&nbsp;NextCloud 12&nbsp;\u0622\u0645\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a \u0648\u0644\u06cc \u0628\u0631\u0627\u06cc \u0646\u0633\u062e\u0647 \u0647\u0627\u06cc \u0628\u0627\u0644\u0627 \u062a\u0631 \u0646\u06cc\u0632 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0628\u0627\u0634\u062f. \u0642\u0628\u0644 \u0627\u0632 \u0647\u0631 \u06a9\u0627\u0631\u06cc \u0645\u0637\u0645\u0626\u0646&hellip;","_links":{"self":[{"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/posts\/797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/comments?post=797"}],"version-history":[{"count":0,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/posts\/797\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/media\/3621"}],"wp:attachment":[{"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/media?parent=797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/categories?post=797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/parsvds.com\/wikitest\/wp-json\/wp\/v2\/tags?post=797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}