<?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 &#8211; Cahrur.Net</title>
	<atom:link href="https://cahrur.net/category/tutorial/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://cahrur.net</link>
	<description>Blog Official Cahrur Rozid</description>
	<lastBuildDate>Fri, 18 Apr 2025 02:15:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://cahrur.net/wp-content/uploads/2022/08/cropped-cropped-Logo-Cahrur.Net_-32x32.png</url>
	<title>Linux &#8211; Cahrur.Net</title>
	<link>https://cahrur.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Cara Install Node.js di Linux Tanpa Akses Sudo dan Auto Start dengan PM2</title>
		<link>https://cahrur.net/cara-install-node-js-di-linux-tanpa-akses-sudo-dan-auto-start-dengan-pm2/</link>
					<comments>https://cahrur.net/cara-install-node-js-di-linux-tanpa-akses-sudo-dan-auto-start-dengan-pm2/#respond</comments>
		
		<dc:creator><![CDATA[Cahrur Rozid]]></dc:creator>
		<pubDate>Fri, 18 Apr 2025 02:15:47 +0000</pubDate>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[AutoStartNodeJS]]></category>
		<category><![CDATA[DeveloperTips]]></category>
		<category><![CDATA[InstallNodeJS]]></category>
		<category><![CDATA[NodeJS]]></category>
		<category><![CDATA[PM2]]></category>
		<category><![CDATA[PM2Linux]]></category>
		<category><![CDATA[ServerLinux]]></category>
		<category><![CDATA[TanpaSudo]]></category>
		<category><![CDATA[TutorialNodeJS]]></category>
		<guid isPermaLink="false">https://cahrur.net/?p=441</guid>

					<description><![CDATA[Ingin menjalankan aplikasi Node.js di server Linux tanpa akses sudo? Artikel ini akan memandu Anda langkah demi langkah untuk menginstal ... <p class="read-more-container"><a title="Cara Install Node.js di Linux Tanpa Akses Sudo dan Auto Start dengan PM2" class="read-more button" href="https://cahrur.net/cara-install-node-js-di-linux-tanpa-akses-sudo-dan-auto-start-dengan-pm2/#more-441" aria-label="Read more about Cara Install Node.js di Linux Tanpa Akses Sudo dan Auto Start dengan PM2">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="cahru-before-content" id="cahru-3053909488"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9360031341295738" crossorigin="anonymous"></script><ins class="adsbygoogle" style="display:block;" data-ad-client="ca-pub-9360031341295738" 
data-ad-slot="8885219542" 
data-ad-format="auto"></ins>
<script> 
(adsbygoogle = window.adsbygoogle || []).push({}); 
</script>
</div><p>Ingin menjalankan aplikasi Node.js di server Linux tanpa akses sudo?</p>
<p>Artikel ini akan memandu Anda langkah demi langkah untuk menginstal Node.js, mengatur auto start menggunakan PM2, dan memastikan aplikasi Anda berjalan stabil bahkan tanpa hak akses root. Cocok untuk developer yang bekerja di lingkungan terbatas!</p>
<p>Install Node</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">cd ~
curl -O https://nodejs.org/dist/v20.17.0/node-v20.17.0-linux-x64.tar.xz
tar -xf node-v20.17.0-linux-x64.tar.xz
mv node-v20.17.0-linux-x64 nodejs</pre>
</div>
<p>Atur Path</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">echo 'export PATH=$HOME/nodejs/bin:$PATH' &gt;&gt; ~/.bashrc
source ~/.bashrc</pre>
</div>
<p>Setting auto start node saat buka sesi terminal baru</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">touch ~/.bash_profile</pre>
</div>
<p>Tambahkan konfigurasi untuk load node</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">nano ~/.bash_profile


Tambahkan baris berikut ke dalam file:

if [ -f ~/.bashrc ]; then
  source ~/.bashrc
fi
</pre>
</div>
<p>Install pm2</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">npm install pm2@latest -g</pre>
</div>
<p>Jalankan project</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">cd public_html/src
pm2 start app.js</pre>
</div>
<p>Simpan proses pm2</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">pm2 save</pre>
</div>
<p>Atur pm2 untuk start otomatis</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">pm2 startup</pre>
</div>
<p>Tambahkan PM2 ke File .bashrc</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">Edit file ~/.bashrc:
nano ~/.bashrc

Tambahkan baris berikut di akhir file:
pm2 resurrect</pre>
</div>
<p>Simpan, lalu jalankan</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">source ~/.bashrc</pre>
</div>
<p>&nbsp;</p>
<p>Panduan diatas jika pakai shell /bin/bash</p>
<p>jika pakai /bin/zsh  maka konfigurasi ke file ~/.zshrc</p>
<p>Untuk cek jenis shell yang sedang digunakan jalankan perintah</p>
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}">echo $SHELL</pre>
</div>
<!-- RatingBintangAjaib -->]]></content:encoded>
					
					<wfw:commentRss>https://cahrur.net/cara-install-node-js-di-linux-tanpa-akses-sudo-dan-auto-start-dengan-pm2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
