<?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>tutorial golang &#8211; Cahrur.Net</title>
	<atom:link href="https://cahrur.net/tag/tutorial-golang/feed/" rel="self" type="application/rss+xml" />
	<link>https://cahrur.net</link>
	<description>Blog Official Cahrur Rozid</description>
	<lastBuildDate>Tue, 05 Nov 2024 13:40:32 +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>tutorial golang &#8211; Cahrur.Net</title>
	<link>https://cahrur.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Panduan Instalasi GOlang / Deploy Projek Golang di Cyberpanel</title>
		<link>https://cahrur.net/panduan-instalasi-golang-deploy-projek-golang-di-cyberpanel/</link>
					<comments>https://cahrur.net/panduan-instalasi-golang-deploy-projek-golang-di-cyberpanel/#respond</comments>
		
		<dc:creator><![CDATA[Cahrur Rozid]]></dc:creator>
		<pubDate>Tue, 05 Nov 2024 13:40:32 +0000</pubDate>
				<category><![CDATA[Golang]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[deploy golang]]></category>
		<category><![CDATA[deploy golang di cyberpanel]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[golang]]></category>
		<category><![CDATA[install golang]]></category>
		<category><![CDATA[install golang di cyberpanel]]></category>
		<category><![CDATA[setup golang di cyberpanel]]></category>
		<category><![CDATA[tutorial golang]]></category>
		<guid isPermaLink="false">https://cahrur.net/?p=419</guid>

					<description><![CDATA[Panduan Step by Step untuk Instalasi GOlang / Deploy Projek Golang di Cyberpanel Prasyarat: Bisa pakai root atau user akses ... <p class="read-more-container"><a title="Panduan Instalasi GOlang / Deploy Projek Golang di Cyberpanel" class="read-more button" href="https://cahrur.net/panduan-instalasi-golang-deploy-projek-golang-di-cyberpanel/#more-419" aria-label="Read more about Panduan Instalasi GOlang / Deploy Projek Golang di Cyberpanel">Read more</a></p>]]></description>
										<content:encoded><![CDATA[<div class="cahru-before-content" id="cahru-1321191956"><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 dir="auto" tabindex="-1">Panduan Step by Step untuk Instalasi GOlang / Deploy Projek Golang di Cyberpanel</p>
<p class="heading-element" dir="auto" tabindex="-1"><strong>Prasyarat:</strong></p>
<p dir="auto" tabindex="-1">Bisa pakai root atau user akses ssh, pastikan Anda telah menginstal:</p>
<ul dir="auto">
<li>Git</li>
<li>Wget</li>
</ul>
<h2>A. Langkah-langkah Instalasi Go</h2>
<ol>
<li>Buat Website, dan aktifkan ssh akses</li>
<li>Akses ssh / terminal yang telah dibuat, bisa pakai putty atau termius</li>
<li>Download Go
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&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;}">wget https://golang.org/dl/go1.23.2.linux-amd64.tar.gz</pre>
</div>
<p>Buat direktori untuk simpan go</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;}">mkdir go</pre>
</div>
</li>
<li>Ekstrak Go ke Direktori yang telah dibuat
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&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;}">tar -C /home/namadomain.com/go -xzf go1.23.2.linux-amd64.tar.gz</pre>
</div>
</li>
<li>Konfigurasi PATH
<div class="wp-block-codemirror-blocks code-block ">
<pre class="CodeMirror" data-setting="{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text/x-sh&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;}">Jalankan perintah : echo "export PATH=$PATH:/home/namadomain.com/go/go/bin" &gt;&gt; ~/.profile</pre>
</div>
</li>
<li>Muat Ulang Profil
<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 ~/.profile</pre>
</div>
</li>
<li>Verifikasi Instalasi Go
<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;}">go version</pre>
</div>
</li>
</ol>
<h2>B. Setup Projek Golang</h2>
<ol>
<li>Bisa clone via github atau uploud file projek via filemanager cyberpanel ( direktori bebas asalkan didalam public_html)</li>
<li>Instal Depedensi
<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;}">go mod tidy</pre>
</div>
</li>
<li>Jalankan Aplikasi di Latar Belakang ( agar aplikasi go nya selalu aktif meskipun terminal di close )
<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</pre>
</div>
<p>public_html  sesuikan dengan lokasi tempat projek<br />
Kemudian 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;}">nohup go run main.go &gt; output.log 2&gt;&amp;1 &amp;</pre>
</div>
</li>
<li>Memeriksa Proses yang Berjalan
<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;}">lsof -i :3000</pre>
</div>
<p>port 3000 ganti sesuai projek anda</li>
<li>Menghentikan Aplikasi / proses berjalan
<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;}">kill -9 &lt;PID&gt;</pre>
</div>
<p>PID ganti dengan id PID yang ingin di hentikan</li>
</ol>
<h2>C. Konfigurasi Projek GOlang agar bisa diakses public via domain / IP</h2>
<ol>
<li>Open port OpenLitespeed Pada dashboard cyberpanel, buka menu security &gt; Firewall &gt; Jika status off silahkan di on dulu.<br />
Tambahkan port 7080 &gt; protocol : tcp &gt;&gt; IP address : 0.0.0.0/0 &gt;&gt; Save</li>
<li>Masuk ek Openlitespeed IPServer:7080 atau namadomain:7080</li>
<li>Setting Proxy
<ol>
<li>
<h5>Setting External App</h5>
<ul>
<li>Pilih menu `virtual hosts`&gt; Pilih Domain &gt; External App</li>
<li>Tambahkan baru dengan cara klik icon +</li>
<li>type : Webserver &gt;&gt; next</li>
<li>Nama isi misalkan `apigolang`</li>
<li>Address isi sesuai port, contoh localhost:3000   (portnya sesuaikan)</li>
<li>Max Connection &gt;&gt; 100</li>
<li>Connection Keep-Alive Timeout &gt;&gt; 60</li>
<li>Initial Request Timeout (secs) &gt;&gt; 60</li>
<li>Retry Timeout (secs) &gt;&gt; 0</li>
<li>Response Buffering pilih `No`</li>
<li>Simpan (Klik pada icon save)</li>
</ul>
</li>
<li>
<h5>Membuat Proxy</h5>
<ul>
<li>Masuk ke menu `Context`</li>
<li>Add dengan klik tombol + dan pilih proxy &gt;&gt; Next</li>
<li>Kolom uri isi `/`</li>
<li>Webserver pilih yang disetting pada tahap `a` diatas</li>
<li>Simpan (Klik pada icon save)</li>
</ul>
</li>
<li>
<h5>Restart OpenLiteSpeed (klik icon restart warna hijau)</h5>
</li>
</ol>
</li>
</ol>
<div class="x11i5rnm xat24cr x1mh8g0r x1vvkbs xtlvy1s x126k92a">
<div dir="auto">Done..</div>
</div>
<div class="x11i5rnm xat24cr x1mh8g0r x1vvkbs xtlvy1s x126k92a">
<div dir="auto">Semoga bermanfaat !!</div>
</div>
<div class="x11i5rnm xat24cr x1mh8g0r x1vvkbs xtlvy1s x126k92a">
<div dir="auto">Cari developer ? atau mau buat aplikasi dan website bisa hubungi admin <span class="html-span xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x1hl2dhg x16tdsg8 x1vvkbs"><a class="x1i10hfl xjbqb8w x1ejq31n xd10rxx x1sy0etr x17r0tee x972fbf xcfux6l x1qhh985 xm0m39n x9f619 x1ypdohk xt0psk2 xe8uvvx xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x16tdsg8 x1hl2dhg xggy1nq x1a2a7pz x1sur9pj xkrqix3 x1fey0fg x1s688f" tabindex="0" role="link" href="https://wa.me/6288805640427?fbclid=IwZXh0bgNhZW0CMTAAAR3B3sDJLO-aRCCDSPq22UCQ_S8N3A4fFLFirtkItJ9HdQz6CfGB0J2oSUM_aem_FmDYXVKyQtCVSIuaJXZ_kA" target="_blank" rel="nofollow noopener noreferrer">wa.me/6288805640427</a></span> atau <span class="html-span xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x1hl2dhg x16tdsg8 x1vvkbs"><a class="x1i10hfl xjbqb8w x1ejq31n xd10rxx x1sy0etr x17r0tee x972fbf xcfux6l x1qhh985 xm0m39n x9f619 x1ypdohk xt0psk2 xe8uvvx xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x4uap5 x18d9i69 xkhd6sd x16tdsg8 x1hl2dhg xggy1nq x1a2a7pz x1sur9pj xkrqix3 x1fey0fg x1s688f" tabindex="0" role="link" href="https://tech.mudahdeal.com/?fbclid=IwZXh0bgNhZW0CMTAAAR3bKr_PqsHTDj24AQ_Vj0uV0CdGy0ijYM4R8-I1DZ6LYGPL0GwkzWR9l8A_aem_jxPibKhUztbY5jf4JWzLEw" target="_blank" rel="nofollow noopener noreferrer">https://tech.mudahdeal.com</a></span></div>
</div>
<p>&nbsp;</p>
<!-- RatingBintangAjaib -->]]></content:encoded>
					
					<wfw:commentRss>https://cahrur.net/panduan-instalasi-golang-deploy-projek-golang-di-cyberpanel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
