Nextcloud is an open source personal cloud appliance forked from Owncloud. The new version of Nextcloud 11.0 is now available for download. Here we will show you how to install and configure Nextcloud 11.0 on Arch Linux 2016. The following tutorial has been tested on the Arch Linux installed on our Proxmox environment.
Nextcloud System Requirements and recommendations:
- Red Hat Enterprise Linux 7 / Ubuntu 16.04 LTS
- MySQL/MariaDB
- PHP 7.0 +
- Apache 2.4 with mod_php
Installing Nextcloud on Arch Linux is very easy. You can follow the tutorial below to install Nextcloud on Arch Linux.
Step 1. Install and configure LAMP Stack.
Please visit my previous tutorial to install and configure LAMP (Linux, Apache, Mariadb, PHP) on Arch Linux.
Step 2. Install Additional packages
sudo pacman -S php-gd php-intl php-mcrypt php-apcu ffmpeg
Now open and modify php.ini
sudo nano /etc/php/php.ini
Now find and uncomment the following modules:
extension=gd.so
extension=iconv.so
extension=xmlrpc.so
extension=zip.so
extension=pdo_mysql.so
extension=bz2.so
extension=curl.so
extension=intl.so
extension=mcrypt.so
Now add the following line to open_basedir:
/usr/share/webapps/nextcloud:/dev/urandom
Step 3. Create new MySQL database
We need to create new MySQL database for our Nextcloud. First login to MySQL console with this command:
mysql -u root -p
And then execute the following commands one by one.
CREATE DATABASE IF NOT EXIST ‘nextcloud’;
CREATE USER ‘dhani’@’localhost IDENTIFIED by ‘12345’;
GRANT ALL PRIVILEGES ON nextcloud.* TO ‘dhani’@’localhost’ IDENTIFIED BY ‘12345’;
QUIT;
Please change the corresponding user name and password with your own.
Step 4. Install Nextcloud
sudo pacman -S nextcloud
Step 5. Configure Apache
Its a bit long text to configure Apache. But don’t worry its not hard to do. First we need to copy Nextcloud’s apache config file to Apache config directory
cp /etc/webapps/nextcloud/apache.example.conf /etc/httpd/conf/extra/nextcloud.conf
Edit /etc/httpd/conf/httpd.conf and do the following:
Disable (Comment) the line:
#LoadModule mpm_event_module modules/mod_mpm_event.so
Uncomment the line
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
After LoadModule dir_module modules/mod_dir.so, copy and paste the following module:
LoadModule php7_module modules/libphp7.so
And at the end of the LoadModule list, copy and paste the following line:
AddHandler php7-script php
At the end of the include, copy and paste this line
Include conf/extra/php7_module.conf
At the end of the file, copy and paste this line
Include conf/extra/nextcloud.conf
Also, enable (uncomment) the following modules:
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule env_module modules/mod_env.so
LoadModule dir_module modules/mod_dir.so
LoadModule mime_module modules/mod_mime.so
Now restart Apache web server
sudo systemctl restart httpd.service
Step 6. Configure Nextcloud
Now we will start to configure the Nextcloud via web browser. Open Google Chrome or Firefox and type the server IP address as follow:
http://server-ip-address/nextcloud
Create a new admin user and password. You may change the default data folder if you wish. Also we need to enter the MySQL user and password and also the database name we created on the previous step.
Click Finish Setup to complete the installation. Finally Nextcloud is ready. Thank you for reading this tutorial on how to install Nextcloud on Arch Linux.