<?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>Linux Archives - IT-Tutorial</title>
	<atom:link href="https://it-tutorial.info/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://it-tutorial.info/category/linux/</link>
	<description>For educational purpose only</description>
	<lastBuildDate>Tue, 07 May 2024 08:39:54 +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>6 Tools to start reverse engineering malware?</title>
		<link>https://it-tutorial.info/6-tools-to-start-reverse-engineering-malware/</link>
					<comments>https://it-tutorial.info/6-tools-to-start-reverse-engineering-malware/#respond</comments>
		
		<dc:creator><![CDATA[Ryan123]]></dc:creator>
		<pubDate>Mon, 22 May 2023 07:36:06 +0000</pubDate>
				<category><![CDATA[Knowledgebase]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[Cyber Security]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[Reverse engineering]]></category>
		<guid isPermaLink="false">https://epic-thompson.185-48-117-223.plesk.page/?p=642</guid>

					<description><![CDATA[<p>If you&#8217;re interested in delving into the world of reverse engineering malware, having the right tools at your disposal is crucial. These tools not only facilitate the process but also provide valuable insights into the inner workings of malicious software. In this article, we will explore six tools that can help you get started on [&#8230;]</p>
<p>The post <a href="https://it-tutorial.info/6-tools-to-start-reverse-engineering-malware/">6 Tools to start reverse engineering malware?</a> appeared first on <a href="https://it-tutorial.info">IT-Tutorial</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>If you&#8217;re interested in delving into the world of reverse engineering malware, having the right tools at your disposal is crucial. These tools not only facilitate the process but also provide valuable insights into the inner workings of malicious software. In this article, we will explore six tools that can help you get started on your journey of reverse engineering malware. By utilizing these tools effectively, you can gain a deeper understanding of malware behavior, identify vulnerabilities, and develop effective countermeasures to combat malicious threats. So, let&#8217;s dive into the fascinating realm of malware reverse engineering and discover the tools that can pave the way for your exploration and analysis.</p>



<h2 class="wp-block-heading">How to obtain malware for analyzing </h2>



<p>For malware analyzing you need to obtain some malware that is around in the field right now. Their are severable ways of obtaining malware for analyzing. But before you go and check out the following steps i recoment you use  virtual machine. </p>



<p>Easy ways of obtaining malware is  by joinging sketchy forums, sign up for spam mails or try and download some <strong>free </strong>generators/cheats for games.</p>



<p>Check out &#8216;<a href="https://malshare.com" target="_blank" rel="noreferrer noopener">Malshare.com</a>,&#8217; it is a website where you can actively download malware shared by others. It provides an opportunity to explore and access various types of malware.</p>



<h2 class="wp-block-heading">Tool 1: Virtual machines </h2>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="640" height="222" src="https://i0.wp.com/epic-thompson.185-48-117-223.plesk.page/wp-content/uploads/2023/06/image.jpg?resize=640%2C222&#038;ssl=1" alt="" class="wp-image-652" style="width:587px;height:203px" srcset="https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image.jpg?w=809&amp;ssl=1 809w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image.jpg?resize=300%2C104&amp;ssl=1 300w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image.jpg?resize=768%2C266&amp;ssl=1 768w" sizes="(max-width: 640px) 100vw, 640px" /></figure>
</div>


<p>When it comes to dealing with malware, one essential tool to have is a virtual machine. The primary purpose of using virtual machines is to ensure the safety of your own system and prevent accidental loss of files. Thankfully, there are various options available for creating virtual machines, both free and paid. Prominent examples include &#8220;VirtualBox&#8221; and &#8220;VMware.&#8221;</p>



<p>Once you have set up a virtual machine, you can choose to install either Windows or Linux. A Linux distribution called Remnux stands out as it offers a comprehensive set of tools specifically designed for reverse engineering malware. By using a virtual machine, you can execute viruses and observe their behavior. While easily restoring the system to its previous working state with the help of a snapshot.</p>



<p><strong>IMPORTANT: ENSURE THAT YOUR ENVIRONMENT REMAINS COMPLETELY ISOLATED TO PREVENT ANY POSSIBILITY OF A BREAKOUT.</strong></p>



<h2 class="wp-block-heading">Tool 2: Wireshark</h2>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><img data-recalc-dims="1" decoding="async" width="622" height="425" src="https://i0.wp.com/epic-thompson.185-48-117-223.plesk.page/wp-content/uploads/2023/06/image-1.jpg?resize=622%2C425&#038;ssl=1" alt="" class="wp-image-654" style="width:277px;height:188px" srcset="https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-1.jpg?w=622&amp;ssl=1 622w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-1.jpg?resize=300%2C205&amp;ssl=1 300w" sizes="(max-width: 622px) 100vw, 622px" /></figure>
</div>


<p>Wireshark is a crucial tool for analyzing malware and understanding its behavior. It captures and analyzes network traffic, allowing you to identify communication patterns and command and control servers used by the malware. It helps detect malicious traffic, reconstruct malware activities, and is best used in combination with a virtual machine for a safe analysis environment. </p>



<p>While there are other network capturing software options available, Wireshark is the preferred choice for most analysts due to its free availability and extensive community support. It has a large user base and a wealth of resources, including courses that teach you the intricacies of this powerful software.</p>



<h2 class="wp-block-heading">Tool 3: Any.run </h2>


<div class="wp-block-image">
<figure class="alignright size-large is-resized"><img data-recalc-dims="1" decoding="async" width="640" height="424" src="https://i0.wp.com/epic-thompson.185-48-117-223.plesk.page/wp-content/uploads/2023/06/image-2-1024x678.jpg?resize=640%2C424&#038;ssl=1" alt="" class="wp-image-655" style="width:400px;height:265px" srcset="https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-2.jpg?resize=1024%2C678&amp;ssl=1 1024w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-2.jpg?resize=300%2C199&amp;ssl=1 300w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-2.jpg?resize=768%2C509&amp;ssl=1 768w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-2.jpg?w=1107&amp;ssl=1 1107w" sizes="(max-width: 640px) 100vw, 640px" /></figure>
</div>


<p>Any.Run is a platform designed for malware reverse engineering. It offers a virtualized environment, similar to a virtual machine with Wireshark installed. Enabling analysts to safely dissect and analyze malicious code. Let&#8217;s explore why Any.Run is a standout tool for reverse engineering malware.</p>



<ol class="wp-block-list">
<li>Safe Virtual Environment: Any.Run provides a secure sandboxed environment, protecting the host system while allowing analysts to dissect malware.</li>



<li>Streamlined Workflow: The platform offers an intuitive interface for effortless upload, execution, and real-time monitoring of malware samples.</li>



<li>Comprehensive Behavior Analysis: Any.Run captures and analyzes dynamic malware behavior, enabling researchers to gain valuable insights into malicious tactics.</li>



<li>Network Traffic Visibility: With integrated Wireshark, Any.Run allows detailed examination of malware&#8217;s network traffic, revealing command-and-control infrastructure and data exfiltration techniques.</li>



<li>Collaborative Approach: Any.Run encourages collaboration among researchers, facilitating knowledge sharing and collective defense against evolving cyber threats.</li>



<li>Informative Reports: The platform generates detailed reports and captures forensic artifacts, providing vital information for incident response and further investigations.</li>
</ol>



<p>Whether you&#8217;re a beginner or an experienced analyst, Any.Run is a valuable tool for diving into the world of malware analysis. It provides a supercharged magnifying glass for dissecting malicious software and understanding its inner workings. While the paid version unlocks additional features, the free version still offers a robust set of tools to kickstart your journey into malware reverse engineering.</p>



<h2 class="wp-block-heading">Tool 4: Virus Total</h2>



<p>VirusTotal is an online service that provides a convenient method to swiftly determine if a file or URL contains any detected viruses. It employs a range of antivirus engines and security tools to enhance the accuracy of malware detection. By leveraging the collective knowledge and expertise of the cybersecurity community, users gain access to a collaborative platform. </p>



<p>VirusTotal incorporates static and dynamic analysis techniques, along with an extensive database of previously scanned files, which aids in malware analysis and research. In summary, VirusTotal serves as a valuable resource for promptly verifying if a file or URL is flagged as malicious, identifying the specific antivirus scanners that detected it, and determining its malware family or type. This capability proves invaluable when you need to quickly assess the detection status and behavior of potential threats.</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="640" height="215" src="https://i0.wp.com/epic-thompson.185-48-117-223.plesk.page/wp-content/uploads/2023/06/image-1024x344.png?resize=640%2C215&#038;ssl=1" alt="" class="wp-image-656" srcset="https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image.png?resize=1024%2C344&amp;ssl=1 1024w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image.png?resize=300%2C101&amp;ssl=1 300w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image.png?resize=768%2C258&amp;ssl=1 768w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image.png?w=1454&amp;ssl=1 1454w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image.png?w=1280&amp;ssl=1 1280w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>



<h2 class="wp-block-heading">Tool 5: DIE Detect it EASY</h2>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="640" height="411" src="https://i0.wp.com/epic-thompson.185-48-117-223.plesk.page/wp-content/uploads/2023/06/image-1-1.jpg?resize=640%2C411&#038;ssl=1" alt="" class="wp-image-657" style="width:435px;height:279px" srcset="https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-1-1.jpg?w=1010&amp;ssl=1 1010w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-1-1.jpg?resize=300%2C193&amp;ssl=1 300w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-1-1.jpg?resize=768%2C493&amp;ssl=1 768w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>


<p>Detect It Easy (DIE) is a versatile file analysis tool that operates across multiple platforms. Its primary function is to determine the types of files by utilizing detection signatures, while also providing the option for customization through scripts. DIE supports various file formats and proves particularly useful for malware analysis.</p>



<p>Key features of DIE for malware analysis include:</p>



<ol class="wp-block-list">
<li>File Identification: DIE excels at accurately identifying file types, aiding analysts in classifying and comprehending malware.</li>



<li>Signature-based Detection: By utilizing pre-established signatures, DIE can effectively detect known malware patterns and characteristics.</li>



<li>Open Signature Architecture: Users have the freedom to customize existing detection algorithms or create new ones using scripts. This flexibility allows for tailored and adaptable malware analysis.</li>



<li>Versatility: DIE is capable of recognizing a broad range of file formats, including executable files that are frequently employed by malware.</li>



<li>Compilers/Obfuscators Detection: DIE possesses the ability to detect the specific compilers or obfuscators employed in the creation of files, and it may even offer the potential for their reversal.</li>
</ol>



<p>By utilizing DIE, analysts can easily identify suspicious files, classify malware samples, and develop customized detection rules, thereby enhancing their malware analysis capabilities.</p>



<h2 class="wp-block-heading">Tool 6: Hexrays/ Ghidra</h2>



<p><strong>Ghidra </strong>stands out for its extensive capabilities, including the ability to disassemble, decompile, and debug various types of executable files. It serves as an indispensable tool for reverse engineering malware, allowing analysts to gain deep insights into its inner workings.</p>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="640" height="434" src="https://i0.wp.com/epic-thompson.185-48-117-223.plesk.page/wp-content/uploads/2023/06/image-1.png?resize=640%2C434&#038;ssl=1" alt="" class="wp-image-658" style="width:373px;height:253px" srcset="https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-1.png?w=678&amp;ssl=1 678w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-1.png?resize=300%2C204&amp;ssl=1 300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</div>


<p>With Ghidra, analysts can explore the code, data structures, and control flow of malware, providing valuable knowledge for analysis and mitigation. The tool offers a user-friendly interface and a robust scripting environment, enabling users to automate analysis tasks and even create custom analysis tools tailored to their specific requirements.</p>



<p></p>



<p></p>



<p></p>



<p><strong>Hex-Rays </strong>is a commercial software extension widely used for disassembly. It specializes in the decompilation of binary code into a high-level programming language representation, such as C. This process of converting the code into a more human-readable form facilitates a better understanding of the functionality and logic employed by the malware.</p>


<div class="wp-block-image">
<figure class="alignright size-full is-resized"><img data-recalc-dims="1" loading="lazy" decoding="async" width="409" height="308" src="https://i0.wp.com/epic-thompson.185-48-117-223.plesk.page/wp-content/uploads/2023/06/image-3.png?resize=409%2C308&#038;ssl=1" alt="" class="wp-image-660" style="width:381px;height:259px" srcset="https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-3.png?w=409&amp;ssl=1 409w, https://i0.wp.com/it-tutorial.info/wp-content/uploads/2023/06/image-3.png?resize=300%2C226&amp;ssl=1 300w" sizes="auto, (max-width: 409px) 100vw, 409px" /></figure>
</div>


<p>It is worth noting that both Ghidra and Hex-Rays have a learning curve that may appear daunting at first. However, the investment of time and effort in mastering these tools proves worthwhile for individuals seeking to delve into malware analysis and reverse engineering. The insights gained from utilizing these tools can be invaluable in combating and staying ahead of evolving malicious software threats.</p>



<p></p>
<p>The post <a href="https://it-tutorial.info/6-tools-to-start-reverse-engineering-malware/">6 Tools to start reverse engineering malware?</a> appeared first on <a href="https://it-tutorial.info">IT-Tutorial</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://it-tutorial.info/6-tools-to-start-reverse-engineering-malware/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">642</post-id>	</item>
		<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>
