<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nextcloud Archives - IT-Tutorial</title>
	<atom:link href="https://it-tutorial.info/tag/nextcloud/feed/" rel="self" type="application/rss+xml" />
	<link>https://it-tutorial.info/tag/nextcloud/</link>
	<description>For educational purpose only</description>
	<lastBuildDate>Mon, 06 May 2024 09:23:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">172715145</site>	<item>
		<title>Install NextCloud Server Using Composer On Ubuntu 16.04 &#124; 18.04 With Apache2, MariaDB And PHP 7.2 Support</title>
		<link>https://it-tutorial.info/install-nextcloud-server-using-composer-on-ubuntu-16-04-18-04-with-apache2-mariadb-and-php-7-2-support/</link>
					<comments>https://it-tutorial.info/install-nextcloud-server-using-composer-on-ubuntu-16-04-18-04-with-apache2-mariadb-and-php-7-2-support/#comments</comments>
		
		<dc:creator><![CDATA[Ryan123]]></dc:creator>
		<pubDate>Sun, 19 Jan 2020 21:49:08 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Install Nextcloud]]></category>
		<category><![CDATA[Nextcloud]]></category>
		<category><![CDATA[Nextcloud 17]]></category>
		<guid isPermaLink="false">https://ittutorial15414000.wordpress.com/?p=104</guid>

					<description><![CDATA[<p>New users looking for help installing the latest version of NextCloud Server (17) from Github using Composer with Apache2, MariaDB and PHP 7.2 support, the steps below should be a great place to start… When you use Composer to install NextCloud packages, you can easily upgrade from the commmand line with Composer, which is much [&#8230;]</p>
<p>The post <a href="https://it-tutorial.info/install-nextcloud-server-using-composer-on-ubuntu-16-04-18-04-with-apache2-mariadb-and-php-7-2-support/">Install NextCloud Server Using Composer On Ubuntu 16.04 | 18.04 With Apache2, MariaDB And PHP 7.2 Support</a> appeared first on <a href="https://it-tutorial.info">IT-Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>New users looking for help installing the latest version of NextCloud Server (17) from Github using Composer with Apache2, MariaDB and PHP 7.2 support, the steps below should be a great place to start…</p>



<p>When you use Composer to install NextCloud packages, you can easily upgrade from the commmand line with Composer, which is much simpler…</p>



<p>To upgrade NextCloud, you must manually upgrade its core files and other packages when new versions are available…. and doing that using its starndard method can be challenging for some users…</p>



<p>This brief tutorial is going to show students and new users how to install / upgrade NextCloud from Github repository via Composer with Apache2, MariaDB and PHP 7.2 support on Ubuntu 16.04 | 18.04 LTS servers…</p>



<p>To get started with installing NextCloud, follow the steps below:</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h4 class="wp-block-heading">S<strong>tep <em>1: Install Apache2 HTTP Server on Ubuntu</em></strong>.</h4>



<p>Apache2 HTTP Server is the most popular web server in use… so install it since NextCloud needs it..</p>



<p>To install Apache2 HTTP on Ubuntu server, run the commands below…</p>



<pre class="wp-block-code"><code>sudo apt update
sudo apt install apache2</code></pre>



<p>After installing Apache2, the commands below can be used to stop, start and enable Apache2 service to always start up with the server boots.</p>



<pre class="wp-block-code"><code>sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service</code></pre>



<p>To test Apache2 setup, open your browser and browse to the server hostname or IP address and you should see Apache2 default test page as shown below.. When you see that, then Apache2 is working as expected..</p>



<p>http://localhost or use the ip addres of your ubuntu server. </p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/websiteforstudents.com/wp-content/uploads/2017/10/xapache2_ubuntu_install.png.pagespeed.ic.3gbPoGm-IF.webp?w=640&#038;ssl=1" alt="apache2 ubuntu install"/></figure>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h4 class="wp-block-heading">Step 2: Install MariaDB Database Server</h4>



<p>MariaDB database server is a great place to start when looking at open source database servers to use with Magento… To install MariaDB run the commands below…</p>



<pre class="wp-block-code"><code>sudo apt-get install mariadb-server mariadb-client</code></pre>



<p>After installing MariaDB, the commands below can be used to stop, start and enable MariaDB service to always start up when the server boots..</p>



<p><strong>Run these on Ubuntu&nbsp;16.04&nbsp;LTS</strong></p>



<pre class="wp-block-code"><code>sudo systemctl stop mysql.service
sudo systemctl start mysql.service
sudo systemctl enable mysql.service</code></pre>



<p><strong>Run these on Ubuntu&nbsp;18.04&nbsp;and&nbsp;18.10&nbsp;LTS</strong></p>



<pre class="wp-block-code"><code>sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service</code></pre>



<p>After that, run the commands below to secure MariaDB server by creating a root password and disallowing remote root access.</p>



<pre class="wp-block-code"><code>sudo mysql_secure_installation</code></pre>



<p>When prompted, answer the questions below by following the guide.</p>



<ul class="wp-block-list">
<li>Enter current password for root (enter for none): Just press the Enter</li>



<li>Set root password? [Y/n]: Y</li>



<li>New password: Enter password</li>



<li>Re-enter new password: Repeat password</li>



<li>Remove anonymous users? [Y/n]: Y</li>



<li>Disallow root login remotely? [Y/n]: Y</li>



<li>Remove test database and access to it? [Y/n]:  Y</li>



<li>Reload privilege tables now? [Y/n]:  Y</li>
</ul>



<p>Restart MariaDB server</p>



<p>To test if MariaDB is installed, type the commands below to logon to MariaDB server</p>



<pre class="wp-block-code"><code>sudo mysql -u root -p</code></pre>



<p>Then type the password you created above to sign on… if successful, you should see MariaDB welcome message</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/websiteforstudents.com/wp-content/uploads/2018/01/mariadb_ubuntu_1604.png?w=640&#038;ssl=1" alt="mariadb welcome"/></figure>



<p></p>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h4 class="wp-block-heading">Step 3: Install PHP 7.2 and Related Modules</h4>



<p>PHP 7.2 may not be available in Ubuntu default repositories… in order to install it, you will have to get it from third-party repositories.</p>



<p>Run the commands below to add the below third party repository to upgrade to PHP 7.2</p>



<pre class="wp-block-code"><code>sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php</code></pre>



<p>Then update and upgrade to PHP 7.2</p>



<pre class="wp-block-code"><code>sudo apt update</code></pre>



<p>Next, run the commands below to install PHP 7.2 and related modules.</p>



<pre class="wp-block-code"><code>sudo apt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-gmp php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-xml php7.2-cli php7.2-zip</code></pre>



<p>After installing PHP 7.2, run the commands below to open PHP default config file for Apache2…</p>



<pre class="wp-block-code"><code>sudo nano /etc/php/7.2/apache2/php.ini</code></pre>



<p>Then make the changes on the following lines below in the file and save.&nbsp;The value below are great settings to apply in your environments. (not neccesary)</p>



<pre class="wp-block-code"><code>file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360</code></pre>



<p>After making the change above, save the file and close out.</p>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<h4 class="wp-block-heading">Step 4: Restart Apache2</h4>



<p>After installing PHP and related modules, all you have to do is restart Apache2 to reload PHP configurations…</p>



<p>To restart Apache2, run the commands below</p>



<pre class="wp-block-code"><code>sudo systemctl restart apache2.service</code></pre>



<p>To test PHP 7.2 settings with Apache2, create a&nbsp;<strong>phpinfo.php</strong>&nbsp;file in Apache2 root directory by running the commands below</p>



<pre class="wp-block-code"><code>sudo nano /var/www/html/phpinfo.php</code></pre>



<p>Then type the content below and save the file.</p>



<pre class="wp-block-code"><code>&lt;?php phpinfo( ); ?&gt;</code></pre>



<p>Save the file.. then browse to your server hostname followed by&nbsp;<strong>/phpinfo.php</strong></p>



<p>http://localhost/phpinfo.php</p>



<p>You should see PHP default test page…</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/websiteforstudents.com/wp-content/uploads/2018/02/xphp_ubuntu_test_nginx.png.pagespeed.ic.qNMY5_t62b.webp?w=640&#038;ssl=1" alt="PHP 7.2 ubuntu nginx"/></figure>
</div></div>



<h4 class="wp-block-heading">Step 5: Create NextCloud Database</h4>



<p>Now that you’ve installed all the packages that are required for NextCloud to function, continue below to start configuring the servers. First run the commands below to create a blank NextClouddatabase.</p>



<p>To logon to MariaDB database server, run the commands below.</p>



<pre class="wp-block-code"><code>sudo mysql -u root -p</code></pre>



<p>Then create a database called<strong>&nbsp;nextcloud</strong></p>



<pre class="wp-block-code"><code>CREATE DATABASE nextcloud;</code></pre>



<p>Create a database user called&nbsp;<strong>nextclouduser</strong>&nbsp;with new password</p>



<pre class="wp-block-code"><code>CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'new_password_here';</code></pre>



<p>Then grant the user full access to the database.</p>



<pre class="wp-block-code"><code>GRANT ALL ON nextcloud.* TO 'nextclouduser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;</code></pre>



<p>Finally, save your changes and exit.</p>



<pre class="wp-block-code"><code>FLUSH PRIVILEGES;
EXIT;</code></pre>



<h4 class="wp-block-heading">Step 6: Download NextCloud Latest Release</h4>



<p>To get NextCloud latest release you may want to use Github repository… Install Composer, Curl and other dependencies to get started…</p>



<pre class="wp-block-code"><code>sudo apt install curl git
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer</code></pre>



<p>After installing curl and Composer above, change into the Apache2 root directory and downaload NextCloud packages from Github… Always replace the branch number with the latest branch….</p>



<pre class="wp-block-code"><code>cd /var/www/html
sudo git clone --branch stable17 https://github.com/nextcloud/server.git nextcloud
cd /var/www/html/nextcloud
sudo composer install
sudo git submodule update --init</code></pre>



<p>Then run the commands below to set the correct permissions for NextCloud to function.</p>



<pre class="wp-block-code"><code>sudo chown -R www-data:www-data /var/www/html/nextcloud/
sudo chmod -R 755 /var/www/html/nextcloud/</code></pre>



<h4 class="wp-block-heading">Step 7: Configure Apache2</h4>



<p>Finally, configure Apahce2 site configuration file for NextCloud. This file will control how users access NextCloud content. Run the commands below to create a new configuration file called&nbsp;<strong>nextcloud.conf</strong></p>



<pre class="wp-block-code"><code>sudo nano /etc/apache2/sites-available/nextcloud.conf</code></pre>



<p>Then copy and paste the content below into the file and save it. Replace servername and server aliias with your own domain name and directory root location.</p>



<pre class="wp-block-code"><code>&lt;VirtualHost *:80&gt;
     ServerAdmin admin@example.com
     DocumentRoot /var/www/html/nextcloud/
     ServerName example.com
     ServerAlias www.example.com
  
     Alias /nextcloud "/var/www/html/nextcloud/"

     &lt;Directory /var/www/html/nextcloud/&gt;
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
          &lt;IfModule mod_dav.c&gt;
            Dav off
          &lt;/IfModule&gt;
        SetEnv HOME /var/www/html/nextcloud
        SetEnv HTTP_HOME /var/www/html/nextcloud
     &lt;/Directory&gt;

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

&lt;/VirtualHost&gt;</code></pre>



<p>Save the file and exit.</p>



<h4 class="wp-block-heading">Step 8: Enable the NextCloud and Rewrite Module</h4>



<p>After configuring the VirtualHost above, enable it by running the commands below</p>



<pre class="wp-block-code"><code>sudo a2ensite nextcloud.conf
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime</code></pre>



<h4 class="wp-block-heading">Step 9 : Restart Apache2</h4>



<p>To load all the settings above, restart Apache2 by running the commands below.</p>



<pre class="wp-block-code"><code>sudo systemctl restart apache2.service</code></pre>



<p>Then open your browser and browse to the server domain name. You should see NextCloud setup wizard to complete. Please follow the wizard carefully.</p>



<p>http://example.com/nextcloud or type use http://your-ip-adress/nextcloud</p>



<p>Then create an admin account for NextCloud and type in the database info created above and finish the installation….</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/websiteforstudents.com/wp-content/uploads/2018/09/nextcloud_ubuntu_composer_install.png?w=640&#038;ssl=1" alt="NextCloud ubuntu composer install"/></figure>



<p>Enjoy!</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/websiteforstudents.com/wp-content/uploads/2018/09/xnextcloud_ubuntu_composer_install_1.png.pagespeed.ic.pJrOFPXRMi.webp?w=640&#038;ssl=1" alt="nextcloud ubuntu composer install"/></figure>



<p>Congratulation! You have successfully installed NextCloud on Ubuntu 16.04 | 18.04 and may work on upcoming 18.10…</p>



<h4 class="wp-block-heading">Upgrading NextCloud</h4>



<p>In the future when you want to upgrade to a new released version, simply follow the steps below:</p>



<p>Backup your corrent NextCloud folder….</p>



<pre class="wp-block-code"><code>sudo mv /var/www/html/nextcloud /var/www/html/nextcloud_bak</code></pre>



<p>Then download the latest… replace the&nbsp;<strong><span style="text-decoration:underline;">stable number</span></strong>&nbsp;with the latest…</p>



<pre class="wp-block-code"><code>cd /var/www/html
sudo git clone --branch stable14 https://github.com/nextcloud/server.git nextcloud
cd /var/www/html/nextcloud
sudo composer install
sudo git submodule update --init</code></pre>



<p>Next, copy the old&nbsp;data&nbsp;folder and the old&nbsp;config.php&nbsp;file from the backed-up folder to the new NextCloud directory….</p>



<pre class="wp-block-code"><code>sudo cp -rf /var/www/html/nextcloud_bak/data /var/www/html/nextcloud
sudo cp /var/www/html/nextcloud_bak/config/config.php /var/www/html/nextcloud/config/</code></pre>



<p>After that, run the commands below to upgrade….</p>



<pre class="wp-block-code"><code>sudo -u www-data php /var/www/html/nextcloud/occ maintenance:mode --on
sudo composer update /var/www/html/nextcloud --with-dependencies
sudo -u www-data php /var/www/html/nextcloud/occ upgrade
sudo -u www-data php /var/www/html/nextcloud/occ maintenance:mode --off</code></pre>



<p>That’s it!</p>



<p>You may also like the post below:</p>



<div class="wp-block-jetpack-related-posts">
<h6 class="wp-block-heading"></h6>
</div>
<p>The post <a href="https://it-tutorial.info/install-nextcloud-server-using-composer-on-ubuntu-16-04-18-04-with-apache2-mariadb-and-php-7-2-support/">Install NextCloud Server Using Composer On Ubuntu 16.04 | 18.04 With Apache2, MariaDB And PHP 7.2 Support</a> appeared first on <a href="https://it-tutorial.info">IT-Tutorial</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://it-tutorial.info/install-nextcloud-server-using-composer-on-ubuntu-16-04-18-04-with-apache2-mariadb-and-php-7-2-support/feed/</wfw:commentRss>
			<slash:comments>47</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">104</post-id>	</item>
	</channel>
</rss>
