<?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>Control WebPanel Wiki &#187; nodejs</title>
	<atom:link href="https://wiki.centos-webpanel.com/tag/nodejs/feed" rel="self" type="application/rss+xml" />
	<link>https://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>How to Install and Setup Node.Js on CWP</title>
		<link>https://wiki.centos-webpanel.com/how-to-install-and-setup-node-js-on-cwp</link>
		<comments>https://wiki.centos-webpanel.com/how-to-install-and-setup-node-js-on-cwp#comments</comments>
		<pubDate>Sat, 24 Aug 2019 18:29:36 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[nodejs]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1253</guid>
		<description><![CDATA[Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Step 1: Install Prerequisites: yum groupinstall 'Development Tools' -y Step 2: Install Yum Repository NodeJS 12.x: curl -sL https://rpm.nodesource.com/setup_12.x &#124; bash - NodeJS 11.x: curl -sL https://rpm.nodesource.com/setup_11.x &#124; bash - NodeJS 10.x: curl -sL https://rpm.nodesource.com/setup_10.x &#124; bash - NodeJS 8.x: curl -sL https://rpm.nodesource.com/setup_8.x &#124; [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.</p>
<p><strong>Step 1: Install Prerequisites:</strong></p>
<pre>yum groupinstall 'Development Tools' -y
</pre>
<p><strong>Step 2: Install Yum Repository</strong></p>
<p>NodeJS 12.x:</p>
<pre>curl -sL https://rpm.nodesource.com/setup_12.x | bash -</pre>
<p>NodeJS 11.x:</p>
<pre>curl -sL https://rpm.nodesource.com/setup_11.x | bash -</pre>
<p>NodeJS 10.x:</p>
<pre>curl -sL https://rpm.nodesource.com/setup_10.x | bash -</pre>
<p>NodeJS 8.x:</p>
<pre>curl -sL https://rpm.nodesource.com/setup_8.x | bash -</pre>
<p><strong>Step 3: Install Nodejs and npm</strong></p>
<pre>yum install -y nodejs</pre>
<p><strong>Step 4: Confirm installation:</strong><br />
Run the below commands to check if nodejs is installed properly:</p>
<pre>node -v
npm -v
</pre>
<p>The above command should output the version of nodejs and npm installed.For example, for version 12.X, you should see the something like below:</p>
<pre>[root@cwp2 ~]# node -v
v12.6.0
[root@cwp2 ~]# npm -v
6.9.0
</pre>
<p>npm which is the package manager for nodejs can be used to search and install additional modules for nodejs.</p>
<pre>npm search package
npm install package
</pre>
<p><strong>Step 5: Setup webserver to host Nodejs Application</strong><br />
<em>These options depend on the webservers you have currently installed</em></p>
<p>Example if you have installed nginx/varnish/apache you can use:<br />
<strong>i.</strong> nginx -&gt; custom port - This will proxy directly to nodejs Application(RECOMMENDED)<br />
<strong>ii.</strong> nginx/varnish -&gt; custom port - This will proxy to varnish cache and then to nodejs Application<br />
<strong>iii.</strong> nginx/varnish/apache -&gt; custom port - This will proxy to varnish cache and then to apache and then to nodejs Application</p>
<p><strong>Configure webservers for domain to be used for nodejs Application:</strong><br />
CWP.Admin left Menu -&gt; Webserver settings -&gt; Webserver Domain Conf -&gt; Select Username -&gt; Select Domain/Subdomain -&gt; create configuration -&gt; select any option with (custom port) -&gt; check the box – Rebuild webserver conf for domain on save -&gt; Enter port number you have used in the application for the custom port, leave IP as 127.0.0.1 -&gt; save changes</p>
<p><strong>Step 6: Install AutoSSL</strong><br />
CWP.Admin left Menu -&gt; Webserver settings -&gt; SSL Certificates -&gt; AutoSSL -&gt; select user and domain -&gt; install SSL</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/how-to-install-and-setup-node-js-on-cwp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
