How To Setup Nextcloud On My Ubuntu 18.04
Now I want to share how to install nextcloud my own ubuntu 18.04. The nextcloud is an open source platform. This include many features and plugins.
#01. Some dependency installation on your Ubuntu 18.04 server.
$ apt-get install apache2 php7.2 bzip2 -y
$ apt-get install libapache2-mod-php php-gd php-json php-mysql php-curl php-mbstring -y
$ apt-get install php-intl php-imagick php-xml php-zip -y
$ apt-get install mysql-server php-mysql -y
After completed then create mysql root password using below command.
$ mysql_secure_installation
Then press Y for create root password.
#02. Database creation for install nextcloud on ubuntu 18.04
$ > mysql -u root -p
$ > create database nextcloud;
$ > create user ‘nextcloud’@’localhost’ identified by ‘passw0rd’;
$ > grant all privileges on nextcloud.* to ‘nextcloud’@’localhost’;
$ > flush privileges;
$ > exit
$ service mysql restart
#03. Download latest nextcloud from official web link.
$ wget https://download.nextcloud.com/server/prereleases/nextcloud-16.0.4RC1.zip
$ tar xf nextcloud-16-latest.tar.bz2
$ rm -rf /var/www/html/index.html
$ mv nextcloud/* /var/www/html/
$ chown -R www-data:www-data /var/www/html/
$ chmod -R 755 /var/www/html/
$ nano /etc/apache2/sites-available/nextcloud.conf
Insert all below line into nextcloud.conf file.
ServerAdmin [email protected] DocumentRoot /var/www/html/ ServerName nextcloud.biztosnet.lcoal ServerAlias nextcloud Options +FollowSymlinks AllowOverride All Require all granted Dav off SetEnv HOME /var/www/html/ SetEnv HTTP_HOME /var/www/html/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
#04. Setup web server and upload size.
$ a2ensite nextcloud
$ systemctl reload apache2
$ a2enmod rewrite headers env dir mime
$ systemctl restart apache2
$ sed -i ‘/^memory_limit =/s/=.*/= 512M/’ /etc/php/7.2/apache2/php.ini
$ systemctl restart apache2
#05. Create admin account from web gui. So goto your server ip address & input database information.
http://192.168.200.20/
Then see like example below image:
Now type all details below.
Username : admin << This is admin user Password : ******** << This is admin password Data folder : /var/www/html/data << This is data folder Database user : << This is database user name Database password : << This is database password Database name : << This is database name localhost << Must be localhost
After all input complete then click Finish setup. Wait upto you see redirect login page.