<?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>freebsd12 Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/freebsd12/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 02 Mar 2020 00:58:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to install Go Language on FreeBSD 12?</title>
		<link>https://www.osradar.com/how-to-install-go-language-freebsd-12/</link>
					<comments>https://www.osradar.com/how-to-install-go-language-freebsd-12/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 06 Mar 2020 00:56:00 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[freebsd12]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[GoLang]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=18767</guid>

					<description><![CDATA[<p>Hi, friends in this post, you will learn how to install Go on FreeBSD 12. This popular programming language is gaining more and more followers every day. Go is an open source (BSD license) programming language that was born with the objective of allowing the creation of efficient and easily distributable applications. So, it has [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-go-language-freebsd-12/">How to install Go Language on FreeBSD 12?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi, friends in this post, you will learn how to install Go on <a href="https://www.osradar.com/tag/freebsd/" target="_blank" rel="noopener noreferrer">FreeBSD</a> 12. This popular programming language is gaining more and more followers every day.</p>
<p><a href="https://golang.org" rel="noopener">Go</a> is an open source (<a href="https://golang.org/LICENSE" rel="noopener">BSD license</a>) programming language that was born with the objective of allowing the creation of efficient and easily distributable applications. So, it has binaries for Windows, Mac OS and of course, for Linux.</p>
<p>One of the main features of Go is the efficiency with which it manages computer resources. To the extent that many claims to be the natural replacement of C.</p>
<p>On the other hand, Go is a compiled language and has a garbage collector that tries to reduce the latency to the minimum guaranteeing optimal performance.</p>
<p>For this and many other reasons is that more and more developers have it as their main language.</p>
<h2>Install Go language on FreeBSD 12</h2>
<p>One of the main advantages of FreeBSD is that it has a large number of packages available from the official repositories. However, not all of them are up-to-date.</p>
<p>So in this post, we will download and install the latest stable version of Go which is 1.14.</p>
<p>First, open a terminal session. Once you have it open, you need to install curl to download Go.</p>
<pre>:~$ sudo pkg install curl
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
	curl: 7.67.0
	ca_root_nss: 3.50
Number of packages to be installed: 2
The process will require 4 MiB more space.
1 MiB to be downloaded.
Proceed with this action? [y/N]: y</pre>
<figure id="attachment_18776" aria-describedby="caption-attachment-18776" style="width: 691px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18776" src="https://www.osradar.com/wp-content/uploads/2020/03/1.png" alt="1.- Install curl on FreeBSD 12" width="691" height="270" srcset="https://www.osradar.com/wp-content/uploads/2020/03/1.png 691w, https://www.osradar.com/wp-content/uploads/2020/03/1-300x117.png 300w" sizes="(max-width: 691px) 100vw, 691px" /><figcaption id="caption-attachment-18776" class="wp-caption-text">1.- Install curl on FreeBSD 12</figcaption></figure>
<p>Once you have installed curl, we can start the download of Go with the following command:</p>
<pre>:~$ curl https://dl.google.com/go/go1.14.freebsd-amd64.tar.gz --output go.tar.gz</pre>
<figure id="attachment_18777" aria-describedby="caption-attachment-18777" style="width: 765px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-18777 size-full" src="https://www.osradar.com/wp-content/uploads/2020/03/2.png" alt="2.- Download Go language on FreeBSD 12" width="765" height="144" srcset="https://www.osradar.com/wp-content/uploads/2020/03/2.png 765w, https://www.osradar.com/wp-content/uploads/2020/03/2-300x56.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/2-696x131.png 696w" sizes="(max-width: 765px) 100vw, 765px" /><figcaption id="caption-attachment-18777" class="wp-caption-text">2.- Download Go language on FreeBSD 12</figcaption></figure>
<p>When the download is finished we have to unzip it and move it to the /usr/local/ directory</p>
<pre>:~$ tar xvf go.tar.gz
:~$ sudo mv go /usr/local</pre>
<p>Go is ready for action, but it is convenient to make it available globally in our terminal. To do this, you have to edit the profile file.</p>
<pre>:~$ sudo nano ~/.profile</pre>
<p>And add the following content at the end:</p>
<pre>export GOROOT=/usr/local/go 
export GOPATH=$HOME/work/
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH</pre>
<figure id="attachment_18778" aria-describedby="caption-attachment-18778" style="width: 608px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18778" src="https://www.osradar.com/wp-content/uploads/2020/03/3.png" alt="3.- Configuring go" width="608" height="260" srcset="https://www.osradar.com/wp-content/uploads/2020/03/3.png 608w, https://www.osradar.com/wp-content/uploads/2020/03/3-300x128.png 300w" sizes="(max-width: 608px) 100vw, 608px" /><figcaption id="caption-attachment-18778" class="wp-caption-text">3.- Configuring go</figcaption></figure>
<p>I&#8217;ll explain something quickly. The second line refers to a folder called &#8220;work&#8221; in that folder is where we have to include all our Go projects. Of course, you can replace the name &#8220;work&#8221; with whatever you want.</p>
<p>Save the changes and close the file.</p>
<p>Now you can see the version of Go installed with the following command:</p>
<pre>:~$ go version
go version go1.14 freebsd/amd64</pre>
<figure id="attachment_18780" aria-describedby="caption-attachment-18780" style="width: 845px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18780" src="https://www.osradar.com/wp-content/uploads/2020/03/5.png" alt="5.- Go 1.14 installed" width="845" height="189" srcset="https://www.osradar.com/wp-content/uploads/2020/03/5.png 845w, https://www.osradar.com/wp-content/uploads/2020/03/5-300x67.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/5-768x172.png 768w, https://www.osradar.com/wp-content/uploads/2020/03/5-696x156.png 696w" sizes="(max-width: 845px) 100vw, 845px" /><figcaption id="caption-attachment-18780" class="wp-caption-text">5.- Go 1.14 installed</figcaption></figure>
<p>This indicates that Go is available from the console no matter where the prompt is located.</p>
<h2>Testing Go</h2>
<p>Now that Go is installed, let&#8217;s do the classic Hello World program to check that everything is okay.</p>
<p>First, we&#8217;ll create the project folders. Remember that it will be inside the work folder. Inside it, the project folder and inside it, the src folder where we will create the source file.</p>
<pre>:~$ mkdir -p $HOME/work/src/hello</pre>
<p>Then, create the source file and add the following content</p>
<pre>:~$ nano ~/work/src/hello/hello.go
package main 
 import "fmt"
 func main() {
 fmt.Printf("hello, world\n")
 }

</pre>
<figure id="attachment_18781" aria-describedby="caption-attachment-18781" style="width: 845px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18781" src="https://www.osradar.com/wp-content/uploads/2020/03/5-1.png" alt="5.- Creating the hello world program in Go language" width="845" height="189" srcset="https://www.osradar.com/wp-content/uploads/2020/03/5-1.png 845w, https://www.osradar.com/wp-content/uploads/2020/03/5-1-300x67.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/5-1-768x172.png 768w, https://www.osradar.com/wp-content/uploads/2020/03/5-1-696x156.png 696w" sizes="(max-width: 845px) 100vw, 845px" /><figcaption id="caption-attachment-18781" class="wp-caption-text">5.- Creating the hello world program in Go language</figcaption></figure>
<p>Finally, we build the project, compile the source code and execute it:</p>
<pre>:~$ go build hello
:~$ go install hello
:~$ hello
hello, world</pre>
<figure id="attachment_18782" aria-describedby="caption-attachment-18782" style="width: 789px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18782" src="https://www.osradar.com/wp-content/uploads/2020/03/6.png" alt="6.- Go language on FreeBSD 12" width="789" height="125" srcset="https://www.osradar.com/wp-content/uploads/2020/03/6.png 789w, https://www.osradar.com/wp-content/uploads/2020/03/6-300x48.png 300w, https://www.osradar.com/wp-content/uploads/2020/03/6-768x122.png 768w, https://www.osradar.com/wp-content/uploads/2020/03/6-696x110.png 696w" sizes="(max-width: 789px) 100vw, 789px" /><figcaption id="caption-attachment-18782" class="wp-caption-text">6.- Go language on FreeBSD 12</figcaption></figure>
<p>So, Go is ready to use.</p>
<h2>Conclusion</h2>
<p>There are many programming languages but there is always room for innovation and that is what Go gives us. An efficient language and with the support of a giant like Google.</p>
<p>Please share this post and join <a href="https://t.me/osradar" target="_blank" rel="noopener noreferrer">our Telegram channel.</a></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-go-language-freebsd-12/">How to install Go Language on FreeBSD 12?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-go-language-freebsd-12/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install PostgreSQL on FreeBSD 12</title>
		<link>https://www.osradar.com/install-postgresql-freebsd-12/</link>
					<comments>https://www.osradar.com/install-postgresql-freebsd-12/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sat, 22 Feb 2020 00:02:00 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[freebsd12]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[unix]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=17980</guid>

					<description><![CDATA[<p>To develop great applications you need a great database manager. So, that is why in this post I will teach you how to install PostgreSQL 12 on FreeBSD 12. PostgreSQL PostgreSQL is one of the most advanced and modern relational database managers out there. It is always shown as the immediate competitor of MySQL and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-postgresql-freebsd-12/">Install PostgreSQL on FreeBSD 12</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>To develop great applications you need a great database manager. So, that is why in this post <strong>I will teach you how to install PostgreSQL 12 on FreeBSD 12.</strong></p>
<h2>PostgreSQL</h2>
<p><a href="https://www.postgresql.org/">PostgreSQL</a> is one of the most advanced and modern relational database managers out there. It is always shown as the immediate competitor of <a href="https://www.osradar.com/tag/mysql/">MySQL</a> and <a href="https://www.osradar.com/tag/mysql/">MariaDB</a> in the segment of open source and community database managers.</p>
<p>One of the main advantages of using PostgreSQL is that it has extensive documentation and supports powerful features. All this in an open-source and free application.</p>
<p>And recently version 12 has been released. If you want to know more about it read our post about it.</p>
<p><a href="https://www.osradar.com/postgresql-12-is-available/" target="_blank" rel="noreferrer noopener" aria-label="PostgreSQL 12.0 is available (opens in a new tab)">PostgreSQL 12.0 is available</a></p>
<p>This new version includes security improvements and interesting new features so it&#8217;s a good idea to install it.</p>
<p>So, let us start.</p>
<h2>Install PostgreSQL on FreeBSD 12</h2>
<p>In this guide, we will use commands that require you to be root. In this case, we will choose a user with privileges to use sudo. In case your user can&#8217;t do it, you can read our post.</p>
<p>How to enable sudo on FreeBSD 12.</p>
<p>If you are already the root user, you can simply remove the word sudo from the following commands.</p>
<p>The first step is to upgrade the system completely. To do this, open your FreeBSD terminal and run the following command:</p>
<pre>:~$ sudo pkg update</pre>
<p>After this, the system will be ready for work.</p>
<p>The goal of this post is to install PostgreSQL 12 on FreeBSD but in the official repositories, we have several versions of PostgeSQL.</p>
<pre>:~$ sudo pkg search ^postgresql |grep -i server
postgresql10-server-10.11      PostgreSQL is the most advanced open-source database available anywhere
postgresql11-server-11.6       PostgreSQL is the most advanced open-source database available anywhere
postgresql12-server-12.1       PostgreSQL is the most advanced open-source database available anywhere
postgresql94-server-9.4.25     PostgreSQL is the most advanced open-source database available anywhere
postgresql95-server-9.5.20     PostgreSQL is the most advanced open-source database available anywhere
postgresql96-server-9.6.16     PostgreSQL is the most advanced open-source database available anywhere</pre>
<figure id="attachment_18076" aria-describedby="caption-attachment-18076" style="width: 918px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18076" src="https://www.osradar.com/wp-content/uploads/2020/02/1-3.png" alt="1.- PostgreSQL on the FreeBSD repository" width="918" height="167" srcset="https://www.osradar.com/wp-content/uploads/2020/02/1-3.png 918w, https://www.osradar.com/wp-content/uploads/2020/02/1-3-300x55.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/1-3-768x140.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/1-3-696x127.png 696w" sizes="(max-width: 918px) 100vw, 918px" /><figcaption id="caption-attachment-18076" class="wp-caption-text">1.- PostgreSQL on the FreeBSD repository</figcaption></figure>
<p>The above command performs a search of the PostgreSQL package repositories but refines the search to server.</p>
<p>As you can see, versions 9.4, 9.5, 9.6,10,11 and 12 are available. Let&#8217;s install the version 12. To do so, run the following:</p>
<pre>:~$ sudo pkg install postgresql12-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 5 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	postgresql12-server: 12.1
	icu: 65.1,1
	postgresql12-client: 12.1
	perl5: 5.30.1
	readline: 8.0.1

Number of packages to be installed: 5

The process will require 141 MiB more space.
31 MiB to be downloaded.

Proceed with this action? [y/N]:</pre>
<figure id="attachment_18077" aria-describedby="caption-attachment-18077" style="width: 873px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18077" src="https://www.osradar.com/wp-content/uploads/2020/02/2-3.png" alt="2.- Install PostgreSQL on FreeBSD 12" width="873" height="383" srcset="https://www.osradar.com/wp-content/uploads/2020/02/2-3.png 873w, https://www.osradar.com/wp-content/uploads/2020/02/2-3-300x132.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/2-3-768x337.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/2-3-696x305.png 696w" sizes="(max-width: 873px) 100vw, 873px" /><figcaption id="caption-attachment-18077" class="wp-caption-text">2.- Install PostgreSQL on FreeBSD 12</figcaption></figure>
<p>Then, the installation will start normally.</p>
<figure id="attachment_18079" aria-describedby="caption-attachment-18079" style="width: 920px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18079" src="https://www.osradar.com/wp-content/uploads/2020/02/3-3.png" alt="3.- Installation is finished" width="920" height="672" srcset="https://www.osradar.com/wp-content/uploads/2020/02/3-3.png 920w, https://www.osradar.com/wp-content/uploads/2020/02/3-3-300x219.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/3-3-768x561.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/3-3-696x508.png 696w, https://www.osradar.com/wp-content/uploads/2020/02/3-3-575x420.png 575w" sizes="(max-width: 920px) 100vw, 920px" /><figcaption id="caption-attachment-18079" class="wp-caption-text">3.- Installation is finished</figcaption></figure>
<p>Once the installation is complete, the first thing to do is to get PostgreSQL started with the system. This is not mandatory but it is convenient in many cases.</p>
<p>So to do this, edit the <code>/etc/rc.conf</code> file</p>
<pre>:~$ sudo nano /etc/rc.conf</pre>
<p>Now add the following:</p>
<pre>postgresql_enable="YES"</pre>
<figure id="attachment_18078" aria-describedby="caption-attachment-18078" style="width: 818px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18078" src="https://www.osradar.com/wp-content/uploads/2020/02/4-2.png" alt="4.- Enabling the PostgreSQL service" width="818" height="174" srcset="https://www.osradar.com/wp-content/uploads/2020/02/4-2.png 818w, https://www.osradar.com/wp-content/uploads/2020/02/4-2-300x64.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/4-2-768x163.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/4-2-696x148.png 696w" sizes="(max-width: 818px) 100vw, 818px" /><figcaption id="caption-attachment-18078" class="wp-caption-text">4.- Enabling the PostgreSQL service</figcaption></figure>
<p>Save the changes and close the file. In case you don&#8217;t have nano installed, you can do it with the following command:</p>
<pre>:~$ sudo pkg install nano</pre>
<p>Before starting the PostgreSQL service the default database must be initialized. To do this, run the following command:</p>
<pre>:~$ sudo service postgresql initdb
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /var/db/postgres/data12 ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... America/Caracas
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /usr/local/bin/pg_ctl -D /var/db/postgres/data12 -l logfile start</pre>
<figure id="attachment_18080" aria-describedby="caption-attachment-18080" style="width: 946px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18080" src="https://www.osradar.com/wp-content/uploads/2020/02/5-2.png" alt="5.- Configuring PostgreSQL" width="946" height="515" srcset="https://www.osradar.com/wp-content/uploads/2020/02/5-2.png 946w, https://www.osradar.com/wp-content/uploads/2020/02/5-2-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/5-2-768x418.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/5-2-696x379.png 696w, https://www.osradar.com/wp-content/uploads/2020/02/5-2-771x420.png 771w" sizes="(max-width: 946px) 100vw, 946px" /><figcaption id="caption-attachment-18080" class="wp-caption-text">5.- Configuring PostgreSQL</figcaption></figure>
<p>And now you can start the PostgreSQL service with the following command:</p>
<pre>:~$ sudo service postgresql start
2020-02-05 14:52:37.731 -04 [869] LOG:  starting PostgreSQL 12.1 on amd64-portbld-freebsd12.0, compiled by FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1), 64-bit
2020-02-05 14:52:37.732 -04 [869] LOG:  listening on IPv6 address "::1", port 5432
2020-02-05 14:52:37.732 -04 [869] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2020-02-05 14:52:37.735 -04 [869] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2020-02-05 14:52:37.749 -04 [869] LOG:  ending log output to stderr
2020-02-05 14:52:37.749 -04 [869] HINT:  Future log output will go to log destination "syslog".</pre>
<figure id="attachment_18081" aria-describedby="caption-attachment-18081" style="width: 946px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18081" src="https://www.osradar.com/wp-content/uploads/2020/02/5-3.png" alt="5.- Starting the service" width="946" height="515" srcset="https://www.osradar.com/wp-content/uploads/2020/02/5-3.png 946w, https://www.osradar.com/wp-content/uploads/2020/02/5-3-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/5-3-768x418.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/5-3-696x379.png 696w, https://www.osradar.com/wp-content/uploads/2020/02/5-3-771x420.png 771w" sizes="(max-width: 946px) 100vw, 946px" /><figcaption id="caption-attachment-18081" class="wp-caption-text">5.- Starting the service</figcaption></figure>
<p>Finally, access the PostgreSQL console with the following command:</p>
<pre>:~$ sudo -u postgres psql</pre>
<figure id="attachment_18082" aria-describedby="caption-attachment-18082" style="width: 812px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18082" src="https://www.osradar.com/wp-content/uploads/2020/02/6-1.png" alt="6.- PostgreSQL properly running on FreeBSD 12" width="812" height="142" srcset="https://www.osradar.com/wp-content/uploads/2020/02/6-1.png 812w, https://www.osradar.com/wp-content/uploads/2020/02/6-1-300x52.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/6-1-768x134.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/6-1-696x122.png 696w" sizes="(max-width: 812px) 100vw, 812px" /><figcaption id="caption-attachment-18082" class="wp-caption-text">6.- PostgreSQL properly running on FreeBSD 12</figcaption></figure>
<p>As you can see you can already use PostgreSQL 12 on FreeBSD without problems.</p>
<h2>Conclusion</h2>
<p>PostgreSQL is perhaps the best open source database manager and this consideration has not been given away. It has been earned with many jobs and above all with extraordinary performance. Now you know how to install it on FreeBSD 12.</p>
<p>Share this post and join <a href="https://t.me/osradar" target="_blank" rel="noopener noreferrer">our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-postgresql-freebsd-12/">Install PostgreSQL on FreeBSD 12</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-postgresql-freebsd-12/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>How to install MariaDB on FreeBSD 12?</title>
		<link>https://www.osradar.com/how-to-install-mariadb-on-freebsd-12/</link>
					<comments>https://www.osradar.com/how-to-install-mariadb-on-freebsd-12/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Mon, 17 Feb 2020 00:11:00 +0000</pubDate>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[freebsd12]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mariadb]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=18133</guid>

					<description><![CDATA[<p>They say behind a great application is a great database manager. This applies to applications designed to solve a major problem within an organization or management applications. An example of this is WordPress, a powerful CMS that uses MariaDB as a data handler. So today I will show you how to install MariaDB on FreeBSD. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-mariadb-on-freebsd-12/">How to install MariaDB on FreeBSD 12?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>They say behind a great application is a great database manager. This applies to applications designed to solve a major problem within an organization or management applications. An example of this is WordPress, a powerful CMS that uses MariaDB as a data handler. So today <strong>I will show you how to install MariaDB on FreeBSD</strong>.</p>
<h2>Why the combination of MariaDB and FreeBSD?</h2>
<p>FreeBSD is a Unix based system that for many experts is even more secure than Linux. And we already know that Linux is widely used in servers around the world, however, more and more people are using FreeBSD on them.</p>
<p>On the other hand, on many servers, there is an instance of some SQL database manager like MariaDB. Also being this one of the most used database managers in the world along with <a href="https://www.osradar.com/tag/mysql/" target="_blank" rel="noopener noreferrer">MySQL</a> and <a href="https://www.osradar.com/tag/postgresql/" target="_blank" rel="noopener noreferrer">PostgreSQL</a>, it is not surprising that you want to install it on FreeBSD 12.</p>
<p>So the combination between MariaDB and FreeBSD 12 as a database server is a sure success in security.</p>
<p>So let&#8217;s go for it.</p>
<h2>Install MariaDB on FreeBSD 12</h2>
<p>For this guide, we will use the sudo command, therefore, it must be enabled. So we recommend you to read:</p>
<p><a href="https://www.osradar.com/enable-sudo-on-freebsd-12/" target="_blank" rel="noopener noreferrer">How to enable sudo on FreeBSD 12?</a></p>
<p>So, open a terminal session or connect to the computer using SSH.</p>
<p>Then, update the whole system with the following command:</p>
<pre>:~$ sudo pkg update</pre>
<p>Once all security patches are installed, the system is ready to continue.</p>
<p>The purpose of this guide is to install MariaDB but there are several versions in the official FreeBSD 12 repositories. However, we will install the last one which is 10.4.</p>
<p>To do this, run the following command:</p>
<pre>:~$ sudo pkg install mariadb104-server mariadb104-client php74-mysqli
Updating FreeBSD repository catalogue... 
FreeBSD repository is up to date. 
All repositories are up to date. 
The following 9 package(s) will be affected (of 0 checked):

New packages to be INSTALLED: 
mariadb104-server: 10.4.12 
mariadb104-client: 10.4.12 
php74-mysqli: 7.4.2 
libedit: 3.1.20191211,1 
unixODBC: 2.3.7 
galera26: 26.4.2_1 
boost-libs: 1.72.0 
icu: 65.1,1 
libiconv: 1.14_11

Number of packages to be installed: 9

The process will require 472 MiB more space. 
57 MiB to be downloaded.

Proceed with this action? [y/N]:</pre>
<figure id="attachment_18171" aria-describedby="caption-attachment-18171" style="width: 790px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18171" src="https://www.osradar.com/wp-content/uploads/2020/02/8-3.png" alt="1.- Install MariaDB on FreeBSD 12" width="790" height="429" srcset="https://www.osradar.com/wp-content/uploads/2020/02/8-3.png 790w, https://www.osradar.com/wp-content/uploads/2020/02/8-3-300x163.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/8-3-768x417.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/8-3-696x378.png 696w, https://www.osradar.com/wp-content/uploads/2020/02/8-3-773x420.png 773w" sizes="(max-width: 790px) 100vw, 790px" /><figcaption id="caption-attachment-18171" class="wp-caption-text">1.- Install MariaDB on FreeBSD 12</figcaption></figure>
<p>Once installed, it is most convenient to enable the service to start with the system. In short, MariaDB will run when the computer starts up.</p>
<pre>:~$ sudo sysrc mysql_enable="yes"
mysql_enable: -&gt; yes</pre>
<p>And then the service begins.</p>
<pre>:~$ sudo service mysql-server start

Installing MariaDB/MySQL system tables in '/var/db/mysql' ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system


Two all-privilege accounts were created.
One is root@localhost, it has no password, but you need to
be system 'root' user to connect. Use, for example, sudo mysql
The second is root@localhost, it has no password either, but
you need to be the system 'root' user to connect.
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr/local' ; /usr/local/bin/mysqld_safe --datadir='/var/db/mysql'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/local/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
<blockquote class="wp-embedded-content" data-secret="ovF6ixk8Ay"><a href="https://mariadb.org/get-involved/">Get Involved</a></blockquote><iframe title="&#8220;Get Involved&#8221; &#8212; MariaDB.org" class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" src="https://mariadb.org/get-involved/embed/#?secret=ovF6ixk8Ay" data-secret="ovF6ixk8Ay" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>

Starting mysql.</pre>
<figure id="attachment_18172" aria-describedby="caption-attachment-18172" style="width: 1083px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18172" src="https://www.osradar.com/wp-content/uploads/2020/02/9-3.png" alt="2.- Working with the MariaDB service" width="1083" height="656" srcset="https://www.osradar.com/wp-content/uploads/2020/02/9-3.png 1083w, https://www.osradar.com/wp-content/uploads/2020/02/9-3-300x182.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/9-3-1024x620.png 1024w, https://www.osradar.com/wp-content/uploads/2020/02/9-3-768x465.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/9-3-696x422.png 696w, https://www.osradar.com/wp-content/uploads/2020/02/9-3-1068x647.png 1068w, https://www.osradar.com/wp-content/uploads/2020/02/9-3-693x420.png 693w" sizes="(max-width: 1083px) 100vw, 1083px" /><figcaption id="caption-attachment-18172" class="wp-caption-text">2.- Working with the MariaDB service</figcaption></figure>
<p>Now you have to assign a password to the root user. To do this we&#8217;ll use the mysql_secure_installation script. Execute it and assign a password to the root user.</p>
<pre>:~$ sudo /usr/local/bin/mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

Switch to unix_socket authentication [Y/n] y
Enabled successfully!
Reloading privilege tables..
 ... Success!

You already have your root account protected, so you can safely answer 'n'.

Change the root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!</pre>
<p>Then, answer the configuration questions. In my case, I answered yes to everything.</p>
<pre>By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!</pre>
<figure id="attachment_18173" aria-describedby="caption-attachment-18173" style="width: 940px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18173" src="https://www.osradar.com/wp-content/uploads/2020/02/10-3.png" alt="3.- Configuring MariaDB on FreeBSD" width="940" height="658" srcset="https://www.osradar.com/wp-content/uploads/2020/02/10-3.png 940w, https://www.osradar.com/wp-content/uploads/2020/02/10-3-300x210.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/10-3-768x538.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/10-3-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2020/02/10-3-696x487.png 696w, https://www.osradar.com/wp-content/uploads/2020/02/10-3-600x420.png 600w" sizes="(max-width: 940px) 100vw, 940px" /><figcaption id="caption-attachment-18173" class="wp-caption-text">3.- Configuring MariaDB on FreeBSD</figcaption></figure>
<p>Now MariaDB is ready for you to use it.</p>
<pre>:~$ sudo mysql -u root -p</pre>
<figure id="attachment_18174" aria-describedby="caption-attachment-18174" style="width: 865px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-18174" src="https://www.osradar.com/wp-content/uploads/2020/02/11-1.png" alt="4.- MariaDB is ready for the action" width="865" height="231" srcset="https://www.osradar.com/wp-content/uploads/2020/02/11-1.png 865w, https://www.osradar.com/wp-content/uploads/2020/02/11-1-300x80.png 300w, https://www.osradar.com/wp-content/uploads/2020/02/11-1-768x205.png 768w, https://www.osradar.com/wp-content/uploads/2020/02/11-1-696x186.png 696w" sizes="(max-width: 865px) 100vw, 865px" /><figcaption id="caption-attachment-18174" class="wp-caption-text">4.- MariaDB is ready for the action</figcaption></figure>
<p>And that is it.</p>
<h2>Conclusion</h2>
<p>MariaDB is one of the most stable and robust database managers in the world. Installing it on FreeBSD 12 gives us a stable computer to run it on. And today thanks to this post you have learned how to do it.</p>
<p>Please share this post and join<a href="https://t.me/osradar" target="_blank" rel="noopener noreferrer"> our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-mariadb-on-freebsd-12/">How to install MariaDB on FreeBSD 12?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-mariadb-on-freebsd-12/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
