<?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>Ubuntu Archives - Installing.in</title>
	<atom:link href="https://www.installing.in/category/linux/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.installing.in/category/linux/ubuntu/</link>
	<description></description>
	<lastBuildDate>Tue, 21 Mar 2023 03:54:26 +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">110734269</site>	<item>
		<title>[Solved] Error: Note, selecting &#8216;cmdtest&#8217; instead of &#8216;yarn&#8217;</title>
		<link>https://www.installing.in/solved-error-note-selecting-cmdtest-instead-of-yarn/</link>
					<comments>https://www.installing.in/solved-error-note-selecting-cmdtest-instead-of-yarn/#respond</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Mon, 20 Mar 2023 08:43:22 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[npm]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[yarn]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=837</guid>

					<description><![CDATA[<p>If you are trying to install yarn dependency manager you might face this error that Ubuntu fails to install yarn and goes on to suggest or install cmdtest. Note, selecting... </p>
<p>The post <a href="https://www.installing.in/solved-error-note-selecting-cmdtest-instead-of-yarn/">[Solved] Error: Note, selecting &#8216;cmdtest&#8217; instead of &#8216;yarn&#8217;</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>If you are trying to install <code>yarn</code> dependency manager you might face this error that Ubuntu fails to install <code>yarn </code>and goes on to suggest or install <code>cmdtest</code>.</p>



<p><code>Note, selecting 'cmdtest' instead of 'yarn'</code></p>



<p>This is because there is a different <code>yarn </code>that is part on <code>cmdtest </code>package and is older than the <code>yarn</code> you are trying to install.</p>



<p> </p>



<figure class="wp-block-image size-full"><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2023/03/cmdtest_instead_of_arn_error.png?ssl=1"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="668" height="164" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2023/03/cmdtest_instead_of_arn_error.png?resize=668%2C164&#038;ssl=1" alt="" class="wp-image-838"/></a></figure>



<p>Solving this very simple. Instead of installing via <code>apt</code> or <code>apt-get</code> install it via npm</p>



<pre class="wp-block-code"><code>sudo npm install -g yarn</code></pre>



<p>You can now check the version of <code>yarn</code> with this command</p>



<pre class="wp-block-code"><code>yarn -v</code></pre>



<figure class="wp-block-image size-full"><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2023/03/cmdtest_yarn_fixed.png?ssl=1"><img data-recalc-dims="1" decoding="async" width="701" height="163" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2023/03/cmdtest_yarn_fixed.png?resize=701%2C163&#038;ssl=1" alt="" class="wp-image-839"/></a></figure>



<p>That&#8217;s it.</p>
<p>The post <a href="https://www.installing.in/solved-error-note-selecting-cmdtest-instead-of-yarn/">[Solved] Error: Note, selecting &#8216;cmdtest&#8217; instead of &#8216;yarn&#8217;</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/solved-error-note-selecting-cmdtest-instead-of-yarn/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">837</post-id>	</item>
		<item>
		<title>How to Install WSL2 on Windows</title>
		<link>https://www.installing.in/how-to-install-wsl2-on-windows/</link>
					<comments>https://www.installing.in/how-to-install-wsl2-on-windows/#respond</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Sat, 20 Aug 2022 12:20:56 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[WSL]]></category>
		<category><![CDATA[WSL2]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=806</guid>

					<description><![CDATA[<p>Easy to follow step by step guide to install WSL2 or Windows Subsystem for Linux on windows. </p>
<p>The post <a href="https://www.installing.in/how-to-install-wsl2-on-windows/">How to Install WSL2 on Windows</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>WSL or <a href="https://docs.microsoft.com/en-us/windows/wsl/about" target="_blank" rel="noreferrer noopener">Windows Subsystem for Linux</a> lets developers run Linux environment on windows. You can run Linux tools and apps on windows with the help on WSL. There are two versions of WSL and we will install WSL2 in this tutorial which is the latest version and is recommended by Microsoft.</p>



<p>There are multiple ways to install WSL. You can directly download an Linux distribution from windows store and it will install WSL2 and your chosen Linux distribution. </p>



<p>The way recommended by Microsoft is by using command line. In this tutorial we will install WSL using command prompt.</p>



<h3 class="wp-block-heading">Step 1: Open command prompt</h3>



<p>Type <code>command prompt</code> in the search box on the taskbar. If you do not have a search box then you can click on the search icon and start typing. If you do not have that too. You can click on the windows button and start typing command prompt to search for it.</p>



<p>Once you find the <code>command prompt</code> right click on it and click on the <code>run as administrator</code> on the popup menu.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/command-prompt.jpg?ssl=1"><img data-recalc-dims="1" decoding="async" width="760" height="555" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/command-prompt.jpg?resize=760%2C555&#038;ssl=1" alt="" class="wp-image-807"/></a></figure>
</div>


<h3 class="wp-block-heading">Step 2: Install WSL2</h3>



<p>Run following command in the command prompt window to install WSL2. This command will also install ubuntu which is the default Linux distro for WSL. You can always install other distros afterward.</p>



<pre class="wp-block-code"><code>wsl --install</code></pre>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/command-prompt-wsl-install.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="626" height="169" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/command-prompt-wsl-install.jpg?resize=626%2C169&#038;ssl=1" alt="" class="wp-image-808"/></a></figure>
</div>


<p>Windows will start downloading and installing the WSL2 and then Ubuntu to set up the Linux environment. </p>



<h3 class="wp-block-heading">Step 3: Set up UNIX user and password</h3>



<p>After the installation it will ask for a <code>Unix username</code>. You can choose any username it does not have to be same as windows username. Type your username and press<code> enter</code>.</p>



<p>After the username it will ask for <code>password</code>. Type a password of your choice for this user and press enter.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img data-recalc-dims="1" loading="lazy" decoding="async" width="760" height="127" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/ubuntuinstall-1.png?resize=760%2C127&#038;ssl=1" alt="ubuntu install choose username" class="wp-image-811"/></figure>
</div>


<p>If everything goes well WSL2 and ubuntu will be successfully installed on your system.</p>



<p>You can verify WSL by using this command</p>



<pre class="wp-block-code"><code>wsl --status </code></pre>



<p>This is will you a screen like the pic below.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/WSL_confirm.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/WSL_confirm.jpg?resize=566%2C262&#038;ssl=1" alt="" class="wp-image-813" width="566" height="262"/></a></figure>
</div>


<p>I you face any problem please comment below.</p>
<p>The post <a href="https://www.installing.in/how-to-install-wsl2-on-windows/">How to Install WSL2 on Windows</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/how-to-install-wsl2-on-windows/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">806</post-id>	</item>
		<item>
		<title>[Solved] Ubuntu refusing connection on port 80</title>
		<link>https://www.installing.in/solved-ubuntu-refusing-connection-on-port-80/</link>
					<comments>https://www.installing.in/solved-ubuntu-refusing-connection-on-port-80/#respond</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Sat, 13 Aug 2022 20:13:28 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ufw]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=793</guid>

					<description><![CDATA[<p>I was getting this issue that I was not able to connect to port 80 on ubuntu server. Same virtual network settings were being used with a different instance but... </p>
<p>The post <a href="https://www.installing.in/solved-ubuntu-refusing-connection-on-port-80/">[Solved] Ubuntu refusing connection on port 80</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I was getting this issue that I was not able to connect to port 80 on ubuntu server. Same virtual network settings were being used with a different instance but everything was working fine on it. I figured the problem is in the instance settings.</p>



<p>I searched through the web but nothing was working. So I decided to go through the server log. I know I should have done this first.</p>



<p>I found these lines in the <code>syslog</code> file:</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/iptable_persistent_flush.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="760" height="161" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/iptable_persistent_flush.png?resize=760%2C161&#038;ssl=1" alt="" class="wp-image-794"/></a></figure>



<p> The issue was in iptables and I needed to flush it</p>



<p>I ran the command highlighted in the the image above</p>



<pre class="wp-block-preformatted">/usr/sbin/netfilter-persistent flush </pre>



<p>It gave following output</p>



<figure class="wp-block-image size-full"><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/iptable-flush.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="757" height="130" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2022/08/iptable-flush.png?resize=757%2C130&#038;ssl=1" alt="" class="wp-image-795"/></a></figure>



<p>I tried to to connect to the port 80 and the default nginx page loaded in browser.</p>



<p>Problem solved.</p>



<p>But doing this messed up my OpenVPN server. OpenVPN client was connecting but internet was not accessible.</p>



<p>So I rebooted the system to see if it fixes the problem. </p>



<p>It did fixed OpenVPN. </p>



<p>But again port 80 was inaccessible.</p>



<p>I checked the status of <code>ufw</code> and it was disable. I had enabled it before I rebooted. Iptable rules were all reset. I googled why <code>ufw </code>was disabled and found<code> iptables-persistent </code>conflicts with <code>ufw</code>.</p>



<p>I disabled <code>iptables-persisten</code>t using this command</p>



<pre class="wp-block-preformatted">sudo systemctl disable netfilter-persistent</pre>



<p>I rebooted the system again and this time <code>ufw</code> stayed enabled and I was able to access the port 80 and also OpenVPN was working as intended.</p>



<p></p>
<p>The post <a href="https://www.installing.in/solved-ubuntu-refusing-connection-on-port-80/">[Solved] Ubuntu refusing connection on port 80</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/solved-ubuntu-refusing-connection-on-port-80/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">793</post-id>	</item>
		<item>
		<title>How to Install Nodejs on Ubuntu 20.04</title>
		<link>https://www.installing.in/how-to-install-nodejs-on-ubuntu-20-04/</link>
					<comments>https://www.installing.in/how-to-install-nodejs-on-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Wed, 29 Jul 2020 13:08:17 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[nodeJs]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=666</guid>

					<description><![CDATA[<p>Nodejs is a javascript runtime environment that got popular very quickly. It has got a huge developer community and is still developing very fast. Nodejs can be installed directly from... </p>
<p>The post <a href="https://www.installing.in/how-to-install-nodejs-on-ubuntu-20-04/">How to Install Nodejs on Ubuntu 20.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Nodejs is a javascript runtime environment that got popular very quickly. It has got a huge developer community and is still developing very fast.</p>
<p>Nodejs can be installed directly from Ubuntu&#8217;s repository or can be installed from the Nodesource repository. As mentioned above it is developing very fast it is advisable to install it from the Nodesource repository as it contains all the latest updates.</p>
<p>We will be using the Nodesource repository to install Nodejs in this guide. Also, we will be installing the LTS version of nodejs which is 12.x currently. If you want to install the latest version you can <a href="https://github.com/nodesource/distributions/blob/master/README.md" target="_blank" rel="noopener noreferrer">check here</a> for the versions available.</p>
<p>Let&#8217;s start installing Nodejs</p>
<p><div  id="_ytid_83962"  width="760" height="428"  data-origwidth="760" data-origheight="428" data-facadesrc="https://www.youtube.com/embed/zl0Ge_QsSls?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&disablekb=0&" class="__youtube_prefs__ epyt-facade no-lazyload" data-epautoplay="1" ><img data-recalc-dims="1" decoding="async" data-spai-excluded="true" class="epyt-facade-poster skip-lazy" loading="lazy"  alt="YouTube player"  src="https://i0.wp.com/i.ytimg.com/vi/zl0Ge_QsSls/maxresdefault.jpg?w=760&#038;ssl=1"  /><button class="epyt-facade-play" aria-label="Play"><svg data-no-lazy="1" height="100%" version="1.1" viewBox="0 0 68 48" width="100%"><path class="ytp-large-play-button-bg" d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z" fill="#f00"></path><path d="M 45,24 27,14 27,34" fill="#fff"></path></svg></button></div></p>
<p><strong>Step 1: Update your OS:</strong></p>
<p>Doing this is a good practice before installing any new package. Use these commands to update your system</p>
<pre>sudo apt update</pre>
<pre>sudo apt upgrade</pre>
<p><strong>Step 2: Add Nodesource Repository</strong></p>
<p>Good people at Nodesource have written this bash script that makes sit easier to add the repository. Download and run the script by using this command</p>
<pre>curl -sL https://deb.nodesource.com/setup_<span style="color: #ff0000;">lts</span>.x | sudo -E bash -</pre>
<p>If you are installing any other version change the <span style="color: #ff0000;">text marked in red</span> with the version number in the above command.</p>
<p><strong>Step 3: Install Nodejs and npm&nbsp;</strong></p>
<p>Use the command below to install the nodejs package. It will also install the npm package that will help you download the nodejs libraries later on.</p>
<pre>sudo apt-get install -y nodejs</pre>
<p><strong>Step 4: Verify installation</strong></p>
<p>If everything goes well you will have Nodejs and npm installed on your system.</p>
<p>To check use following commands to verify the version of both npm and nodejs installed on your system.</p>
<p>For nodejs:</p>
<pre>node -v</pre>
<p>For npm</p>
<pre>npm -v</pre>
<p>If everything has gone well you will see something like this</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2020/07/install-nodejs-on-ubuntu.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-670" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2020/07/install-nodejs-on-ubuntu.png?resize=665%2C437&#038;ssl=1" alt="install nodejs on ubuntu" width="665" height="437"></a></p>
<p>If you face any problem let me know in the comments below so we can fix the problem together.</p>
<p>The post <a href="https://www.installing.in/how-to-install-nodejs-on-ubuntu-20-04/">How to Install Nodejs on Ubuntu 20.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/how-to-install-nodejs-on-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">666</post-id>	</item>
		<item>
		<title>How to install zsh on Ubuntu 20.04</title>
		<link>https://www.installing.in/how-to-install-zsh-on-ubuntu-20-04/</link>
					<comments>https://www.installing.in/how-to-install-zsh-on-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Tue, 28 Jul 2020 12:23:48 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[shell]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=660</guid>

					<description><![CDATA[<p>Zsh is a Unix command interpreter or shell that comes with a few more bells and whistles than the bash shell. Many people prefer it to a bash shell as... </p>
<p>The post <a href="https://www.installing.in/how-to-install-zsh-on-ubuntu-20-04/">How to install zsh on Ubuntu 20.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Zsh is a Unix command interpreter or shell that comes with a few more bells and whistles than the bash shell.</p>
<p>Many people prefer it to a bash shell as it is faster to use and way more configurable according to the user.</p>
<p>To know more about zsh you can read their FAQ <a href="http://zsh.sourceforge.net/FAQ/" target="_blank" rel="noopener noreferrer">here.</a></p>
<p>Installing zsh in Ubuntu is pretty straight forward.</p>
<p><div  id="_ytid_44704"  width="760" height="428"  data-origwidth="760" data-origheight="428" data-facadesrc="https://www.youtube.com/embed/syFogVaH9jM?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&disablekb=0&" class="__youtube_prefs__ epyt-facade no-lazyload" data-epautoplay="1" ><img data-recalc-dims="1" decoding="async" data-spai-excluded="true" class="epyt-facade-poster skip-lazy" loading="lazy"  alt="YouTube player"  src="https://i0.wp.com/i.ytimg.com/vi/syFogVaH9jM/maxresdefault.jpg?w=760&#038;ssl=1"  /><button class="epyt-facade-play" aria-label="Play"><svg data-no-lazy="1" height="100%" version="1.1" viewBox="0 0 68 48" width="100%"><path class="ytp-large-play-button-bg" d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z" fill="#f00"></path><path d="M 45,24 27,14 27,34" fill="#fff"></path></svg></button></div></p>
<p><strong>Step 1: Update the apt index</strong></p>
<p>We need to update the apt index so we can get the latest binaries available. Use the following command to update the apt index</p>
<pre>sudo apt update</pre>
<p><strong>Step 2: Install zsh</strong></p>
<p>Use this command to download and install the latest zsh from the ubuntu repository.</p>
<pre>sudo apt install zsh</pre>
<p>If everything goes well you will have zsh installed</p>
<p>Check it by switching to zsh by typing</p>
<pre>zsh</pre>
<p>If zsh is installed correctly you will see zsh prompt instead of normal bash one. If its first time you are logging to zsh it will show you a few options. Choose one which is right for you.</p>
<p>To go back to the bash shell type</p>
<pre>bash</pre>
<p>you will switch to the regular bash shell again.</p>
<p>If you face any problem let me know in the comments section below.</p>
<p>The post <a href="https://www.installing.in/how-to-install-zsh-on-ubuntu-20-04/">How to install zsh on Ubuntu 20.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/how-to-install-zsh-on-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">660</post-id>	</item>
		<item>
		<title>How to install Openresty on Ubuntu 20.04</title>
		<link>https://www.installing.in/how-to-install-openresty-on-ubuntu-20-04/</link>
					<comments>https://www.installing.in/how-to-install-openresty-on-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Mon, 27 Jul 2020 08:05:56 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[web server]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=658</guid>

					<description><![CDATA[<p>Install Openresty web server on your server using this step by step easy to follow installing tutorial. Video guide also available.</p>
<p>The post <a href="https://www.installing.in/how-to-install-openresty-on-ubuntu-20-04/">How to install Openresty on Ubuntu 20.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Built on popular Nginx web server Openresty comes with additional plugins to make advanced tasks easier. You can use Openresty as drop in replacement for Nginx.</p>
<p>Most used feature of Openresty is the the built in Lua plugin that helps in writing Lua web app directly inside the web server without any need on installing other software. As Lua is built into the web server it makes it faster.</p>
<p>You can always download the source and compile it yourself but that is cumbersome and makes updating Openresty later on difficult.</p>
<p>For this guide, I will be using the prebuilt binaries provided by the Openresty repository.</p>
<p>Lets get Started</p>
<p><strong>Step 1 : Import GPG Key:</strong></p>
<p>GPG key helps in verifying the authenticity of the package. Run following command to get the GPG key from the official Openresty server and add in to your server.</p>
<pre>wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -</pre>
<p><strong>Step 2 : Add Openresty repository:</strong></p>
<p>We need to be sure that &#8216;apt-add-repository&#8217; command is available in our server. Run below command and it will install the required packages if not available.</p>
<pre>sudo apt-get -y install software-properties-common</pre>
<p>Now to add the repository use below command. It will detect the version of Ubuntu running on your server and add the appropriate repository.</p>
<pre>sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"</pre>
<p><strong>Step 3 : Install Openresty</strong></p>
<p>Update the apt index first</p>
<pre>sudo apt-get update</pre>
<p>Now run below command to download and install Openresty web server</p>
<pre>sudo apt-get install openresty</pre>
<p>If no error occurs you will have Openresty web server successfully installed and running on your server.</p>
<p>Visit your server&#8217;s IP address and you will be presented with a page like this</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class=" size-full wp-image-493 aligncenter" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2019/03/openresty-welcome-page.png?resize=744%2C324&#038;ssl=1" alt="openresty_welcome_page" width="744" height="324" /></p>
<p>If you face any problem please comment below and we will try to solve it together.</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.installing.in/how-to-install-openresty-on-ubuntu-20-04/">How to install Openresty on Ubuntu 20.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/how-to-install-openresty-on-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">658</post-id>	</item>
		<item>
		<title>Installing Percona MongoDB on Ubuntu 18.04</title>
		<link>https://www.installing.in/installing-percona-mongodb-on-ubuntu-18-04/</link>
					<comments>https://www.installing.in/installing-percona-mongodb-on-ubuntu-18-04/#respond</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Sat, 21 Sep 2019 18:36:12 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=509</guid>

					<description><![CDATA[<p>Percona Server for MongoDB is mostly the same as MongoDB server that you can install from the Ubuntu repository but percona mongodb comes with few additional features like pluggable storage... </p>
<p>The post <a href="https://www.installing.in/installing-percona-mongodb-on-ubuntu-18-04/">Installing Percona MongoDB on Ubuntu 18.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Percona Server for MongoDB is mostly the same as MongoDB server that you can install from the Ubuntu repository but percona mongodb comes with few additional features like pluggable storage engine API, hot backup and Percona&#8217;s memory engine.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-513" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2019/09/server-mongodb-big-1.png?resize=700%2C206&#038;ssl=1" alt="server-mongoDB-big" width="700" height="206" /></p>
<p>We can install it easily by adding the percona&#8217;s repository to ubuntu or by downloading the source and compiling it ourselves. For this guide, I will be using the first method because that makes upgrading very easy later on.</p>
<p>For this guide, I will be using a freshly created 1GB VPS from <a href="https://www.vultr.com/?ref=7841070-4F" target="_blank" rel="noopener noreferrer">Vultr</a> hosted in Singapore.</p>
<p>After logging into the server via SSH go through these steps using sudo if you are not logged in as root.</p>
<p><strong>Step 1: Add Percona&#8217;s repository:</strong></p>
<p>To add their repository percona has created a .deb file that we need to download and install. Let&#8217;s start by downloading the package with this command:</p>
<pre>wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb</pre>
<p>Now install this package with this command:</p>
<pre>dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb</pre>
<p>This will add the repository and other requirements.</p>
<p><strong>Step 2: Enable the repository:</strong></p>
<p>We need to enable this freshly added repository. To do so run this command:</p>
<pre>percona-release enable psmdb-42 release</pre>
<p>4.2 is the latest version at the time of writing and we are enabling repository for this version by the above command.</p>
<p><strong>Step 3: Install Percona MongoDB</strong></p>
<p>Update the local package information first</p>
<pre>apt update</pre>
<p>Now run this to install</p>
<pre>apt install percona-server-mongodb</pre>
<p>This will install the percona mongodb on your server and start it.</p>
<p>Check the status of mongodb by running this command:</p>
<pre><span class="pre">service</span> <span class="pre">mongod</span> <span class="pre">status</span></pre>
<p>You will see something like this</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-510" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2019/09/percona-mongodb.png?resize=686%2C424&#038;ssl=1" alt="percona mongodb" width="686" height="424" /></p>
<p>If the server is not running you can use this command to start</p>
<pre><span class="pre">service</span> <span class="pre">mongod</span> <span class="pre">start</span></pre>
<p>To stop the server you can use</p>
<pre><span class="pre">service</span> <span class="pre">mongod</span> <span class="pre">stop</span></pre>
<p>and to restart mongodb server</p>
<pre><span class="pre">service</span> <span class="pre">mongod</span> restart</pre>
<p>If you need to change the configuration MongoDB configuration file is located at /etc/mongod.conf</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.installing.in/installing-percona-mongodb-on-ubuntu-18-04/">Installing Percona MongoDB on Ubuntu 18.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/installing-percona-mongodb-on-ubuntu-18-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">509</post-id>	</item>
		<item>
		<title>Installing Discourse on Alibabacloud using Directmail and Cloud CDN</title>
		<link>https://www.installing.in/installing-discourse-on-alibabacloud-using-directmail-and-cloud-cdn/</link>
					<comments>https://www.installing.in/installing-discourse-on-alibabacloud-using-directmail-and-cloud-cdn/#respond</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Fri, 07 Jun 2019 08:17:52 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Webapp]]></category>
		<category><![CDATA[alibabacloud]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[discourse]]></category>
		<category><![CDATA[Forum]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=418</guid>

					<description><![CDATA[<p>I wrote this tutorial in July 2018 for Alibabacloud Techshare. You can find the edited copy of this tutorial on Alibaba cloud blog. Publishing my original copy here.&#160; Discourse is... </p>
<p>The post <a href="https://www.installing.in/installing-discourse-on-alibabacloud-using-directmail-and-cloud-cdn/">Installing Discourse on Alibabacloud using Directmail and Cloud CDN</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><em>I wrote this tutorial in July 2018 for Alibabacloud Techshare. You can find the edited copy of this tutorial on <a href="https://www.alibabacloud.com/blog/how-to-install-discourse-on-alibaba-cloud-using-directmail-and-cdn_593866" target="_blank" rel="noopener noreferrer">Alibaba cloud blog</a>. Publishing my original copy here.&nbsp;</em></p>
<hr>
<p>Discourse is a modern style free and open source forum system that runs on Ruby on rails, uses PostgreSQL as database system and redis cache. It is used by many top companies to develop communities around their products and to provide support.</p>
<p>For installation Discourse team recommends a VPS or dedicated server with 2 GB RAM, although for smaller communities it can be installed on server with 1GB RAM with swap enabled . You also need SMTP for sending email and CDN for delivering static content.</p>
<p>You can get all these services at Alibaba Cloud. <a href="https://account-intl.aliyun.com/register/intl_register.htm?biz_params=%7B%22intl%22%3A%22%7B%5C%22referralCode%5C%22%3A%5C%22a4y96k%5C%22%7D%22%7D" target="_blank" rel="noopener noreferrer">Register with Alibaba Cloud to get $300 credit</a> to check out these and many more services.</p>
<p>In this guide we will be installing Discourse on Alibaba Cloud&#8217;s <a href="https://www.alibabacloud.com/product/ecs">Elastic Compute Service (ECS)</a> and use <a href="https://www.alibabacloud.com/product/directmail" target="_blank" rel="noopener noreferrer">Directmail</a> for sending emails and <a href="https://www.alibabacloud.com/product/cdn">Cloud CDN</a> for static content delivery.</p>
<h2>Prerequisites</h2>
<hr>
<p>For this tutorial we will be needing:</p>
<ul>
<li style="list-style-type: none;">
<ul>
<li>ECS instance with at least 2GB RAM and 1 vCPU</li>
<li>A domain name or subdomain that resolve to your ECS instance</li>
<li>Cloud CDN setup to speed up our forum</li>
<li>Directmail SMTP credentials for sending email from our forum</li>
</ul>
</li>
</ul>
<p>We will need to setup all these before beginning the actual installation because discourse installer will ask for these information at the beginning of setup process.</p>
<h2>I. Creating the ECS instance</h2>
<hr>
<p>Although if you already have a VPS or dedicated server with any other service you can use it to install Discourse but I highly recommend using ECS to reduce the latency between server and Directmail as well as CDN.</p>
<p>To create an ECS instance login to your Alibaba Cloud console by <a href="https://ecs-buy.aliyun.com/wizard/#/postpay/ap-south-1" target="_blank" rel="noopener noreferrer">click here.</a> This link will take you directly to instance selection page.</p>
<p>You can find the steps to creating new instance in <a href="https://www.alibabacloud.com/help/doc-detail/25422.htm" target="_blank" rel="noopener noreferrer">ECS quick start guide</a>.</p>
<p><b>This is the configuration we need in the server to install Discourse:</b></p>
<ul>
<li>An instance with 1 or more vCPU depending on your choice and at least 2GB RAM.</li>
<li>For Image select Ubuntu 16.06 64 bit version.</li>
<li>In storage section select Ultra Cloud Disk 40 Gib.</li>
<li>Open Ports 80(http), 443(https) and 22(SSH) in security group section on networking page.</li>
</ul>
<p>Note the IP address of the instance as we will be needing it in next steps.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-422 aligncenter" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/ecs-ip-address.jpg?resize=760%2C163&#038;ssl=1" alt="ECS-ip address" width="760" height="163"></p>
<h2>II. Setting Domain name</h2>
<hr>
<p>We are doing this step early because DNS propagation takes some time. We want it propagated before we run the installer as lets encrypt require it to generate SSL certificate.</p>
<p>For this step you only have to add an A record in DNS configutaion of your domain that point your domain or subdomain to ECS instance&#8217;s IP address.</p>
<p>This is what you need to add:</p>
<p>Record type: <code>A</code></p>
<p>Name: <code>forum.example.com</code></p>
<p>Value: <code>your.server.ip.address</code> (eg. 192.168.1.1. You will get this in you ECS console)</p>
<p>This is how it looks in my DNS settings:</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-423 aligncenter" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/cloudflare-a-record.jpg?resize=760%2C73&#038;ssl=1" alt="Cloudflare-A-record" width="760" height="73"></p>
<h2>III. Setting up CloudCDN</h2>
<hr>
<p>This I am describing in detail as these are few setting we have to do to make it work with Discourse. For offilcial CloudCDN documentation you can go to the <a href="https://www.alibabacloud.com/help/doc-detail/27112.htm" target="_blank" rel="noopener noreferrer">CloudCDN quickstart guide</a>.</p>
<p><b>We will need to perform four main steps here:</b></p>
<h3>1. Adding the CDN domain</h3>
<p>Head over to CDN console by <a href="https://cdn.console.aliyun.com/#/" target="_blank" rel="noopener noreferrer">clicking here</a>.</p>
<p>Click on the <code>CDN Domain Name List</code> under the CDN menu.</p>
<p>Click on the <code>Add domain</code> button on right side.</p>
<p>You will see a form to setup your CDN domain and origin.</p>
<p>In the <code>CDN Domain</code> field enter a subdomain of your domain name. For example <code>cdn.example.com</code></p>
<p>In Business type select <code>Images and Small file</code>.</p>
<p>In Origin Site Type select <code>Origin Site Domain Name</code>.</p>
<p>Enter the domain name you will be using for your forum in the field that appears.</p>
<p>In <code>Port</code> field select <code>Port 443</code> as Discourse installer will install Letsencrypt SSL certificate and serve your forum on port 443.</p>
<p>In <code>Accelerating Region</code> select <code>Global Acceleration</code> if you want to use POPs in Mainland China as well as rest of the world or you can choose <code>Overseas Acceleration(non-chinese mainland)</code> if you want to use only POPs putside China. To use only Chinese POPs you should select <code>Chinese Mainland</code> from the menu.</p>
<p>This is how it should look</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-424 aligncenter" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/cdn-console.jpg?resize=760%2C524&#038;ssl=1" alt="CDN_CONSOLE" width="760" height="524"></p>
<p>Click on <code>Next</code> Button.</p>
<p>Your CDN will be configured in few minutes and you will be given an unique URL. You will have to create an CNAME in your domain&#8217;s DNS setting pointing yo this url.</p>
<h3>2. Installing the SSL certificate for CDN</h3>
<p>We need to setup SSL certificate for the CDN subdomain. If you already have the certificate you can install it and if not you can either buy it from Alibabacloud or can find free SSL certificate by a simple web search.</p>
<p>To install the certificate click on the <code>manage</code> link in front of the url in cdn url list and then click on the <code>pen icon</code> in front of <code>HTTPS Secure Acceleration</code></p>
<p>Turn on the<code> Certificate Status</code> switch.</p>
<p>In <code>Select Certificate</code> field choose <code>Custom Upload</code>.</p>
<p>Enter a name of your choice in <code>Certificate Name</code> field.</p>
<p>Enter <code>Certificate content</code> and <code>Private key</code> in marked textboxes. These are provided to you by the certificate provider.</p>
<p>In <code>Redirect Type</code> click on the radio button that says <code>HTTP -&gt; HTTPS</code>.</p>
<p>It should look like this</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-430" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/cdn-certificate-settings-1.jpg?resize=590%2C813&#038;ssl=1" alt="CDN_certificate_settings" width="590" height="813"></p>
<p>Click <code>OK</code> to save.</p>
<h3>3. Setting Back-to-source Host</h3>
<p>This setting is required so your CDN does not do a 301 redirect to your origin server.</p>
<p>Click <code>pen icon</code> in front of <code>Back-to-source Host</code> under <code>Basic Configuration</code> section.</p>
<p>A overlay window will open.</p>
<p>Switch on the <label id="dm_di_pf" class="control-label col-sm-3 ng-binding" data-spm-anchor-id="5176.8282264.0.i1.15fa109dWQoZqp">Back-to-source Host</label> button.</p>
<p>From the <code>Type</code> dropdown menu select domain name of your origin.</p>
<p>It should look like this</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-426 aligncenter" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/cdn-back-to-host-setting.jpg?resize=663%2C371&#038;ssl=1" alt="CDN_back-to-host-setting" width="663" height="371"></p>
<p>Click on <code>OK</code> button to save.</p>
<h3>4. Setting the CORS HTTP header</h3>
<p>Now click on the <code>Set HTTP Header</code> on side menu.</p>
<p>Click on <code>Add HTTP header</code> button on right side</p>
<p>A window will open.</p>
<p>Select <code>Access control allow origin</code> from the dropdown menu. And in value add <code>*</code></p>
<p>After saving it should look like this</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-427 aligncenter" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/cdn-header-setting.jpg?resize=760%2C172&#038;ssl=1" alt="CDN_header_setting" width="760" height="172"></p>
<p>Note the CDN URL, we will be needing it later.</p>
<p>This is it for the CDN setup.</p>
<h2>IV. Get Directmail SMTP credentials</h2>
<hr>
<p>Directmail is email service by Alibabacloud and it is one of the cheapest and most reliable service available.</p>
<p><b>Note:</b> Email setting is the most common step where most of the new users break their forum and have to rebuild it. So be careful.</p>
<p>Head over to the Directmail console by <a href="https://dm.console.aliyun.com/" target="_blank" rel="noopener noreferrer">clicking here</a>.</p>
<p>If you have not activated it before it will ask you to do so.</p>
<p>For detailed documentation you can read the <a href="https://www.alibabacloud.com/help/product/29412.htm" target="_blank" rel="noopener noreferrer">Directmail documentation</a> but I will give you a short version here because there are few things we need to do to make it work with discourse.</p>
<p>You need to setup Directmail in 3 steps:</p>
<h3>1. Add sender domain</h3>
<p>This will be the domain from where the email will be send. You need to use your forum domain as it is important. For example <code>forum.example.com</code>.</p>
<p>Click on the <code>New Domain</code> button on the top right. A popup window will open.</p>
<p>Enter your forum&#8217;s domain in the the <code>Domain</code> field and click <code>OK</code> button.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-433 aligncenter" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/directmail-add-new-domain.jpg?resize=591%2C322&#038;ssl=1" alt="DirectMail_add_new_domain" width="591" height="322"></p>
<p>A domain verification is needed to activate it.</p>
<p>Click on the <code>configure</code> link in front of your domain.</p>
<p>You will be presented with the DNS configuration data. You need to add these in enties DNS panel of your domain.</p>
<p>After you have added the DNS records to your domain&#8217;s configuration click on the <code>Confirm Changes</code> button at the bottom.</p>
<p>Now click on the <code>verify</code> link in front of your domain.</p>
<p>You will be able to send mails only after the domain status changes to <code>Available</code>. If the it fails to verify even after correct configuration wait for a while then verify again, sometime DNS changes takes time to take effect.</p>
<h3>2. Add sender email address</h3>
<p>Click on the Sender Addresses in the left menu.</p>
<p>Click on <code>Create Sender Address</code> button on the top right.</p>
<p>A Overlay window will open where you need to enter the data.</p>
<p>Fill all the fields like this to setup sender email:</p>
<p><code>Email Domains</code>: select your forum&#8217;s domain from dropdown menu.</p>
<p><code>Account</code>: <b>noreply</b> (<b>This is important</b> to put only <code>noreply</code> as account or authentication will fail and your forum will not ne able to send email.</p>
<p><code>Reply-to Address</code>: Any email address you like where you will like to receive replies.</p>
<p><code>Mail Type</code>: Triggered Emails.</p>
<p>It should look like this</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-428 aligncenter" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/directmail-add-sender-address.jpg?resize=594%2C582&#038;ssl=1" alt="DirectMail-add-sender-address" width="594" height="582" srcset="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/directmail-add-sender-address.jpg?w=594&amp;ssl=1 594w, https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/directmail-add-sender-address.jpg?resize=50%2C50&amp;ssl=1 50w, https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/directmail-add-sender-address.jpg?resize=65%2C65&amp;ssl=1 65w" sizes="auto, (max-width: 594px) 100vw, 594px" /></p>
<p>Press <code>OK</code> to create sender address.</p>
<h3>3. Set SMTP password</h3>
<p>Click on the <code>Set SMTP password</code> link in front of the sender email address you set in previous step.</p>
<p>A overlay window will open where you can set your password.</p>
<p>Read the instructions carefully as it requires mix of lower case upper case letter and number. Use atleast 2 different uppercase letter, 2 different lowercase letters and 2 different digits for your password.</p>
<p>Note the sender email address and SMTP password. It will be needed while running the Discourse installer. You will also need SMTP service address that you can <a href="https://www.alibabacloud.com/help/doc-detail/29449.htm" target="_blank" rel="noopener noreferrer">find here.</a> Choose the one for the region you set your directmail account in.</p>
<h2>V. Running the Discourse Installer</h2>
<hr>
<p>Discouse team have made it quite easy to install discourse. You only have to install docker first and download and run the installer. After few minutes and couple of question you will get your new discourse forum ready.</p>
<p>Login to you server via SSH</p>
<pre>ssh root@192.168.1.1</pre>
<p><b>*</b>Replace 192.168.1.1 with your IP address.</p>
<p>After successful login run the following command to update your system first.</p>
<pre>sudo apt-get update &amp;&amp; apt-get upgrade -y</pre>
<p>All the steps will be run as root user so run this command first</p>
<pre>sudo -s</pre>
<h3>Install Docker</h3>
<p>Discourse forum runs inside docker container so we will first install the latest docker</p>
<pre>wget -qO- https://get.docker.com/ | sh</pre>
<p>Above command will install the docker in your server.</p>
<h3>Install GIT</h3>
<pre class="highlight">apt-get install git</pre>
<h3>Download Discourse installer</h3>
<p>Create a directory to install discourse</p>
<pre>mkdir /var/discourse</pre>
<p>Clone discourse doscker image inside this folder</p>
<pre>git clone https://github.com/discourse/discourse_docker.git /var/discourse</pre>
<p>Change to to this directory</p>
<pre>cd /var/discourse</pre>
<h3>Run Discourse installer</h3>
<p>Initiate setup script</p>
<pre>./discourse-setup</pre>
<p>Discourse will create a swap space first and then you will be asked for these information</p>
<pre>Hostname for your Discourse? [discourse.example.com]: 
Email address for admin account(s)? [me@example.com,you@example.com]: 
SMTP server address? [smtp.example.com]: 
SMTP port? [587]: 
SMTP user name? [user@example.com]: 
SMTP password? [pa$word]: 
Let's Encrypt account email? (ENTER to skip) [me@example.com]:</pre>
<p>Let me explain these</p>
<ul>
<li><b>Hostname for your discourse:</b> This is the domain or subdomain that you want to use with your forum. We set it in the Step II while adding A record in your domain&#8217;s DNS.</li>
<li><b>Email address for admin accounts:</b> Here you enter the email address of the admin account of your forum. You can add multiple admin email separated my comma(,). this is<b> not</b> your SMTP sender address.</li>
<li><b>SMTP server address:</b> This is the address of the SMTP server of Directmail. You can find it on<a href="https://www.alibabacloud.com/help/doc-detail/29449.htm" target="_blank" rel="noopener noreferrer"> this page</a>. Choose the one for the region where you have created your Directmail account. You can see your region at the top of the Directmail console.</li>
<li><b>SMTP port:</b> Enter 80 here as this is the port that Directmail uses for SMTP connection.</li>
<li><b>SMTP user name:</b> Here you enter the sender email address we created in Step V.</li>
<li><b>SMTP password:</b> Enter the SMTP password we set in step V.</li>
<li><b>Let&#8217;s Encrypt account email:</b> This is the email address that let&#8217;s encrypt uses to generate SSL certificate for your domain and send notifications regarding expiration and renewal failure. You can skip it but I suggest you do enter an email address you check regularly. Also make sure your DNS has been propagated before running the installer as it is important for generating let&#8217;s encrypt certificate.</li>
</ul>
<p>After you have entered the information setup will show all the information you gave on the screen for review and ask for confirmation. Check it carefully and if all is correct press <code>ENTER</code> key. If you need to change something type <code>n</code> and then <code>ENTER</code>.</p>
<p>After confirmation will take around 10 minutes to setup everything.</p>
<p>After the setup finishes you can see your forum in the browser by visiting the URL you entered.</p>
<p>At this stage although your forum is working but it is not currently using CloudCDN. We will set up this now.</p>
<h2>VI. Setting up CloudCDN</h2>
<hr>
<p>Go to the discourse directory if you are not already into it.</p>
<pre>cd /var/discourse</pre>
<p>Open the app.yml file in nano for editing</p>
<pre class="p1"><span class="s1">nano containers/app.yml</span></pre>
<p>Scroll down until you find this line.</p>
<pre class="p1"><span class="s1">#DISCOURSE_CDN_URL: //discourse-cdn.example.com</span></pre>
<p>And paste this line right below it. Make sure you keep the same indentation as line above.</p>
<pre>DISCOURSE_CDN_URL: //cdn.example.com</pre>
<p><b>*</b>replace the url with CDN url we set in the step IV.</p>
<p>Press <code>control+O</code> and <code>ENTER</code> to save changes.</p>
<p>Press <code>control+X</code> and then <code>ENTER</code> to exit nano.</p>
<p>Now rebuild the app</p>
<pre>./launcher rebuild app</pre>
<p>Rebuild process will take about 10 minutes.</p>
<p>Your forum will now use CloudCDN to serve static content.</p>
<p>Now visit enter your forum&#8217;s URL and you will be greetied with this message</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-431 alignnone" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/discourse-setup-screen.jpg?resize=695%2C532&#038;ssl=1" alt="Discourse_Setup-screen" width="695" height="532"></p>
<p>Click on the register button and fill all the fields as required to create administrator account for the forum. Forum will send you email to confirm your email address. If you do not get the email review your Directmail settings and make sure you have followed the tutorial carefully. If you need to change the SMTP setting in forum you can run the setup again by using this command inside discourse directory.</p>
<pre> ./discourse-setup</pre>
<p>You will be asked all the information again and installer will also show you all the information you gave earlier.</p>
<p>After confirmation of your email go through the initial Discourse setup and you will be soon see your forum&#8217;s homepage.</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="size-full wp-image-432 aligncenter" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/06/discourse-homepage.jpg?resize=760%2C503&#038;ssl=1" alt="Discourse-homepage" width="760" height="503"></p>
<p>Enjoy your new Discourse forum 🙂</p>
<h2>Conclusion</h2>
<p>You can install Discourse forum software quite easily on Alibabcloud&#8217;s infrastructure. You don&#8217;t have to buy from multiple providers as you get all the required services like server, SMTP and CDN from Alibabacloud and most of them are cheaper but more reliable than other providers. If you have not signed up yet <a href="https://account-intl.aliyun.com/register/intl_register.htm?biz_params=%7B%22intl%22%3A%22%7B%5C%22referralCode%5C%22%3A%5C%22a4y96k%5C%22%7D%22%7D" target="_blank" rel="noopener noreferrer">register and get $300 credit</a> to check out the Alibabacloud services.</p>
<p>The post <a href="https://www.installing.in/installing-discourse-on-alibabacloud-using-directmail-and-cloud-cdn/">Installing Discourse on Alibabacloud using Directmail and Cloud CDN</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/installing-discourse-on-alibabacloud-using-directmail-and-cloud-cdn/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">418</post-id>	</item>
		<item>
		<title>How to install Openresty on Ubuntu 18.04</title>
		<link>https://www.installing.in/how-to-install-openresty-on-ubuntu-18-04/</link>
					<comments>https://www.installing.in/how-to-install-openresty-on-ubuntu-18-04/#comments</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Fri, 08 Mar 2019 14:42:01 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[web server]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=488</guid>

					<description><![CDATA[<p>Openresty is a web app server built on popular Nginx web server with lots of advanced features built-in. It is almost a drop-in replacement for Nginx. Openresty has many built-in... </p>
<p>The post <a href="https://www.installing.in/how-to-install-openresty-on-ubuntu-18-04/">How to install Openresty on Ubuntu 18.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Openresty is a web app server built on popular Nginx web server with lots of advanced features built-in. It is almost a drop-in replacement for Nginx.</p>
<p>Openresty has many built-in Nginx modules that make it a powerful web app server. A most popular feature of Openresty is built-in Lua programming language support. You can directly use Lua scripts inside the Nginx conf files. You can write a high performance web application in Lua without having to install any other package other then Openresty.</p>
<p>For this guide, I will be using a fresh 1GB server from <a href="https://www.vultr.com/?ref=7841070-4F" target="_blank" rel="noopener noreferrer">Vultr</a> hosted in Germany.</p>
<p>There are 2 ways to install Openresty. Either you can use the prebuilt binaries or you can download the source and compile it yourself.</p>
<p>For this guide, I will be using the first method as it is easier and also it makes it easier to update Openresty later.</p>
<p><strong>Step 1: Import the GPG key:</strong></p>
<p>We need to import a GPG key as the package we will be downloading is encrypted and this key helps in verifying the package&#8217;s authenticity. Run following command to download and add the GPG key from the Openresty official server.</p>
<pre>wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -</pre>
<p><strong>Step 2: Add Openresty repository:</strong></p>
<p>Let us first add the apt-add-repository command</p>
<pre>sudo apt-get -y install software-properties-common</pre>
<p>Now run below command to add the repository. This command will detect the version of ubuntu you are using and add the appropriate repository.</p>
<pre>sudo add-apt-repository -y <span class="hljs-string">"deb http://openresty.org/package/ubuntu <span class="hljs-variable">$(lsb_release -sc)</span> main"</span></pre>
<p>Now you will have the official Openresty apt repository added to your system.</p>
<p><strong>Step 3: Install Openresty:</strong></p>
<p>First let&#8217;s update the apt index. Use this command to do so</p>
<pre>sudo apt-get update</pre>
<p>Now run this command to download and install the Openresty from its official repository</p>
<pre>sudo apt-get install openresty</pre>
<p>If everything goes well you will have Openresty successfully installed of your server.</p>
<p>Check it by visiting the IP address of your server. You will see a page like this:</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-493" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2019/03/openresty-welcome-page.png?resize=744%2C324&#038;ssl=1" alt="openresty_welcome_page" width="744" height="324"></p>
<p><em><strong>Bonus tip:</strong></em></p>
<p>If you are trying to replace previously installed Nginx with Openresty rather the installing it on fresh server then disable and stop the Nginx before following this tutorial.</p>
<p>Disable Nginx with this command</p>
<pre>sudo systemctl <span class="hljs-built_in">disable</span> nginx</pre>
<p>and stop Nginx with this command</p>
<pre>sudo systemctl stop nginx</pre>
<p>If you face any problem while installing openresty please let me know in the comments section so we can solve it together.</p>
<p>The post <a href="https://www.installing.in/how-to-install-openresty-on-ubuntu-18-04/">How to install Openresty on Ubuntu 18.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/how-to-install-openresty-on-ubuntu-18-04/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">488</post-id>	</item>
		<item>
		<title>How to install nodeBB on Ubuntu 16.04</title>
		<link>https://www.installing.in/how-to-install-nodebb-on-ubuntu-16-04/</link>
					<comments>https://www.installing.in/how-to-install-nodebb-on-ubuntu-16-04/#comments</comments>
		
		<dc:creator><![CDATA[Rajeev]]></dc:creator>
		<pubDate>Thu, 24 May 2018 18:29:10 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Webapp]]></category>
		<category><![CDATA[Forum]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[nodeBB]]></category>
		<category><![CDATA[nodeJs]]></category>
		<category><![CDATA[redis]]></category>
		<guid isPermaLink="false">https://www.installing.in/?p=373</guid>

					<description><![CDATA[<p>NodeBB is a nodejs based modern style forum system that uses MongoDB as a database and can also work with the Redis database. Installation of nodeBB requires a VPS or... </p>
<p>The post <a href="https://www.installing.in/how-to-install-nodebb-on-ubuntu-16-04/">How to install nodeBB on Ubuntu 16.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>NodeBB is a nodejs based modern style forum system that uses MongoDB as a database and can also work with the Redis database. Installation of nodeBB requires a VPS or dedicated server with root access. It can not be installed on the conventional cPanel based hosting. If you don&#8217;t already have a VPS then try digitalocean by <a href="https://goo.gl/Of63YW" target="_blank" rel="noopener noreferrer">clicking on this link</a> and you will get 10$ free credit for playing around.</p>
<p>For installing nodeBB with Nginx reverse proxy you will need to install these components:</p>
<ol>
<li>NodeJS</li>
<li>MongoDB</li>
<li>Git</li>
<li>NodeBB forum software</li>
<li>Nginx</li>
</ol>
<p>We will install them one by one by configuring each one along the way.</p>
<p>For this tutorial, I will be using <a href="https://goo.gl/Of63YW" target="_blank" rel="noopener noreferrer">digitalocean&#8217;s</a> 1 GB droplet at their Bangalore datacenter.</p>
<p><strong>1. Installing NodeJS:</strong></p>
<p>At this time the nodeBB team suggests we should install nodejs version 8 for nodeBB. Use these commands to install it</p>
<pre>curl <span class="hljs-operator">-s</span>L https://deb.nodesource.com/setup_8.x | sudo -E bash - 

sudo apt-get install -y nodejs</pre>
<p>After installing verify your nodejs and npm version:</p>
<pre>node -v  
npm -v</pre>
<p>You will get output like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodejs-version-check.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-375" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodejs-version-check.png?resize=332%2C75&#038;ssl=1" alt="nodejs-version-check" width="332" height="75" srcset="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodejs-version-check.png?w=332&amp;ssl=1 332w, https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodejs-version-check.png?resize=326%2C75&amp;ssl=1 326w" sizes="auto, (max-width: 332px) 100vw, 332px" /></a></p>
<p><strong>2. Installing MongoDB:</strong></p>
<p>We will be installing MongoDB version 3.6 in this tutorial. Use these steps to install:</p>
<p><strong>2.1:</strong> Import public key:</p>
<pre>sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5</pre>
<p><strong>2.2:</strong> Create a list file for MongoDB:</p>
<pre>echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list</pre>
<p><strong>2.3:</strong> Reload local package database:</p>
<pre>sudo apt-get update</pre>
<p><strong>2.4:</strong> Install MongoDB packages:</p>
<pre>sudo apt-get install -y mongodb-org</pre>
<p>Verify MongoDB version:</p>
<pre>mongod --version</pre>
<p>You will get output like this: <a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mongodb-version-check.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-377" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mongodb-version-check.png?resize=445%2C158&#038;ssl=1" alt="mongodb-version-check" width="445" height="158" /></a></p>
<p><strong>2.5: Configure MongoDB:</strong></p>
<p><strong>2.5.1:</strong> Open mongo shell:</p>
<pre>mongo</pre>
<p>only if it fails to open shell then try this command and try the above command again to enter shell:</p>
<pre>sudo service mongod restart</pre>
<p><strong>2.5.2:</strong> Switch to the built-in <code>admin</code> database:</p>
<pre><span class="hljs-keyword">use</span> admin</pre>
<p><strong>2.5.3:</strong> Creating users and setting passwords:</p>
<p>Here we will create an administrative user for MongoDB, create a new database for nodeBB and create another user for this newly created database</p>
<p><strong>2.5.3.1:</strong> Create an administrative user by using this command:</p>
<pre>db.createUser( { <span class="hljs-string">user:</span> <span class="hljs-string">"admin"</span>, <span class="hljs-string">pwd:</span> <span class="hljs-string">"<span style="color: #ff0000;">&lt;Enter a secure password&gt;</span>"</span>, <span class="hljs-string">roles:</span> [ { <span class="hljs-string">role:</span> <span class="hljs-string">"readWriteAnyDatabase"</span>, <span class="hljs-string">db:</span> <span class="hljs-string">"admin"</span> }, { <span class="hljs-string">role:</span> <span class="hljs-string">"userAdminAnyDatabase"</span>, <span class="hljs-string">db:</span> <span class="hljs-string">"admin"</span> } ] } )</pre>
<p><strong>*</strong>replace <span class="hljs-string"><span style="color: #ff0000;">&lt;Enter a secure password&gt; </span></span>with your chosen password.</p>
<p><strong>2.5.3.2:</strong> Create new database for nodeBB by using this command:</p>
<pre><span class="hljs-keyword">use</span> nodebb</pre>
<p>Now create user and password for this new database. This will be used to install nodebb.</p>
<pre>db.createUser( { <span class="hljs-string">user:</span> <span class="hljs-string">"nodebb"</span>, <span class="hljs-string">pwd:</span> <span class="hljs-string">"<span style="color: #ff0000;">&lt;Enter a secure password&gt;</span>"</span>, <span class="hljs-string">roles:</span> [ { <span class="hljs-string">role:</span> <span class="hljs-string">"readWrite"</span>, <span class="hljs-string">db:</span> <span class="hljs-string">"nodebb"</span> }, { <span class="hljs-string">role:</span> <span class="hljs-string">"clusterMonitor"</span>, <span class="hljs-string">db:</span> <span class="hljs-string">"admin"</span> } ] } )</pre>
<p><strong>*</strong>again replace <span class="hljs-string"><span style="color: #ff0000;">&lt;Enter a secure password&gt; </span></span>with your chosen password.</p>
<p><strong>2.5.4:</strong> Exit mongo shell:</p>
<pre><span class="hljs-title">quit</span><span class="hljs-params">()</span></pre>
<p>The screen should look like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mongodb-create-user-and-db.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter wp-image-378" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mongodb-create-user-and-db.png?resize=634%2C380&#038;ssl=1" alt="mongodb-create-user-and-db" width="634" height="380" /></a></p>
<p><strong>2.5.5:</strong> Enable database authorization in the MongoDB configuration file:</p>
<p>Edit MongoDB config file by using nano:</p>
<pre>nano /etc/mongod.conf</pre>
<p>Move the cursor to the bottom of the file and paste these lines:</p>
<pre><span class="hljs-attribute">security</span>: 
<span class="hljs-attribute">    authorization</span>: enabled

</pre>
<p>remember indentation in configuration files matter. If indentations are the wrong MongoDB will fail to restart.</p>
<p>Your screen should look like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mongo-conf-nano-edit.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter wp-image-387" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mongo-conf-nano-edit.png?resize=611%2C460&#038;ssl=1" alt="mongo-conf-nano-edit" width="611" height="460" srcset="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mongo-conf-nano-edit.png?w=1026&amp;ssl=1 1026w, https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mongo-conf-nano-edit.png?resize=320%2C240&amp;ssl=1 320w" sizes="auto, (max-width: 611px) 100vw, 611px" /></a></p>
<p>Now</p>
<p>press <code>ctrl + O</code> then <code>enter</code> to save</p>
<p>press <code>ctrl + X</code> to exit nano</p>
<p><strong>2.5.6: </strong>Restart MongoDB</p>
<pre>sudo systemctl restart mongod</pre>
<p><strong>2.5.7:</strong> Verify the administrative user created earlier can connect:</p>
<pre>mongo -u admin -p your_password --authenticationDatabase=admin</pre>
<p>if everything is good you will see a screen like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mondodb-admin-connect.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-379" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/mondodb-admin-connect.png?resize=732%2C72&#038;ssl=1" alt="mondodb-admin-connect" width="732" height="72" /></a></p>
<p>Quit MongoDB shell by using</p>
<pre>quit()</pre>
<p><strong>3. Install Git:</strong></p>
<p>This is a short and simple step. Just run this command:</p>
<pre>sudo apt-get install -y git</pre>
<p>There are chances git is already installed on your system. In either case move to the next step.</p>
<p><strong>4. Install NodeBB:</strong></p>
<p>Make a directory for web content:</p>
<pre>mkdir /var/www</pre>
<p>Go to the newly created directory by using:</p>
<pre>cd /var/www</pre>
<p>Clone nodeBB in this directory by this command:</p>
<pre>git clone -b v<span style="color: #ff0000;">1.9.3</span> https://github.com/NodeBB/NodeBB.git nodebb</pre>
<p><strong>*</strong>replace v1.9.3 with the latest version listed <a href="https://github.com/NodeBB/NodeBB/releases">here</a>.</p>
<p>Enter NodeBB directory with</p>
<pre>cd nodebb</pre>
<p>Initiate the installation by using this command:</p>
<pre>./nodebb setup</pre>
<p>This will install modules from npm and then enter the setup utility.</p>
<p>You will be asked a few questions regarding the database and the username password. Most of the default options will do. You will need to enter the username and password we set in step 2.5.3.2 that is the name of the username and password for the nodebb database we created.</p>
<p>After the database setup, it will ask for the credentials for the admin user for the new forum.</p>
<p>Don&#8217;t get confused. Your setup screen will look like this. I have marked the places where you will need to enter information with arrows. For the rest of the places just hit enter.</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodebb-setup-marked.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter wp-image-381" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodebb-setup-marked.png?resize=670%2C349&#038;ssl=1" alt="nodebb-setup-marked" width="670" height="349" /></a></p>
<p>&nbsp;</p>
<p>This will install the NodeBB.</p>
<p>Now start NodeBB by this command:</p>
<pre>./nodebb start</pre>
<p>Now you can view your freshly installed nodeBB forum in the browser by going to address:</p>
<pre>http://<span style="color: #ff0000;">your.server.ip.address</span>:4567</pre>
<p><strong>*</strong>Replace the red text with your server&#8217;s IP address.</p>
<p>Here 4567 is the port number.</p>
<p>&nbsp;</p>
<p>You will see your new forum like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodebb-home-page.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter wp-image-388" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodebb-home-page.png?resize=675%2C345&#038;ssl=1" alt="nodebb-home-page" width="675" height="345" /></a></p>
<p><strong>5. Installing Nginx</strong></p>
<p>In this step, we will install the Nginx web server and configure it so that you can access the forum using your domain name.</p>
<p><strong>5.1:</strong> Add Nginx repository:</p>
<pre>sudo add-apt-repository ppa:nginx/stable</pre>
<p>Hit enter when it asks.</p>
<p><strong>5.2:</strong> Update the local package database and install Nginx:</p>
<pre>sudo apt-get update</pre>
<pre>sudo apt-get install -y nginx</pre>
<p>Nginx is now installed. Verify it by using the command:</p>
<pre>nginx -v</pre>
<p>it will give something like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nginx-version-check.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-391" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nginx-version-check.png?resize=425%2C43&#038;ssl=1" alt="nginx-version-check" width="425" height="43" /></a></p>
<p>Start Nginx by using this command:</p>
<pre>sudo systemctl start nginx</pre>
<p><strong>5.3:</strong> Configure Nginx:</p>
<p>Go to Nginx sites-available directory</p>
<pre><span class="hljs-built_in">cd</span> /etc/nginx/sites-available</pre>
<p>create a new configuration file using this command:</p>
<pre>sudo nano <span style="color: #ff0000;">forum.example.com</span></pre>
<p><strong>*</strong>Change <span style="color: #ff0000;">forum.example.com </span>with your domain name.</p>
<p>Paste this configuration</p>
<pre>server {
    listen 80;

    server_name <span style="color: #ff0000;">forum.example.com<span style="color: #000000;">;</span></span>

    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:4567;
        proxy_redirect off;

        # Socket.IO Support
         proxy_http_version 1.1;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection "upgrade";
    }
}</pre>
<p><strong>*</strong>Again change the <span style="color: #ff0000;">forum.example.com </span>with your domain name. Your configuration file should look like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nginx-config-file.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter wp-image-396" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nginx-config-file.png?resize=619%2C412&#038;ssl=1" alt="nginx-config-file-nodebb" width="619" height="412" /></a></p>
<p>press <code>ctrl + O</code> then <code>enter</code> to save</p>
<p>press <code>ctrl + X</code> to exit nano</p>
<p>Now enter this command to go to sites-enabled directory:</p>
<pre><span class="hljs-built_in">cd</span> ../sites-enabled</pre>
<p>now link the configuration file from here:</p>
<pre>sudo ln <span class="hljs-operator">-s</span> ../sites-available/forum.example.com</pre>
<p>Reload Nginx by this:</p>
<pre>sudo systemctl reload nginx</pre>
<p>Now you can see your forum by entering your domain in a browser.</p>
<p>&nbsp;</p>
<p>Just one last little thing to do to fix frequent disconnection error.</p>
<p>Go to nodebb directory:</p>
<pre>cd /var/www/nodebb</pre>
<p>Open config.json in nano</p>
<pre>nano config.json</pre>
<p>Change the localhost:4567 with your domain name. It should look like this:</p>
<p><a href="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodebb-cconfig-json.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" class="aligncenter size-full wp-image-394" src="https://i0.wp.com/www.installing.in/wp-content/uploads/2018/05/nodebb-cconfig-json.png?resize=585%2C352&#038;ssl=1" alt="nodebb-cconfig-json" width="585" height="352" /></a></p>
<p>Enter your domain name where I have put http://forum.installing.in. Do not delete the parentheses(&#8220;&#8221;)</p>
<p>press <code>ctrl + O</code> then <code>enter</code> to save</p>
<p>press <code>ctrl + X</code> to exit nano</p>
<p>restart nodeBB by:</p>
<pre>./nodebb restart</pre>
<p>If all went well you will now have a fully functional ubuntu + nodeBB + Nginx setup. Visit your forum by entering your domain in a browser and you can log in as administrator by using the username password we set in the setup process.</p>
<p>Enjoy your new nodeBB forum 🙂</p>
<p>If you have any questions do let me know in the comments below.</p>
<p>The post <a href="https://www.installing.in/how-to-install-nodebb-on-ubuntu-16-04/">How to install nodeBB on Ubuntu 16.04</a> appeared first on <a href="https://www.installing.in">Installing.in</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.installing.in/how-to-install-nodebb-on-ubuntu-16-04/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">373</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 32/79 objects using Redis
Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Minified using Disk
Database Caching 2/12 queries in 0.003 seconds using Redis

Served from: installing.in @ 2026-04-28 13:41:07 by W3 Total Cache
-->