banner



How To Install Nextcloud On Windows

This brief tutorial shows students and new users how to install Nextcloud with Apache on Windows 10 WSL (Windows Subsystem for Linux) 2 with Ubuntu OS.

Nextcloud is a true open source, self-hosted file syncing and sharing platform similar to Dropbox, OneDrive and Google Drive. It lets you create your ain cloud in your ain environment with your ain servers.

At present that yous tin install Linux OS within Windows via WSL, the steps beneath prove y'all how to install Nextcloud in Windows with Windows Subsystem for Linux (WSL).

With WSL, you tin can install and run full Linux operating arrangement inside Windows. So get Windows, enable WSL, install a Linux OS and run Nextcloud.

Dorsum in 2017, Windows released the original WSL version. WSL 2 is an comeback over version one and comes with performance boost, full arrangement call compatibility, and congenital with a new architecture and that delivers features that brand WSL an amazing way to run a Linux environment in Windows.

If you have a motorcar that meets the requirements above to run WSL 2, then continue below.

To get started with running Nextcloud on Windows with WSL, follow the steps below:

Enable WSL in Windows

To enable WSL in Windows, you volition desire to open up PowerShell terminal as administrator. Click on Starting time then begin typing PowerShell.

Adjacent, right-click Windows PowerShell app and cull to run equally ambassador.

powershell administrator

When the console opens, run the commands below:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

After installing, you should get a success message similar to the lines below:

Deployment Epitome Servicing and Management tool Version: 10.0.19041.844  Image Version: 10.0.19042.844  Enabling feature(s) [==========================100.0%==========================] The operation completed successfully.

Enable Virtual Machine Platform

WSL two requires Windows 10 Virtual Machine Platform to be enabled. This is not Hyper-V. To enable the VM platform feature in Windows, run the commands below from the same PowerShell ambassador's console.

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

If you're using Windows 10 version lower than 2004, and so use the commands beneath:

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart

When y'all're done running the commands above, restart your computer for all the configuration changes to apply. If you don't restart, the below control might not be recognized.

Later on restarting your computer, login back in and launch PowerShell as ambassador. Then run the commands below to configure WSL 2 equally the default version of WSL.

wsl --fix-default-version two

Install Ubuntu in Windows ten

Now that WSL ii is installed and set up to exist used, open the link below to download and install a re-create of Ubuntu twenty.04 from Windows store.

Go Ubuntu 20.04 LTS – Microsoft Store

Ubuntu twenty.04 LTS on Windows allows you to use Ubuntu Last and run Ubuntu control line utilities including fustigate, ssh, git, apt and many more.

ubuntu windows wls install

Click the Get button and install. After installing Ubuntu, you'll want the option to launch Ubuntu from Windows WSL environs.

After launching Ubuntu, information technology should install and prompt to create your account.

Installing, this may have a few minutes. Please create a default UNIX user account. The username does non need to match your Windows username. For more than information visit: https://aka.ms/wslusers Enter new UNIX username:          richard          New password: Retype new password: passwd: password updated successfully Installation successful! To run a command equally administrator (user "root"), employ "sudo <control>". See "human sudo_root" for details.  Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 4.iv.0-19041-Microsoft x86_64)   * Documentation:  https://assistance.ubuntu.com  * Management:     https://landscape.canonical.com  * Support:        https://ubuntu.com/advantage    System data every bit of Monday Apr 12 17:57:37 CDT 2021    System load:    0.52      Processes:             7   Usage of /dwelling house: unknown   Users logged in:       0   Memory usage:   26%       IPv4 address for eth0: 10.0.2.15   Swap usage:     0%  1 update can be installed immediately. 0 of these updates are security updates. To see these boosted updates run: apt listing --upgradable

That should do information technology!

Some troubleshooting commands to run when you meet issues above. These run below and try to launch Ubuntu image again.

wsl --set-default-version 1 bcdedit /fix hypervisorlaunchtype auto start

Now that Windows 10 WSL surroundings is fix, continue below to install Apache, MariaDB, PHP and configure Nextcloud to run.

Install Apache HTTP Server

Apache is the most popular open up source web server powering majority of the websites online. Since Nextcloud needs it, use the commands below to install it on Ubuntu.

To install Apache on Ubuntu, run the commands below:

sudo apt update sudo apt install apache2

After installing Apache2, the commands below can be used to end, outset and restart Apache2 services.

sudo service apache2          stop          sudo service apache2          outset          sudo service apache2          restart        

To validate that Apache is installed and performance, open your web browser and scan to the server'south hostname or IP accost.

You lot should get a test folio if every works.

http://localhost

lamp windows wsl ubuntu

Install MariaDB Database Server

For this tutorial, we're going to be installing MariaDB. Nextcloud needs a database server to shop its content.

MariaDB is a truthful open up source database server you tin can run with your projects. It is fast, secure and the default server for almost all Linux.

To install MariaDB, run the commands beneath:

sudo apt-get install mariadb-server mariadb-client

Later installing MariaDB, the commands below can be used to stop, start and restart MariaDB services.

sudo service mysql          terminate          sudo service mysql          start          sudo service mysql          restart        

Adjacent, run the commands below to secure the database server with a root countersign if you were not prompted to do so during the installation.

sudo mysql_secure_installation

When prompted, answer the questions below past post-obit the guide.

  • Enter current password for root (enter for none): Just press theEnter
  • Set root countersign? [Y/northward]:Y
  • New password:Enter password
  • Re-enter new password: Echo countersign
  • Remove anonymous users? [Y/due north]: Y
  • Disallow root login remotely? [Y/n]: Y
  • Remove test database and access to it? [Y/north]:Y
  • Reload privilege tables now? [Y/n]:Y

To verify and validate that MariaDB is installed and working, login to the database console using the commands beneath:

sudo mysql -u root -p

Type the root password when prompted.

Welcome to the MariaDB monitor.  Commands end with ; or \k. Your MariaDB connection id is 46 Server version:          ten.three.29-MariaDB-0ubuntu0.xx.04.1 Ubuntu twenty.04 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Blazon 'assist;' or '\h' for help. Type '\c' to clear the electric current input statement. MariaDB [(none)]>

If you lot encounter a similar screen as shown above, then the server was successfully installed.

PHP and Related Modules

PHP is a general-purpose scripting language the glues all the higher up components together. Nextcloud is a PHP application and requires PHP and related modules to office.

To install PHP and recommended modules, run the commands below.

sudo apt install php libapache2-modernistic-php php-imagick php-imap php-json php-ldap php-mutual php-pgsql php-ssh2 php-sqlite3 php-xml php-mysql php-gmp php-curl php-intl php7.iv-mbstring php-xmlrpc php-gd php-xml php-cli php-zip

That should get PHP installed with recommended PHP modules that you can run with many PHP based applications.

To validate that PHP is installed, run the commands below:

php -v

You should see an output like the one below:

PHP 7.4.iii (cli) (built: October  6 2020 15:47:56) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.3, Copyright (c), past Zend Technologies

Y'all can also test with a test php script and displays installed version too as related modules that are enabled or disabled.

To do that, run the commands below to create a php exam file called phpinfo.php

sudo nano /var/www/html/phpinfo.php

Then type the content below and save the file.

<?php phpinfo( ); ?>

Save the file.

Open your browser and browse to your server hostname followed by phpinfo.php

Restart Apache, then blazon the accost and browse to the file.

http://example.com/phpinfo.php

You lot should encounter PHP default exam folio.

lamp windows wsl php test

At this phase, all required components that Nextcloud needs are installed above. Go along below to downloading and configuring Nextcloud settings.

Create Nextcloud Database

Now that you lot've installed all the packages that are required for Nextcloud to function, continue beneath to start configuring the servers. Get-go run the commands below to create a blank Nextcloud database.

To logon to MariaDB database server, run the commands below.

sudo mysql -u root -p

Then create a database called nextcloud

CREATE DATABASE          nextcloud;

Create a database user called nextclouduser with new countersign

CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'new_password_here';

Then grant the user full access to the database.

GRANT ALL ON          nextcloud.* TO 'nextclouduser'@'localhost' WITH GRANT Choice;

Finally, save your changes and get out.

Flush PRIVILEGES; EXIT;

Download Nextcloud

Next, become and download the latest version of Nextcloud.

At the fourth dimension of writing this article, the latest stable version of Nextcloud is version 21.0.2. Make sure to visit the Nextcloud download folio and bank check if there is a new version of Nextcloud available.

wget https://download.nextcloud.com/server/releases/nextcloud-21.0.2.zip -P /tmp sudo unzip /tmp/nextcloud-21.0.2.nada  -d /var/www

Then run the commands below to set the correct permissions for Nextcloud to function.

sudo chown -R www-data:www-data /var/www/nextcloud/ sudo chmod -R 755 /var/world wide web/nextcloud/

Configure Nextcloud Site

Finally, configure Apahce2 site configuration file for Nextcloud. This file will control how users access Nextcloudcontent. Run the commands below to create a new configuration file called nextcloud.conf

sudo nano /etc/apache2/sites-available/nextcloud.conf

Then re-create and paste the content below into the file and salvage it. Supplant the highlighted line with your own domain name and directory root location.

<VirtualHost *:80>      ServerAdmin admin@example.com      DocumentRoot /var/world wide web/nextcloud/      ServerName          example.com          ServerAlias          www.example.com          Alias /nextcloud "/var/www/nextcloud/"       <Directory /var/www/nextcloud/>         Options +FollowSymlinks         AllowOverride All         Require all granted           <IfModule mod_dav.c>             Dav off           </IfModule>         SetEnv Habitation /var/www/nextcloud         SetEnv HTTP_HOME /var/www/nextcloud      </Directory>       ErrorLog ${APACHE_LOG_DIR}/fault.log      CustomLog ${APACHE_LOG_DIR}/access.log combined  </VirtualHost>

Save the file and exit.

After configuring the VirtualHost higher up, enable it past running the commands below, including other modules.

sudo a2ensite nextcloud.conf sudo a2enmod rewrite sudo a2enmod headers sudo a2enmod env sudo a2enmod dir sudo a2enmod mime

When yous're done, restart Apache

sudo service apache2 restart

Now browse to the server hostname or IP address and begin setting up Nextcloud platform.

http://example.com

Create an admin business relationship, enter the database details and finish the installation.

nextcloud windows wsl ubuntu apache

Login with the account you create above and start building your surround.

nextcloud windows wsl ubuntu dashboard

Conclusion:

This post showed you lot how to install Nextcloud in Windows WSL. If you observe any mistake higher up, please use the comment form below to report.

How To Install Nextcloud On Windows,

Source: https://websiteforstudents.com/how-to-install-nextcloud-on-windows-wsl/

Posted by: carleyhather.blogspot.com

0 Response to "How To Install Nextcloud On Windows"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel