This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| virtualisation:nextcloud [2018/02/27 14:40] – buettner | virtualisation:nextcloud [2018/03/01 09:19] (current) – buettner | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====How to setup Nextcloud on a NB2800 router==== | + | ======How to setup Nextcloud on a NB2800 router====== |
| This article describes how to setup a Nextcloud server on your NB2800 router. | This article describes how to setup a Nextcloud server on your NB2800 router. | ||
| - | [[https:// | + | [[https:// |
| ===Preparations=== | ===Preparations=== | ||
| - | |||
| - | All basic preparations made are described in this article: [[http:// | ||
| If you need instructions on how to set up a LXC Container on NB2800 Routers, you can refer to this page: http:// | If you need instructions on how to set up a LXC Container on NB2800 Routers, you can refer to this page: http:// | ||
| + | |||
| + | The first step you should take is to give your router a static IP adress. For this, use | ||
| + | < | ||
| + | nano / | ||
| + | </ | ||
| + | and set up a static IP configuration for your primary interface. In this example, the configuration for the eth0 interface looks like this: | ||
| + | < | ||
| + | auto eth0 | ||
| + | iface eth0 inet static | ||
| + | address 192.168.1.50 | ||
| + | netmask 255.255.255.0 | ||
| + | network 192.168.1.0 | ||
| + | broadcast 192.168.1.255 | ||
| + | gateway 192.168.1.105 | ||
| + | dns-nameservers 192.168.1.105 | ||
| + | </ | ||
| + | |||
| + | After that, use | ||
| + | < | ||
| + | apt-get update | ||
| + | apt-get upgrade | ||
| + | </ | ||
| + | to bring your system up to date. | ||
| + | |||
| + | If your network setup doesn' | ||
| + | |||
| + | For this, get access to the routers web interface and go to Services -> DNS Server. Under " | ||
| + | |||
| + | Now enter the IP address and the domain name you want it linked to and click " | ||
| + | {{ : | ||
| + | |||
| + | |||
| + | After this, your configuration should look like this: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Now you can access the file server with both its IP address a its local domain name. | ||
| + | |||
| ===Installations=== | ===Installations=== | ||
| - | Before Nextcloud can be installed, | + | Before Nextcloud can be installed, |
| < | < | ||
| + | apt-get update | ||
| apt-get install nginx mariadb-client mariadb-server php7.0-common php7.0-fpm php7.0-cli php7.0-json php7.0-mysql php7.0-curl php7.0-intl php7.0-mcrypt php-pear php7.0-gd php7.0-zip php7.0-xml php7.0-mbstring php7.0-apcu | apt-get install nginx mariadb-client mariadb-server php7.0-common php7.0-fpm php7.0-cli php7.0-json php7.0-mysql php7.0-curl php7.0-intl php7.0-mcrypt php-pear php7.0-gd php7.0-zip php7.0-xml php7.0-mbstring php7.0-apcu | ||
| </ | </ | ||
| Line 25: | Line 62: | ||
| ===Configuring PHP=== | ===Configuring PHP=== | ||
| - | For setting up PHP, several values in three files have to be edited. First, go to / | + | For setting up PHP, several values in three files have to be edited. First, go to / |
| <code c / | <code c / | ||
| user = www-data | user = www-data | ||
| Line 63: | Line 100: | ||
| ===Configuring MariaDB=== | ===Configuring MariaDB=== | ||
| - | First, you have to finish the MariDB | + | First, you have to finish the MariaDB |
| < | < | ||
| mysql_secure_installation | mysql_secure_installation | ||
| Line 73: | Line 110: | ||
| service mysql restart | service mysql restart | ||
| </ | </ | ||
| - | Now you have to create a new MariaDB user which is only needed for Nextcloud access. To enter the MariaDB | + | Now you have to create a new MariaDB |
| < | < | ||
| mysql -u root -p | mysql -u root -p | ||
| Line 81: | Line 118: | ||
| create database nextcloud_db; | create database nextcloud_db; | ||
| </ | </ | ||
| - | Now create a new MariaDB-user with a password which can access the " | + | Now create a new MariaDB user with a password which can access the " |
| < | < | ||
| create user ' | create user ' | ||
| Line 87: | Line 124: | ||
| Note that you have to enter your own credentials for ' | Note that you have to enter your own credentials for ' | ||
| - | Now all necessary | + | Now all necessary |
| < | < | ||
| grant all privileges on nextcloud_db.* to ' | grant all privileges on nextcloud_db.* to ' | ||
| Line 114: | Line 151: | ||
| First, go to / | First, go to / | ||
| <code c / | <code c / | ||
| - | überprüfen ob user = www-data | + | user = www-data |
| - | überprüfen ob worker_process = auto | + | worker_process = auto |
| - | in html-Block: | + | server_tokens off |
| </ | </ | ||
| Line 270: | Line 307: | ||
| nginx -t | nginx -t | ||
| </ | </ | ||
| + | |||
| + | < | ||
| + | root@LXC_MEDIA:/# | ||
| + | nginx: the configuration file / | ||
| + | nginx: configuration file / | ||
| + | </ | ||
| If no error occurs, restart Nginx with | If no error occurs, restart Nginx with | ||
| Line 279: | Line 322: | ||
| ===Nextcloud Download and Installation=== | ===Nextcloud Download and Installation=== | ||
| - | First, download the Nextcloud installation file from the Nextcloud homepage. Before downloading the file, you should visit the [[https:// | + | First, download the Nextcloud installation file from the Nextcloud homepage. Before downloading the file, you should visit the [[https:// |
| < | < | ||
| wget https:// | wget https:// | ||
| + | </ | ||
| + | After the download finished, extract the file to its directory: | ||
| + | < | ||
| + | tar -xjf nextcloud-13.0.0.tar.bz2 -C /var/www | ||
| + | </ | ||
| + | If you want to, you can now delete the installation file: | ||
| + | < | ||
| + | rm nextcloud-13.0.0.tar.bz2 | ||
| + | </ | ||
| + | Now you have to set the correct user and group to the Nextcloud folder: | ||
| + | < | ||
| + | chown -R www-data: | ||
| </ | </ | ||
| + | Now open your web browser and go to http:// | ||
| + | |||
| + | Here you have to set credentials for an administrator and enter the MariaDB user credentials you set earlier. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | |||
| + | ===Configuration Nextcloud=== | ||
| + | |||
| + | After Nextcloud was installed succesfully, | ||
| + | <code c / | ||
| + | ' | ||
| + | ' | ||
| + | array ( | ||
| + | 0 => ' | ||
| + | 1 => ' | ||
| + | ), | ||
| + | ' | ||
| + | ' | ||
| + | </ | ||