<?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>Sysadmin Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 10 Jun 2021 17:18:52 +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 Find files in Linux?</title>
		<link>https://www.osradar.com/how-to-find-files-linux/</link>
					<comments>https://www.osradar.com/how-to-find-files-linux/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Mon, 14 Jun 2021 00:16:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tools]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=30544</guid>

					<description><![CDATA[<p>Hello friends. Many users, newcomers to Linux, are curious to use the terminal and it is always good to give them support. But not only them, but other users even being veterans, need to know how to use commands to streamline their tasks. Well, in this post we will teach you How to find files [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-find-files-linux/">How to Find files in Linux?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello friends. Many users, newcomers to Linux, are curious to use the terminal and it is always good to give them support. But not only them, but other users even being veterans, need to know how to use commands to streamline their tasks. Well, in this post we will teach you How to find files in Linux using the terminal.</p>



<p>The <code>find</code> command is a command that searches for files and folders, from the command line, in a directory tree. It is used by many users who work in the terminal and can help even the most veteran users of the system.</p>



<p>So, let’s show you some examples of how to use the command to find files in any Linux distribution.</p>



<h2 id="how-to-find-files-in-linux"><a href="#how-to-find-files-in-linux" name="how-to-find-files-in-linux"></a>How to find files in Linux</h2>



<p>The <code>find</code> command is part of the <a href="https://www.gnu.org/software/coreutils/" target="_blank" rel="noreferrer noopener">GNU Utils</a> so it is available in any Linux distribution you can think of. So like any command, it has a basic syntax which is as follows</p>



<pre class="wp-block-preformatted">find [path] [parameters] [values] [values]</pre>



<p>From what we can see, it is simple to use and now we will show some examples</p>



<ul><li><strong>Find a file of which we know the name and extension:</strong></li></ul>



<pre class="wp-block-preformatted">find / -name name.txt </pre>



<p>Replace <code>name</code> with the name of the file. In this case, a file named <code>name.txt</code> will be searched for in the whole system.</p>



<ul><li><strong>Search for files in a particular location.</strong></li></ul>



<pre class="wp-block-preformatted">find /home/angelo/ -name name.txt</pre>



<ul><li><strong>Doing case-insensitive searches</strong></li></ul>



<p>When searching by filename it is common to not remember whether it is upper or lower case. To do this, you can follow the following structure</p>



<pre class="wp-block-preformatted">find /home/angelo -iname name name.txt</pre>



<p>Remember that you can modify the names and parameters to fit your criteria.</p>



<ul><li><strong>Search for directories or folders</strong></li></ul>



<p>To search for directories we must use the <code>type d</code> parameter, it is as simple as this.</p>



<pre class="wp-block-preformatted">find / -type d -name documents</pre>



<p>This will search for all folders named <code>documents</code> in the whole system. Also, you can change the search directory.</p>



<ul><li><strong>Search files by extension</strong></li></ul>



<p>In this case, it is also useful to know how to search for files by extension. In this case, the option that will help us is <code>type f</code>.</p>



<pre class="wp-block-preformatted">find / -type f -name *.sh</pre>



<p>Thus, in the above example, all files with the extension <code>.sh</code> in the system will be searched.</p>



<h3 id="other-examples-of-the-find-command"><a href="#other-examples-of-the-find-command" name="other-examples-of-the-find-command"></a>Other examples of the find command</h3>



<p>It is also useful to know how to search for files by permissions, to do this use the <code>perm</code> parameter and the permission you want to search for.</p>



<pre class="wp-block-preformatted">find / -type f -perm 0775</pre>



<p>or even, permissions different from the specified one</p>



<pre class="wp-block-preformatted">find / -type f ! -perm 775</pre>



<ul><li><strong>Search for empty files or folders</strong></li></ul>



<p>In this case, we can easily do it with these two commands</p>



<pre class="wp-block-preformatted">find / -type f -empty
find / -type d -empty</pre>



<p>The first one works for files and the second one for directories or folders.</p>



<ul><li><strong>Find files according to their modification date</strong></li></ul>



<p>For many sysadmins this can be very useful because we can perform a search according to the time it was modified.</p>



<pre class="wp-block-preformatted">find / -type f -mtime +21</pre>



<p>In this case, all files that are older than 21 days since their last modification will be searched.</p>



<ul><li><strong>Search files according to their size</strong></li></ul>



<p>Also, with the <code>size</code> option we can further filter our search. For example, we can search for files that weigh more than 10Mb.</p>



<pre class="wp-block-preformatted">find / -type f -size +10M</pre>



<p>That is to say, with this we can be more effective.</p>



<p>So, enjoy it.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-find-files-linux/">How to Find files in Linux?</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-find-files-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Docker on Ubuntu 20.04 / Debian 10?</title>
		<link>https://www.osradar.com/install-docker-ubuntu-20-04-debian-10/</link>
					<comments>https://www.osradar.com/install-docker-ubuntu-20-04-debian-10/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 27 May 2020 23:21:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Virtualization]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12707</guid>

					<description><![CDATA[<p>Docker is a fairly popular technology in today&#8217;s sysadmin. It is logical to think because it means a complete change in the way images and applications are distributed. In addition to all this, you can get the most out of many server-based Linux distributions. Therefore, learning about this technology is vital in the modern world. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-docker-ubuntu-20-04-debian-10/">How to install Docker on Ubuntu 20.04 / Debian 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Docker is a fairly popular technology in today&#8217;s sysadmin. It is logical to think because it means a complete change in the way images and applications are distributed. In addition to all this, you can get the most out of many server-based Linux distributions. Therefore, learning about this technology is vital in the modern world. Therefore, in this post, you will learn how to install Docker on Ubuntu 20.04 / Debian 10. There are several premium versions, but in this case, we will use the community version which is more than enough for many cases.</p>
<h2>Docker on the &#8220;new&#8221; world</h2>
<p>Before <a href="https://www.docker.com/" rel="noopener">Docker</a>, the basic way to distribute applications on a server was through a virtual machine. I explain, if you developed an application that required a certain library in <a href="https://www.osradar.com/tag/debian/" rel="noopener">Debian</a> 8 and you had to deploy it on a server, the most logical solution was to create a virtual machine with Debian 8. This was a small problem, having a virtual machine for one or two applications is not adequate. On the other hand, the server had to move several systems at once.</p>
<p>Now with Docker, you can &#8220;package&#8221; that application and its dependencies in the form of a container. These containers are distributed in the form of images that are interpreted by Docker on the server and <strong>can run independently of the system where it was built</strong>.</p>
<p>Likewise, Docker has port and volume isolation to <strong>increase security and integrity between the image and the host system</strong>.</p>
<p>Now, we are going to install Docker on Ubuntu 20.04 / Debian 10.</p>
<h2>Install Docker on Ubuntu 20.04 / Debian 10</h2>
<p>To perform this tutorial, it is necessary to have a user <a href="https://www.osradar.com/how-to-enable-sudo-on-debian-10/" rel="noopener">who has access to sudo</a> or to have the password of the root user. Remember that we are going to do an installation.</p>
<p>On the other hand, the server or computer must have <a href="https://www.osradar.com/termius-is-a-powefull-ssh-client/" rel="noopener">SSH enabled</a>. Although if you have installed Debian 10 Buster with <a href="https://www.osradar.com/how-to-install-debian-10-buster/" rel="noopener">our tutorial</a>, it should already be working.</p>
<h3>1.- Add the Docker Repository</h3>
<p>The easiest and safest way to install Docker on Ubuntu 20.04 / Debian 10 is to use the official Docker repository. This way, we will save time but we will also have Docker updated in an easy and secure way. So this is the officially recommended option.</p>
<p>Before adding the repository, first, you have to install some necessary packages. In a terminal session, run the following command:</p>
<pre>:~$ sudo apt install apt-transport-https  ca-certificates curl gnupg2 software-properties-common</pre>
<p><figure id="attachment_12711" aria-describedby="caption-attachment-12711" style="width: 1354px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12711" src="https://www.osradar.com/wp-content/uploads/2019/07/1-12.png" alt="1.- Install some required package" width="1354" height="339" srcset="https://www.osradar.com/wp-content/uploads/2019/07/1-12.png 1354w, https://www.osradar.com/wp-content/uploads/2019/07/1-12-300x75.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/1-12-768x192.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/1-12-1024x256.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/1-12-696x174.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/1-12-1068x267.png 1068w" sizes="(max-width: 1354px) 100vw, 1354px" /><figcaption id="caption-attachment-12711" class="wp-caption-text">1.- Install some required package</figcaption></figure></p>
<p>The next step is to add the official GPG key to the repository. This ensures that downloaded packages are not compromised.</p>
<p>For Debian 10:</p>
<pre>:~$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
OK</pre>
<p>For Ubuntu 20.04:</p>
<pre>:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Ok</pre>
<p>Using this repository <strong>you can install the test and nightly versions</strong>. However, we will use the stable channel to perform the installation.</p>
<p>For Debian 10:</p>
<pre>:~$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian/ $(lsb_release -cs) stable"</pre>
<p>For Ubuntu 20.04:</p>
<pre>:~$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu/ $(lsb_release -cs) stable"</pre>
<h3>2.- Install Docker CE on Ubuntu 20.04 / Debian 10</h3>
<p>Now that the Docker repository is added correctly, we will be able to update the APT cache.</p>
<pre>:~$ sudo apt update</pre>
<p>Now, using the following command we can install Docker.</p>
<pre>:~$ sudo apt install docker-ce docker-ce-cli containerd.io</pre>
<p><figure id="attachment_12712" aria-describedby="caption-attachment-12712" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-12712 size-full" src="https://www.osradar.com/wp-content/uploads/2019/07/2-10.png" alt="2.- Install Docker on Ubuntu 20.04 / Debian 10" width="1366" height="372" srcset="https://www.osradar.com/wp-content/uploads/2019/07/2-10.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/2-10-300x82.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/2-10-768x209.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/2-10-1024x279.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/2-10-696x190.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/2-10-1068x291.png 1068w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12712" class="wp-caption-text">2.- Install Docker on Ubuntu 20.04 / Debian 10</figcaption></figure></p>
<p><em><strong>Note: If you have several Docker repositories enabled APT will always choose the newest version and this is a stability problem because It would prefer a beta version to a stable one.</strong></em></p>
<h3>3.- Test the Docker installation</h3>
<p>First, we verify that the Docker service is correctly started with this command:</p>
<pre>:~$ sudo systemctl start docker</pre>
<p>If you want Docker starts at the booting:</p>
<pre>:~$ sudo systemctl enable docker</pre>
<p>Next, check the service status:</p>
<pre>:~$ sudo systemctl status docker</pre>
<p><figure id="attachment_12713" aria-describedby="caption-attachment-12713" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12713" src="https://www.osradar.com/wp-content/uploads/2019/07/3-7.png" alt="3.- Docker is running" width="1366" height="355" srcset="https://www.osradar.com/wp-content/uploads/2019/07/3-7.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/3-7-300x78.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/3-7-768x200.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/3-7-1024x266.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/3-7-696x181.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/3-7-1068x278.png 1068w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12713" class="wp-caption-text">3.- Docker is running</figcaption></figure></p>
<p>As you can see, the Docker service is working properly.</p>
<p>Finally, run the docker <code>hello-world</code>.</p>
<pre>:~$ sudo docker run hello-world</pre>
<p><figure id="attachment_12714" aria-describedby="caption-attachment-12714" style="width: 718px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12714" src="https://www.osradar.com/wp-content/uploads/2019/07/4-5.png" alt="4.- Docker Hello world" width="718" height="467" srcset="https://www.osradar.com/wp-content/uploads/2019/07/4-5.png 718w, https://www.osradar.com/wp-content/uploads/2019/07/4-5-300x195.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/4-5-696x453.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/4-5-646x420.png 646w" sizes="(max-width: 718px) 100vw, 718px" /><figcaption id="caption-attachment-12714" class="wp-caption-text">4.- Docker Hello world</figcaption></figure></p>
<p>So, Docker is ready for the action.</p>
<h2>Conclusion</h2>
<p>Docker&#8217;s technology is a wonder if you work with large-scale servers. Its practicality when depleting applications makes it an alternative to virtual machines. And now you have learned to install it on Ubuntu 20.04 / Debian 10.</p>
<p>So, please share this post with your friends and <a href="https://t.me/osradar" rel="noopener noreferrer">join our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-docker-ubuntu-20-04-debian-10/">How to install Docker on Ubuntu 20.04 / Debian 10?</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-docker-ubuntu-20-04-debian-10/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Deploy MySQL using Docker Compose</title>
		<link>https://www.osradar.com/deploy-mysql-using-docker-compose/</link>
					<comments>https://www.osradar.com/deploy-mysql-using-docker-compose/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 20 Nov 2019 23:18:18 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[adminer]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Devops]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=15624</guid>

					<description><![CDATA[<p>Hello. In this post, I will teach you how to deploy MySQL using Docker compose. It will be brief but explained step by step. Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-mysql-using-docker-compose/">Deploy MySQL using Docker Compose</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Hello. In this post, I will teach you how to deploy MySQL using Docker compose. It will be brief but explained step by step.</strong></p>
<p>Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images that we will be able to use in any supported system thanks to the technology of containers. Then,<strong> these steps can be done from any Linux distribution that has installed </strong><a href="https://www.osradar.com/tag/docker/" target="_blank" rel="noreferrer noopener" aria-label="ocker  (opens in a new tab)"><strong>Docker </strong></a><strong>and Docker Compose.</strong></p>
<p>Remember that it is always possible to install MySQL on a server using your precompiled packages, we can easily have the latest version available.</p>
<p>For this tutorial, apart from MySQL, we will also deploy <a href="https://www.osradar.com/install-adminer-debian-10/" target="_blank" rel="noopener noreferrer">Adminer that we talked about earlier</a>. Together you will be able to manage a MySQL server without problems.</p>
<p>So let&#8217;s get to work.</p>
<h2>Install Docker and Docker Compose on Linux</h2>
<p>The first step is to have Docker installed in the system, obviously.</p>
<ul>
<li>If you are using Ubuntu: <a href="https://www.osradar.com/how-to-install-docker-on-ubuntu-18-04/" target="_blank" rel="noreferrer noopener">How to install Docker on Ubuntu 18.04?</a></li>
<li>For CentOS 8: <a href="https://www.osradar.com/install-docker-centos-8/" target="_blank" rel="noreferrer noopener">How to install Docker on CentOS 8?</a></li>
<li>For CentOS 7: <a href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/" target="_blank" rel="noreferrer noopener">How to install Docker CE on CentOS 7?</a></li>
<li>If you use Windows: <a href="https://www.osradar.com/how-to-install-docker-in-windows-10/" target="_blank" rel="noreferrer noopener">How to install Docker in Windows 10?</a></li>
<li>Or, if you are using Debian 10: <a href="https://www.osradar.com/install-docker-on-debian-10/" target="_blank" rel="noreferrer noopener">How to install Docker on Debian 10?</a></li>
</ul>
<p>And using your distribution’s package manager, you can install Docker Compose. For example:</p>
<pre class="wp-block-preformatted">:~$ sudo apt docker-compose</pre>
<p>For Debian, Ubuntu and derivatives.</p>
<pre class="wp-block-preformatted">:~$ sudo dnf install docker-compose</pre>
<p>Or, for RHEL, CentOS and derivatives.</p>
<h2>Deploy MySQL using Docker Compose</h2>
<p>Well, it&#8217;s time to work. First create a folder called mysql and access it.</p>
<pre>:~$ mkdir mysql<br />:~$ cd mkdir</pre>
<p>Inside it, we will create the docker compose file called <code>docker-compose.yml</code>.</p>
<pre>:~$ nano docker-compose.yml</pre>
<p>Once you have created the file, you need to add the following content:</p>
<pre>version: '3.1'<br /><br />services:<br /><br />  db:<br />    image: mysql:latest<br />    command: --default-authentication-plugin=mysql_native_password<br />    restart: always<br />    environment:<br />      MYSQL_ROOT_PASSWORD: angelo123<br />      MYSQL_DATABASE: example<br />      MYSQL_USER: angelo<br />      MYSQL_PASSWORD: angelo123<br />    volumes:<br />      /home/angelo/mysqldata:/var/lib/mysql<br /><br />  adminer:<br />    image: adminer<br />    restart: always<br />    ports:<br />      - 8080:8080</pre>
<figure id="attachment_15687" aria-describedby="caption-attachment-15687" style="width: 870px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15687" src="https://www.osradar.com/wp-content/uploads/2019/11/1-12.png" alt="1.- Docker compose file to deploy MySQL" width="870" height="445" srcset="https://www.osradar.com/wp-content/uploads/2019/11/1-12.png 870w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-300x153.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-768x393.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-696x356.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-821x420.png 821w" sizes="(max-width: 870px) 100vw, 870px" /><figcaption id="caption-attachment-15687" class="wp-caption-text">1.- Docker compose file to deploy MySQL</figcaption></figure>
<p>I now proceed to explain briefly.</p>
<p>First, we deploy a service called db that contains the information to install MySQL. First, we use the image of the latest version of MySQL. Inside the environment section we define the necessary variables to start the service. In this section, you define things<strong> like the password of the root user, the regular user and the user name as well as the name of the initial database.</strong></p>
<p>An important aspect is the volume that allows us to have access to the database in the host system. This folder must be created before the execution of the file.</p>
<p>In the end, we deploy Adminer using port 8080, obviously you can change this.</p>
<p>So, create the volume folder:</p>
<pre>:~$ mkdir /home/angelo/mysqldata</pre>
<p>Then, run Docker Compose.</p>
<pre>:~$ sudo docker-compose up -d</pre>
<figure id="attachment_15688" aria-describedby="caption-attachment-15688" style="width: 1039px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15688" src="https://www.osradar.com/wp-content/uploads/2019/11/2-12.png" alt="2.- Deploy MySQL using Docker compose" width="1039" height="716" srcset="https://www.osradar.com/wp-content/uploads/2019/11/2-12.png 1039w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-300x207.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-768x529.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-1024x706.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-696x480.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-609x420.png 609w" sizes="(max-width: 1039px) 100vw, 1039px" /><figcaption id="caption-attachment-15688" class="wp-caption-text">2.- Deploy MySQL using Docker compose</figcaption></figure>
<p>So, now you can open your favorite web browser and go to <code>http://your-server:8080</code> to access Adminer. Remember that port has to be open in the firewall.</p>
<figure id="attachment_15689" aria-describedby="caption-attachment-15689" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15689" src="https://www.osradar.com/wp-content/uploads/2019/11/3-11.png" alt="3.- Adminer Working" width="1366" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/3-11.png 1366w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-858x420.png 858w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-15689" class="wp-caption-text">3.- Adminer Working</figcaption></figure>
<p>Now, type in your MySQL credentials and log in. These are the ones we define in the Docker compose file.</p>
<figure id="attachment_15690" aria-describedby="caption-attachment-15690" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15690" src="https://www.osradar.com/wp-content/uploads/2019/11/4-9.png" alt="4.- MySQL running using Docker Compose" width="1366" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/4-9.png 1366w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-858x420.png 858w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-15690" class="wp-caption-text">4.- MySQL running using Docker Compose</figcaption></figure>
<p>And that is it.</p>
<h2>Conclusion</h2>
<p>Docker is a technology with enormous potential. It helps a lot in the deployment of applications without many dependency problems. Today in this tutorial we have deployed MySQL and Adminer without many problems.</p>
<p>For more information about the use of the MySQL image, please consult the <a href="https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/docker-mysql-more-topics.html" target="_blank" rel="noopener noreferrer">official documentation.</a></p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-mysql-using-docker-compose/">Deploy MySQL using Docker Compose</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/deploy-mysql-using-docker-compose/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Docker on CentOS 8?</title>
		<link>https://www.osradar.com/install-docker-centos-8/</link>
					<comments>https://www.osradar.com/install-docker-centos-8/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 02 Oct 2019 22:15:05 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Centos 8]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=14100</guid>

					<description><![CDATA[<p>Docker is a brilliant technology that is becoming more and more common among developers and sysadmins. With it, you can deploy applications in the form of containers without dependency problems. Something like the nemesis of a virtual machine but technically share many things. So it does this in a fairly common technology today. That&#8217;s why [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-docker-centos-8/">How to install Docker on CentOS 8?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><a rel="noreferrer noopener" aria-label="Docker (opens in a new tab)" href="http://docker.com/" target="_blank">Docker</a> is a brilliant technology that is becoming more and more common among developers and sysadmins. With it, you can deploy applications in the form of containers without dependency problems. Something like the nemesis of a virtual machine but technically share many things. So it does this in a fairly common technology today. That&#8217;s why in this post I will show you how to install Docker CE on CentOS 8. With some observations, but you will see that it works.</p>



<h2>What is the Docker situation on CentOS 8?</h2>



<p>CentOS 8 just went on the air. In fact, that&#8217;s what we&#8217;re telling you in this post. However, the Docker repositories have not yet been prepared for the number change. However, the process is quite reliable although it is advisable to take some precautions. </p>



<p>The main advantage of this method is that it does not expire. That is to say, as soon as the packages are suitable, everything will flow without problems and with the certainty that nothing strange will happen.</p>



<p>Once we know this, we are going to install Docker on CentOS 8.</p>



<h2>Install <g class="gr_ gr_9 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="9" data-gr-id="9">Docke</g> on CentOS 8</h2>



<p>Open a terminal session and add the Docker repository. As I said before we will use packages for CentOS 7 but it is functional. So let&#8217;s go for it:</p>



<pre class="wp-block-preformatted">:~$ su
:~# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo</pre>



<p>Then we&#8217;ll have to install Docker. The command in question is as follows:</p>



<pre class="wp-block-preformatted">:~# dnf install docker-ce</pre>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="202" src="https://www.osradar.com/wp-content/uploads/2019/09/1-32-1024x202.png" alt="1.- The command fail" class="wp-image-14113" srcset="https://www.osradar.com/wp-content/uploads/2019/09/1-32-1024x202.png 1024w, https://www.osradar.com/wp-content/uploads/2019/09/1-32-300x59.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/1-32-768x151.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/1-32-696x137.png 696w, https://www.osradar.com/wp-content/uploads/2019/09/1-32-1068x210.png 1068w, https://www.osradar.com/wp-content/uploads/2019/09/1-32.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- The command fail</figcaption></figure>



<p>But if for some reason, the command fails. The safest thing is to use the following one:</p>



<pre class="wp-block-preformatted">:~# dnf install --nobest docker-ce </pre>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="536" src="https://www.osradar.com/wp-content/uploads/2019/09/3-28-1024x536.png" alt="2.- Install Docker on CentOS 8" class="wp-image-14111" srcset="https://www.osradar.com/wp-content/uploads/2019/09/3-28-1024x536.png 1024w, https://www.osradar.com/wp-content/uploads/2019/09/3-28-300x157.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/3-28-768x402.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/3-28-696x364.png 696w, https://www.osradar.com/wp-content/uploads/2019/09/3-28-1068x559.png 1068w, https://www.osradar.com/wp-content/uploads/2019/09/3-28-802x420.png 802w, https://www.osradar.com/wp-content/uploads/2019/09/3-28.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Install Docker on CentOS 8</figcaption></figure>



<p>That should work by now.</p>



<p>Now you only need to start the Docker service with this command:</p>



<pre class="wp-block-preformatted">:~# systemctl start docker</pre>



<p>And see the status of the service:</p>



<pre class="wp-block-preformatted">:~# systemctl status docker</pre>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="355" src="https://www.osradar.com/wp-content/uploads/2019/09/3-29-1024x355.png" alt="3.- Docker is running on CentOS 8" class="wp-image-14119" srcset="https://www.osradar.com/wp-content/uploads/2019/09/3-29-1024x355.png 1024w, https://www.osradar.com/wp-content/uploads/2019/09/3-29-300x104.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/3-29-768x266.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/3-29-696x242.png 696w, https://www.osradar.com/wp-content/uploads/2019/09/3-29-1068x371.png 1068w, https://www.osradar.com/wp-content/uploads/2019/09/3-29-1210x420.png 1210w, https://www.osradar.com/wp-content/uploads/2019/09/3-29.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>3.- Docker is running on CentOS 8</figcaption></figure>



<p>As you can see, everything is in order. That is to say, we will be able to use docker without problems.</p>



<p>And that is it.</p>



<h2>Conclusion</h2>



<p>Docker is a spectacular technology for the deployment of applications. However, due to the recent release of CentOS the repositories and packages have not yet been adequate. But today we have taught you an alternative method to achieve the installation.</p>



<p>You can learn <a href="https://www.osradar.com/install-docker-on-debian-10/" target="_blank" rel="noreferrer noopener" aria-label="how to install Docker on Debian 10 (opens in a new tab)">how to install Docker on Debian 10</a> too.</p>



<p>Please share this post and join <a href="https://t.me/osradar" target="_blank" rel="noreferrer noopener" aria-label="our Telegram channel (opens in a new tab)">our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-docker-centos-8/">How to install Docker on CentOS 8?</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-docker-centos-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install and configure DRBD on Debian 10</title>
		<link>https://www.osradar.com/install-and-configure-drbd-on-debian-10/</link>
					<comments>https://www.osradar.com/install-and-configure-drbd-on-debian-10/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sun, 11 Aug 2019 23:22:20 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[drbd]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12948</guid>

					<description><![CDATA[<p>Replicating partitions is a great way to back up data in real-time. This is one of the most useful operations we can do as sysadmin as it can save us a lot of time. Imagine that a server has a lot of information and suddenly stops working. It would be a problem. However, if we [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-configure-drbd-on-debian-10/">Install and configure DRBD on Debian 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Replicating partitions is a great way to back up data in real-time. This is one of the most useful operations we can do as sysadmin as it can save us a lot of time. Imagine that a server has a lot of information and suddenly stops working. It would be a problem. However, if we are replicating all its information through the network there would be no need to be alarmed. So, in this post, I will explain how to install and configure DRBD on Debian 10.</p>
<h2>0. What we need</h2>
<p>First of all, we need two Debian 10 teams. Both must have a static IP address and a defined hostname. Also, they have a partition defined for replication of the same size. Then, be connected to the same network and that the Firewall allows connections through the DRBD network port. In short, this will be our environment.</p>
<p>Node 1:</p>
<ul>
<li>IP address: 192.168.250.100</li>
<li>Hostname: osradar1</li>
<li>OS: Debian 10</li>
<li>Disk: /dev/sda</li>
<li>Partition to replicate: /dev/sda2</li>
</ul>
<p>Node 2:</p>
<ul>
<li>IP address: 192.168.250.110</li>
<li>Hostname: osradar2</li>
<li>OS: Debian 10</li>
<li>Disk: /dev/sda</li>
<li>Partition to replicate: /dev/sda2</li>
</ul>
<p>Each node must have a /dev/sda2/ partition of at least several GB in size.</p>
<h2>1) Install DRBD on Debian 10</h2>
<p>DRBD is available in the official repositories of the distribution. So the installation is not complicated.</p>
<p>On both nodes, run the following command:</p>
<pre>:~$ sudo apt install drbd-utils</pre>
<p>Of course, DRBD incorporates a module that has to be loaded into the kernel. In both nodes, it has to be loaded. To do this, run the following command:</p>
<pre>:~$ sudo modprobe drbd</pre>
<p>Then, check the module was added.</p>
<pre>:~$ lsmod | grep drbd</pre>
<p><figure id="attachment_12950" aria-describedby="caption-attachment-12950" style="width: 328px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12950" src="https://www.osradar.com/wp-content/uploads/2019/08/1-4.jpeg" alt="1.- check the drbd module" width="328" height="93" srcset="https://www.osradar.com/wp-content/uploads/2019/08/1-4.jpeg 328w, https://www.osradar.com/wp-content/uploads/2019/08/1-4-300x85.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/08/1-4-324x93.jpeg 324w" sizes="(max-width: 328px) 100vw, 328px" /><figcaption id="caption-attachment-12950" class="wp-caption-text">1.- check the drbd module</figcaption></figure></p>
<h2>2) Configure DRBD</h2>
<p>The package is already installed and the module loaded to the kernel. Now it remains to make the appropriate settings for the replication to be a success.</p>
<p>DRBD has the particularity of being flexible, that is, the configuration file has many options that we can manipulate and adapt to our needs.</p>
<p>However, it is recommended to make a backup of the configuration file before starting to work on it.</p>
<pre>:~$ sudo cp /etc/drbd.conf /etc/drbd.conf.bak</pre>
<p>Then, erase the entire file.</p>
<pre>:~$ sudo cat /dev/null &gt; /etc/drbd.conf</pre>
<p>Now, you need to edit the configuration file:</p>
<pre>:~$ sudo nano /etc/drbd.conf</pre>
<p>And add the following:</p>
<pre>global { usage-count no; }
common { syncer { rate 100M; } }
resource r0 {
        protocol C;
        startup {
                wfc-timeout  15;
                degr-wfc-timeout 60;
        }
        net {
                cram-hmac-alg sha1;
                shared-secret "secret";
        }
        on osradar1 {
                device /dev/drbd0;
                disk /dev/sda2;
                address 192.168.250.100:7788;
                meta-disk internal;
        }
        on osradar2 {
                device /dev/drbd0;
                disk /dev/sda2;
                address 192.168.0.110:7788;
                meta-disk internal;
        }
}</pre>
<p><figure id="attachment_12951" aria-describedby="caption-attachment-12951" style="width: 810px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-12951 size-full" src="https://www.osradar.com/wp-content/uploads/2019/08/2-4.jpeg" alt="2.- Install DRBD on Debian 10" width="810" height="495" srcset="https://www.osradar.com/wp-content/uploads/2019/08/2-4.jpeg 810w, https://www.osradar.com/wp-content/uploads/2019/08/2-4-300x183.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/08/2-4-768x469.jpeg 768w, https://www.osradar.com/wp-content/uploads/2019/08/2-4-696x425.jpeg 696w, https://www.osradar.com/wp-content/uploads/2019/08/2-4-687x420.jpeg 687w" sizes="(max-width: 810px) 100vw, 810px" /><figcaption id="caption-attachment-12951" class="wp-caption-text">2.- Install DRBD on Debian 10</figcaption></figure></p>
<p>The truth is that I think that many of the options are very explicit but I will briefly explain the most important ones.</p>
<p>In global and common some global configurations are defined to both nodes and resources.</p>
<p>Then, in the resource section, we define the name. In this case <code>r0</code>, of course, you can modify it. Next, in protocol, startup, and net, specific configurations to the resource.</p>
<p>Then, there is the configuration in each node identified by the hostname. In each of them, we define the DRBD device and the partition we are going to replicate (<code>disk</code>). Also, the IP address of the node as well as the communication port.</p>
<p>As you can see it is not very complex or long to understand.</p>
<h2>3) Start DRBD on Debian 10</h2>
<p>Remember this same file must be on both nodes. Then, in both nodes run the following commands to start the DRBD service.</p>
<pre>:~$ sudo systemctl stop drbd
:~$ sudo drbdadm create-md r0
:~$ sudo drbdadm attach r0</pre>
<p>Remember that is<code>r0</code> the name of the resource. You can change it in the configuration file.</p>
<p>After that, you can start the service.</p>
<pre>:~$ sudo systemctl start drbd</pre>
<p>And set which node will be the master. In this case, the node1 will be the master. So, in the node1 run this command:</p>
<pre>:~$ sudo drbdadm -- --overwrite-data-of-peer primary all</pre>
<p>With that, we should have an effective replication. It would be enough to create a new file system and mount it.</p>
<pre>:~$ sudo mkfs.ext4 /dev/drbd0
:~$ sudo mkdir /testdata
:~$ sudo mount /dev/drbd0 /testdata</pre>
<p>There, you can create new files. And that is it.</p>
<p>If you want more post about Debian 10, please click <a href="https://www.osradar.com/tag/buster/">here</a>.</p>
<p>Please share this post with your friends and join <a href="https://t.me/osradar">our Telegram Channel.</a></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-configure-drbd-on-debian-10/">Install and configure DRBD on Debian 10</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-and-configure-drbd-on-debian-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to deploy Jenkins using docker-compose?</title>
		<link>https://www.osradar.com/deploy-jenkins-using-docker-compose/</link>
					<comments>https://www.osradar.com/deploy-jenkins-using-docker-compose/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 30 Jul 2019 02:12:57 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Devops]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Virtualization]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12838</guid>

					<description><![CDATA[<p>We already know the potential of Docker and how easy it is to display images thanks to Docker-compose. In this post, you will learn how to deploy Jenkins using Docker-compose. This is in order to avoid manual installation of the application. Moreover, with this method, you do not have to worry about the operating system [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-jenkins-using-docker-compose/">How to deploy Jenkins using docker-compose?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We already know the potential of Docker and how easy it is to display images thanks to Docker-compose. In this post, you will learn how to deploy Jenkins using Docker-compose. This is in order to avoid manual installation of the application. Moreover, with this method, you do not have to worry about the operating system but just have Docker installed.</p>
<h2>Install Docker and Docker-compose</h2>
<p>The first thing to do is to install Docker and Docker compose in our system. <a href="https://www.osradar.com/install-docker-on-debian-10/">In the case of Debian 10</a>, there is a tutorial of ours that you can use as a guide.</p>
<p>For the rest of the distributions, it is a good idea to read <a href="https://docs.docker.com/install/">Docker&#8217;s official documentation</a>. Anyway, it is not hard to do.</p>
<h2>Deploy Jenkins using Docker-compose</h2>
<p>As we explained in the post to deploy LAMP using Docker-compose, the definitions of images and their options, we do them in a file with the extension YML. To do this, it is recommended to first make a folder and within it create the file.</p>
<p>So, open a terminal session and type the following:</p>
<pre>:~$ mkdir jenkins &amp;&amp; cd jenkins</pre>
<p>Once we have entered the folder using your favorite text editor proceed to create the <code>docker-compose.yml</code> file.</p>
<pre>:~$ nano docker-compose.yml</pre>
<p>Once inside, we will begin to define the content.</p>
<pre>version: '2'
services:
  jenkins:
  image: 'bitnami/jenkins:2'</pre>
<p>First the basic file definitions. The version to use will be the 2. And we will deploy only a service that will be called <em>jenkins</em>. For it, we will use the image Jenkins of bitnami. It is very well documented and quite reliable.</p>
<p>Then, we continue with the definition of the options.</p>
<pre>ports:
      - '80:8080'
      - '443:8443'
      - '50000:50000'
    volumes:
      - 'jenkins_data:/bitnami'
volumes:
  jenkins_data:
  driver: local</pre>
<p>In this section, you define the ports that the image will use. Remember that Jenkins uses the <code>8080</code> but we will access the <code>8080</code> port of the image through the <code>80</code>. So, the <code>443</code> is for secure connections with Jenkins.</p>
<p>Equally, with LAMP, it is advisable to mount a volume for the Jenkins data. And at the end of the file, we refer to the options of that volume.</p>
<p>So, the file will be completed as follows:</p>
<pre>version: '2'
services:
  jenkins:
    image: 'bitnami/jenkins:2'
    ports:
      - '80:8080'
      - '443:8443'
      - '50000:50000'
    volumes:
      - 'jenkins_data:/bitnami'
volumes:
  jenkins_data:
  driver: local</pre>
<p><figure id="attachment_12841" aria-describedby="caption-attachment-12841" style="width: 841px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12841" src="https://www.osradar.com/wp-content/uploads/2019/07/1-9.jpeg" alt="1.- Docker-compose file for Jenkins" width="841" height="301" srcset="https://www.osradar.com/wp-content/uploads/2019/07/1-9.jpeg 841w, https://www.osradar.com/wp-content/uploads/2019/07/1-9-300x107.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/07/1-9-768x275.jpeg 768w, https://www.osradar.com/wp-content/uploads/2019/07/1-9-696x249.jpeg 696w" sizes="(max-width: 841px) 100vw, 841px" /><figcaption id="caption-attachment-12841" class="wp-caption-text">1.- Docker-compose file for Jenkins</figcaption></figure></p>
<p>We can now raise the image, but I want to show you a few more options.</p>
<h2>Some useful options to deploy Jenkins</h2>
<p>This Jenkins image is customizable thanks to environment variables that can be modified. Some of them are these:</p>
<ul>
<li>JENKINS_USERNAME: Jenkins admin username.</li>
<li>JENKINS_PASSWORD: Jenkins admin password.</li>
<li>JENKINS_HOME: Jenkins home directory.</li>
<li>DISABLE_JENKINS_INITIALIZATION: Allows to disable the initial Bitnami configuration for Jenkins.</li>
<li>JAVA_OPTS: Customize JVM parameters.</li>
</ul>
<p>To use and modify them, just add them to the file in the environment section. For example:</p>
<pre>jenkins:
  ...
  environment:
    - JENKINS_PASSWORD=your-password
  ...</pre>
<p>Note: by default the user is <code>user</code> and the password is <code>bitnami</code>. Then, you can modify it from Jenkins once it has been deployed.</p>
<h2>Running and testing Jenkins</h2>
<p>Once you have finished defining the docker-compose file. Now we can execute it with the following command:</p>
<pre>:~$ sudo docker-compose up -d</pre>
<p><figure id="attachment_12843" aria-describedby="caption-attachment-12843" style="width: 782px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12843" src="https://www.osradar.com/wp-content/uploads/2019/07/2-6.jpeg" alt="2.- Deploy Jenkins using docker-compose" width="782" height="331" srcset="https://www.osradar.com/wp-content/uploads/2019/07/2-6.jpeg 782w, https://www.osradar.com/wp-content/uploads/2019/07/2-6-300x127.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/07/2-6-768x325.jpeg 768w, https://www.osradar.com/wp-content/uploads/2019/07/2-6-696x295.jpeg 696w" sizes="(max-width: 782px) 100vw, 782px" /><figcaption id="caption-attachment-12843" class="wp-caption-text">2.- Deploy Jenkins using docker-compose</figcaption></figure></p>
<p>Next, open your web browser and go to your server using the port 80.</p>
<p><figure id="attachment_12844" aria-describedby="caption-attachment-12844" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12844" src="https://www.osradar.com/wp-content/uploads/2019/07/3-11.png" alt="3.- Jenkins is almost ready to work" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/3-11.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12844" class="wp-caption-text">3.- Jenkins is almost ready to work</figcaption></figure></p>
<p>Then, login into the application using the default credentials or yours.</p>
<p><figure id="attachment_12845" aria-describedby="caption-attachment-12845" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12845" src="https://www.osradar.com/wp-content/uploads/2019/07/4-8.png" alt="4.- Jenkins log in screen" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/4-8.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12845" class="wp-caption-text">4.- Jenkins log in screen</figcaption></figure></p>
<p>After that, you will see the dashboard.</p>
<p><figure id="attachment_12846" aria-describedby="caption-attachment-12846" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-12846 size-full" src="https://www.osradar.com/wp-content/uploads/2019/07/5-9.png" alt="5.- Everything is OK" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/5-9.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12846" class="wp-caption-text">5.- Everything is OK</figcaption></figure></p>
<p>And that is it.</p>
<h2>Conclusion</h2>
<p>Jenkins is a very popular application and it is possible to install it on our server using docker. This way we save a lot of time on some operating-system configurations. However, for total control of it, it is advisable to do it manually.</p>
<p>You can read <a href="https://www.osradar.com/install-jenkins-debian-10/" target="_blank" rel="noopener noreferrer">How to install Jenkins on Debian 10</a>?</p>
<p>Please share this post and join <a href="https://t.me/osradar">our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-jenkins-using-docker-compose/">How to deploy Jenkins using docker-compose?</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/deploy-jenkins-using-docker-compose/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Jenkins on Debian 10?</title>
		<link>https://www.osradar.com/install-jenkins-debian-10/</link>
					<comments>https://www.osradar.com/install-jenkins-debian-10/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Sun, 28 Jul 2019 23:22:49 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Devops]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12798</guid>

					<description><![CDATA[<p>Jenkins is a fantastic application that automates application processes on a server. It is written in Java and therefore compatible with many Linux distributions. So, in this post, you will learn how to install Jenkins on Debian 10. Continuous integration and Jenkins In a production environment, the software is developed and compiled frequently. In addition [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-jenkins-debian-10/">How to install Jenkins on Debian 10?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Jenkins is a fantastic application that automates application processes on a server. It is written in Java and therefore compatible with many Linux distributions. So, in this post, you will learn how to install Jenkins on Debian 10.</p>
<h2>Continuous integration and Jenkins</h2>
<p>In a production environment, the software is developed and compiled frequently. In addition to this, it needs to be tested quite a few times. With each change in the source code, it is necessary to start the whole process over again.</p>
<p><a href="https://jenkins.io/" rel="noopener noreferrer">Jenkins</a> automates all these tasks quickly and easily. So, the process where all the changes and functions of the application in development are automatically verified is called continuous integration.</p>
<p>In this sense, using Jenkins the developer will know at all times the status of his application. Failures, new features, and processes will be automated and monitored with Jenkins.</p>
<h2>Install Jenkins on Debian 10 Buster</h2>
<p>One of the great advantages of Jenkins is that it is cross-platform. This is because it is built in Java. Therefore, it can be installed on almost all Linux distributions without any problems. Of course, also in Debian 10.</p>
<p>However, there are some small things to keep in mind. First of all, it is necessary to have a user with sudo or to be root users.</p>
<p>Read <a href="https://www.osradar.com/how-to-enable-sudo-on-debian-10/" rel="noopener noreferrer">how to enable sudo on Debian 10?</a></p>
<p>On the other hand, you have to have <a href="https://www.osradar.com/tag/java/" rel="noopener noreferrer">Java</a> installed and know how to use the terminal. So, let us start.</p>
<h3>1) Install Java on Debian 10</h3>
<p>First of all, you must have Java installed. This is vital because Jenkins is made in Java. So open a terminal and run the following command:</p>
<pre>:~$ sudo apt install default-jre default-jdk</pre>
<p>Then, check the Java version.</p>
<pre>:~$ java --version
openjdk 11.0.3 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-post-Debian-5)
OpenJDK 64-Bit Server VM (build 11.0.3+7-post-Debian-5, mixed mode, sharing)</pre>
<p>Now, Java is correctly installed.</p>
<h3>2) Add the Jenkins repository on Debian 10</h3>
<p>Jenkins is a vital program in professionally deploying software. So, to install it, it requires a safe and reliable method from Jenkins developers. For this purpose and to facilitate the installation, they have made available a software repository.</p>
<p>So, add it to our Debian 10 Buster. First, install some necessary packages:</p>
<pre>:~$ sudo apt install apt-transport-https wget gnupg</pre>
<p>Then, add the GPG key for the repository.</p>
<pre>:~$ wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
OK</pre>
<p>Now add edit the file <code>/etc/apt/sources.list</code> and add the following. To do this, I will use the nano text editor.</p>
<pre>:~$ sudo nano /etc/apt/sources.list
deb https://pkg.jenkins.io/debian-stable binary/</pre>
<p>Next, save the changes (CTRL + O) and close the file (CTRL +X).</p>
<h3>3) Install Jenkins on Debian 10 (I)</h3>
<p>Then, refresh APT and install Jenkins on Debian 10 using the following commands:</p>
<pre>:~$ sudo apt update
:~$ sudo apt install jenkins</pre>
<p><figure id="attachment_12825" aria-describedby="caption-attachment-12825" style="width: 645px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12825" src="https://www.osradar.com/wp-content/uploads/2019/07/1-8.jpeg" alt="1.- Install Jenkins on Debian 10 Buster" width="645" height="245" srcset="https://www.osradar.com/wp-content/uploads/2019/07/1-8.jpeg 645w, https://www.osradar.com/wp-content/uploads/2019/07/1-8-300x114.jpeg 300w" sizes="(max-width: 645px) 100vw, 645px" /><figcaption id="caption-attachment-12825" class="wp-caption-text">1.- Install Jenkins on Debian 10 Buster</figcaption></figure></p>
<p>You can check the service status by running this command:</p>
<pre>:~$ sudo systemctl status jenkins</pre>
<p><figure id="attachment_12828" aria-describedby="caption-attachment-12828" style="width: 767px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12828" src="https://www.osradar.com/wp-content/uploads/2019/07/2-5.jpeg" alt="2.- Jenkins status on Debian 10" width="767" height="310" srcset="https://www.osradar.com/wp-content/uploads/2019/07/2-5.jpeg 767w, https://www.osradar.com/wp-content/uploads/2019/07/2-5-300x121.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/07/2-5-696x281.jpeg 696w" sizes="(max-width: 767px) 100vw, 767px" /><figcaption id="caption-attachment-12828" class="wp-caption-text">2.- Jenkins status on Debian 10</figcaption></figure></p>
<p>As you can see, the service is running smoothly. Now, you need to get the default superuser key. To do this, run this command:</p>
<pre>:~$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
6dcefe440e474daea0f4b85ace1ad954</pre>
<p>Now, complete the installation using the web browser.</p>
<h3>3) Install Jenkins on Debian 10 (II)</h3>
<p>Now we have to go to the server and complete the installation. Open your web browser and go to <code>http://server-ip:8080</code> Remember that Jenkins uses port <code>8080</code> by default. You will see this. Just, type the root password and continue.</p>
<p><figure id="attachment_12829" aria-describedby="caption-attachment-12829" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12829" src="https://www.osradar.com/wp-content/uploads/2019/07/3-10.png" alt="3.- Default password screen" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/3-10.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/3-10-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/3-10-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/3-10-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/3-10-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/3-10-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/3-10-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12829" class="wp-caption-text">3.- Default password screen</figcaption></figure></p>
<p>Then, create the admin user.</p>
<p><figure id="attachment_12830" aria-describedby="caption-attachment-12830" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12830" src="https://www.osradar.com/wp-content/uploads/2019/07/4-7.png" alt="4.- Creating the admin user" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/4-7.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/4-7-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/4-7-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/4-7-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/4-7-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/4-7-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/4-7-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12830" class="wp-caption-text">4.- Creating the admin user</figcaption></figure></p>
<p>After that, you can choose the plugins you want to activate. Whether they are suggested or others.</p>
<p><figure id="attachment_12831" aria-describedby="caption-attachment-12831" style="width: 1366px" class="wp-caption aligncenter"><img loading="lazy" class="size-full wp-image-12831" src="https://www.osradar.com/wp-content/uploads/2019/07/5-8.png" alt="5.- Customize Jenkins installation" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/5-8.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/5-8-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/5-8-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/5-8-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/5-8-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/5-8-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/5-8-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12831" class="wp-caption-text">5.- Customize Jenkins installation</figcaption></figure></p>
<p><figure id="attachment_12832" aria-describedby="caption-attachment-12832" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12832" src="https://www.osradar.com/wp-content/uploads/2019/07/6-5.png" alt="6.- Select the plugins you want to install" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/6-5.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/6-5-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/6-5-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/6-5-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/6-5-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/6-5-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/6-5-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12832" class="wp-caption-text">6.- Select the plugins you want to install</figcaption></figure></p>
<p>Then, after a couple of confirmation and information windows. You will be on the Jenkins dashboard.</p>
<p><figure id="attachment_12833" aria-describedby="caption-attachment-12833" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12833" src="https://www.osradar.com/wp-content/uploads/2019/07/7-5.png" alt="7.- Jenkins Dashboard" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/7-5.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/7-5-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/7-5-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/7-5-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/7-5-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/7-5-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/7-5-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12833" class="wp-caption-text">7.- Jenkins Dashboard</figcaption></figure></p>
<p>Enjoy it. 😀</p>
<h2>Conclusion</h2>
<p>In this post, you have learned to install Jenkins on Debian 10, Buster. It is a pretty good application for continuous integration processes. So the processes inherent to the software development can be automated giving the developer truthful and accurate information about the process.</p>
<p>Please share this post and join <a href="http://t.me/osradar" rel="noopener noreferrer">our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-jenkins-debian-10/">How to install Jenkins on Debian 10?</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-jenkins-debian-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Docker Compose on CentOS 7?</title>
		<link>https://www.osradar.com/how-to-install-docker-compose-on-centos-7/</link>
					<comments>https://www.osradar.com/how-to-install-docker-compose-on-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 14 Mar 2019 14:24:43 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=11431</guid>

					<description><![CDATA[<p>ersionDocker&#8217;s technology is one of the most widely used today. Many sysadmins use it to deploy applications quickly and easily through images. These images contain applications or services already &#8220;packaged&#8221; that can run indistinctly from the system. It is only necessary that the system has Docker installed and that&#8217;s it. However, there are tools that [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-docker-compose-on-centos-7/">How to install Docker Compose on CentOS 7?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>ersionDocker&#8217;s technology is one of the most widely used today. Many sysadmins use it to deploy applications quickly and easily through images. These images contain applications or services already &#8220;packaged&#8221; that can run indistinctly from the system. It is only necessary that the system has Docker installed and that&#8217;s it. However, there are tools that extend these features. Therefore, I will teach you how to install Docker Compose on CentOS 7.</p>
<p>As I have already explained, Docker is highly popular. If you did not know, it is an open source technology project that allows the deployment of applications through containers. These containers are distributed in the form of images that are loads from Docker. So, the programmer or Sysadmin can make an image of an application and redistribute it in many systems. In addition, all this without dependencies or compatibility problems.</p>
<h1>What is Docker Compose?</h1>
<p>Docker Compose was born as a tool that extends the functionality of Docker. Docker is for deploying or installing applications that are in the form of images. However, many applications require other images to run. For example, if you want to install WordPress, you need the images of the web server, the database handler and finally the WordPress itself. This also happens with other services, which require to operate other services.</p>
<p>With Docker Compose it is possible to define the dependencies of an image and they will be automatically managed. Too useful and practice this utility.</p>
<p>So, let us install Docker Compose on CentOS 7.</p>
<h1>Install Docker Compose on CentOS 7</h1>
<p>To use Docker Compose, you need to install Docker first. Installing Docker is quite simple and in this post, we show you how to do it.</p>
<p>Read <a href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/" rel="noopener noreferrer">how to install Docker on CentOS 7?</a></p>
<p>Once Docker is installed and fully functional, we can start installing Docker Compose.</p>
<p>For this, we will use the official Docker Compose binary. Open a terminal and as root user run the following command:</p>
<pre>:~# curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose</pre>
<p><figure id="attachment_11432" aria-describedby="caption-attachment-11432" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-11432" src="https://www.osradar.com/wp-content/uploads/2019/03/1-8.png" alt="1.- Download and install Docker Compose" width="1365" height="166" srcset="https://www.osradar.com/wp-content/uploads/2019/03/1-8.png 1365w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-300x36.png 300w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-768x93.png 768w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-1024x125.png 1024w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-696x85.png 696w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-1068x130.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-11432" class="wp-caption-text">1.- Download and install Docker Compose</figcaption></figure></p>
<p>After that, set the execution permission to the binary.</p>
<pre>:~# chmod +x /usr/local/bin/docker-compose</pre>
<p>Next, create a sym link for Docker compose.</p>
<pre>:~# <code>ln <span class="nt">-s</span> /usr/local/bin/docker-compose /usr/bin/docker-compose</code></pre>
<p>Finally, check the installed version.</p>
<pre>:~# docker-compose --version</pre>
<p><figure id="attachment_11433" aria-describedby="caption-attachment-11433" style="width: 860px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-11433" src="https://www.osradar.com/wp-content/uploads/2019/03/2-8.png" alt="2.- Docker compose" width="860" height="144" srcset="https://www.osradar.com/wp-content/uploads/2019/03/2-8.png 860w, https://www.osradar.com/wp-content/uploads/2019/03/2-8-300x50.png 300w, https://www.osradar.com/wp-content/uploads/2019/03/2-8-768x129.png 768w, https://www.osradar.com/wp-content/uploads/2019/03/2-8-696x117.png 696w" sizes="(max-width: 860px) 100vw, 860px" /><figcaption id="caption-attachment-11433" class="wp-caption-text">2.- Docker compose</figcaption></figure></p>
<p>So, Docker compose is ready to use.</p>
<h1>Using Docker Compose</h1>
<p>Docker Compose automatically manages various images through a .yaml file. This file defines the parameters to be followed and the management of the images. Then, it is lifted with a command and ready.</p>
<p>In this example, I will make a file to install a LAMP server.</p>
<p>First, we need to create a file with a .yml extension called docker-compose. On it, we need to put all the image requisites. For example:</p>
<pre>version: "3"
 
services:
  test_mysql:
    image: mysql:5.7
    environment:
      - MYSQL_DATABASE=testdatabase
      - MYSQL_ROOT_PASSWORD=rootpss
      - MYSQL_USER=user
      - MYSQL_PASSWORD=userpss
    volumes:
      - ./volume/mysql:/var/lib/mysql
    expose:
      - 3306
    ports:
      - 3306:3306
   
  php:
    image: php:7-apache
    volumes:
      - ./test_web/:/var/www/html
    expose:
      - 80
    ports:
      - 80:80
    links: 
      - test_mysql</pre>
<p><figure id="attachment_11434" aria-describedby="caption-attachment-11434" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-11434" src="https://www.osradar.com/wp-content/uploads/2019/03/3-7.png" alt="3.- Creating the docker-composer yml file" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/03/3-7.png 1366w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-11434" class="wp-caption-text">3.- Creating the docker-composer yml file</figcaption></figure></p>
<p>The file is somewhat long but very understandable. I will try to explain it briefly to make it clearer.</p>
<p>Version refers to the version of the Docker Compose file. It is currently 3. As it evolves, it becomes incremental. Within Service, the services to be deployed are defined. In this case, there are two, MySQL and PHP with Apache already incorporated.</p>
<p>The first service is MySQL where test_mysql is the name of the service and the image that is going to load. Then, we define an environment with test credentials. We need to create a new volume so as not to lose the data and make it available through port 3306.</p>
<p>Similarly, in the PHP service, we first assign a name. Then, the image to load, the volume where we can place our page and then the ports to use. Finally, we must link the services and therefore the last line.</p>
<p>After that, use Docker Compose to make apply the file</p>
<pre>:~# docker-compose up -d</pre>
<p><figure id="attachment_11436" aria-describedby="caption-attachment-11436" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-11436" src="https://www.osradar.com/wp-content/uploads/2019/03/4-4.png" alt="Using docker compose" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/03/4-4.png 1366w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-11436" class="wp-caption-text">Using docker compose</figcaption></figure></p>
<p>As you can see, there is no error in the execution of the file and at the end, you will have the services running. Remember to open the ports in the firewall for everything to work.</p>
<p>On the contrary, if you want to stop the execution of the containers, run the following command:</p>
<pre>:~# docker-compose down</pre>
<p>So, that is it.</p>
<h1>Conclusion</h1>
<p>Using the best tools is vital for good server management results. Docker is an example of this. With this technology, it is possible to display images in a simple way and guaranteeing the compatibility of the programs.</p>
<p>Please share this post with your friends.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-docker-compose-on-centos-7/">How to install Docker Compose on CentOS 7?</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-docker-compose-on-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install ArangoDB on CentOS 7</title>
		<link>https://www.osradar.com/install-arangodb-on-centos-7/</link>
					<comments>https://www.osradar.com/install-arangodb-on-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 14 Feb 2019 12:38:57 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[ArangoDB]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=10792</guid>

					<description><![CDATA[<p>The world spins and spins, that is to say, every time technologies and alternatives to the already existing ones arise. We live in the age of data and information, and that is why it is necessary to have a database manager ready for use. Especially if we take into account that the applications are becoming [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-arangodb-on-centos-7/">Install ArangoDB on CentOS 7</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The world spins and spins, that is to say, every time technologies and alternatives to the already existing ones arise. We live in the age of data and information, and that is why it is necessary to have a database manager ready for use. Especially if we take into account that the applications are becoming more and more demanding. With this in mind, is that effective alternatives to SQL databases arise. Some of these alternatives are widely used in mobile phones and others in cloud computing applications. So, today I will show you how to install ArangoDB on CentOS7.</p>
<p>We&#8217;ve already talked about ArangoDB on <a href="https://www.osradar.com/how-to-install-arangodb-on-debian-9/" rel="noopener">this site</a>. <a href="https://www.arangodb.com/" rel="noopener">ArangoDB</a> is a NoSQL type database handler, that is, it does not use the traditional data storage system as in <a href="https://www.osradar.com/install-mysql-8-0-on-fedora-29-28-centos-rhel-7-6-6-10/" rel="noopener">MySQL</a> or <a href="https://www.osradar.com/how-to-install-postgresql-11-centos-7/" rel="noopener">PostgreSQL</a>. ArangoDB stands out for being high performance, open source and easily scalable.</p>
<p>As you can see, we are in the presence of a database manager for a fairly defined segment of the market. On the other hand, ArangoDB has community and enterprise versions for business projects.</p>
<p>So, let us start to install ArangoDB on CentOS 7.</p>
<h2>1. Upgrade the system</h2>
<p>First, you need to update the system completely. With this, you will have a faster and more agile system to perform the tasks. In addition, you will have installed the latest security patches intended to solve problems in the packages.</p>
<pre class="">:~$ su
:~# yum update</pre>
<p><figure id="attachment_10794" aria-describedby="caption-attachment-10794" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10794" src="https://www.osradar.com/wp-content/uploads/2019/02/1-10.png" alt="1.- Upgrade the system to improve the security" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/02/1-10.png 1366w, https://www.osradar.com/wp-content/uploads/2019/02/1-10-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/1-10-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/1-10-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/1-10-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/1-10-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/1-10-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10794" class="wp-caption-text">1.- Upgrade the system to improve the security</figcaption></figure></p>
<p>As I said before, updating the system is necessary to improve the stability and security of the system.</p>
<h2>2. Install ArangoDB on CentOS 7</h2>
<p>The most efficient way to install ArangoDB on a CentOS 7 system is to do it through YUM. For this, it is vital to add the official repository of ArangoDB. So, let us do it.</p>
<pre class="">:~# cd /etc/yum.repos.d/
:~# curl -OL https://download.arangodb.com/arangodb34/RPM/arangodb.repo</pre>
<p><figure id="attachment_10795" aria-describedby="caption-attachment-10795" style="width: 872px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10795" src="https://www.osradar.com/wp-content/uploads/2019/02/2-10.png" alt="2.- Add the ArangoDB repository" width="872" height="178" srcset="https://www.osradar.com/wp-content/uploads/2019/02/2-10.png 872w, https://www.osradar.com/wp-content/uploads/2019/02/2-10-300x61.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/2-10-768x157.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/2-10-696x142.png 696w" sizes="(max-width: 872px) 100vw, 872px" /><figcaption id="caption-attachment-10795" class="wp-caption-text">2.- Add the ArangoDB repository</figcaption></figure></p>
<p>Then, you can start with the installation of ArangoDB using YUM.</p>
<pre class="">:~# yum install arangodb3</pre>
<p><figure id="attachment_10796" aria-describedby="caption-attachment-10796" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10796" src="https://www.osradar.com/wp-content/uploads/2019/02/3-10.png" alt="3.- Install ArangoDB on CentOS" width="1365" height="588" srcset="https://www.osradar.com/wp-content/uploads/2019/02/3-10.png 1365w, https://www.osradar.com/wp-content/uploads/2019/02/3-10-300x129.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/3-10-768x331.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/3-10-1024x441.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/3-10-696x300.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/3-10-1068x460.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/3-10-975x420.png 975w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-10796" class="wp-caption-text">3.- Install ArangoDB on CentOS</figcaption></figure></p>
<p>After that, you have to enable and start the ArangoDB service.</p>
<pre class="">:~# systemctl enable arangodb3
:~# systemctl start arangodb3</pre>
<p>It is a good idea to check the service status to find some issue.</p>
<pre class="">:~# systemctl status arangodb3</pre>
<p><figure id="attachment_10797" aria-describedby="caption-attachment-10797" style="width: 1364px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10797" src="https://www.osradar.com/wp-content/uploads/2019/02/4-8.png" alt="4.- Check the ArangoDB status" width="1364" height="614" srcset="https://www.osradar.com/wp-content/uploads/2019/02/4-8.png 1364w, https://www.osradar.com/wp-content/uploads/2019/02/4-8-300x135.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/4-8-768x346.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/4-8-1024x461.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/4-8-696x313.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/4-8-1068x481.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/4-8-933x420.png 933w" sizes="(max-width: 1364px) 100vw, 1364px" /><figcaption id="caption-attachment-10797" class="wp-caption-text">4.- Check the ArangoDB status</figcaption></figure></p>
<p>So, ArangoDB is correctly installed and it is running properly too.</p>
<p>Finally, you can access to the ArangoDB console</p>
<pre class="">:~# arangosh</pre>
<p><figure id="attachment_10798" aria-describedby="caption-attachment-10798" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10798" src="https://www.osradar.com/wp-content/uploads/2019/02/5-10.png" alt="5.- ArangoDB shell" width="1365" height="376" srcset="https://www.osradar.com/wp-content/uploads/2019/02/5-10.png 1365w, https://www.osradar.com/wp-content/uploads/2019/02/5-10-300x83.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/5-10-768x212.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/5-10-1024x282.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/5-10-696x192.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/5-10-1068x294.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-10798" class="wp-caption-text">5.- ArangoDB shell</figcaption></figure></p>
<p>Now, you can start to use it.</p>
<h2>3. Using the web interface</h2>
<p>ArangoDB has a quite friendly and useful web interface, with it you will be able to make multiple configurations and operations in a very friendly way. To enable it is necessary to edit some configuration files.</p>
<pre class="">:~# nano /etc/arangodb3/arangod.conf</pre>
<p>And add the following:</p>
<pre class="">endpoint = tcp://SERVER_IP:8529</pre>
<p>In my case, it would be something like this.</p>
<p><figure id="attachment_10799" aria-describedby="caption-attachment-10799" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10799" src="https://www.osradar.com/wp-content/uploads/2019/02/6-9.png" alt="6.-Enabling the web interface" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/02/6-9.png 1366w, https://www.osradar.com/wp-content/uploads/2019/02/6-9-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/6-9-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/6-9-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/6-9-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/6-9-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/6-9-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10799" class="wp-caption-text">6.-Enabling the web interface</figcaption></figure></p>
<p>After that, do the same with the other configuration file.</p>
<pre class="">:~# nano /etc/arangodb3/arangosh.conf</pre>
<p><figure id="attachment_10800" aria-describedby="caption-attachment-10800" style="width: 894px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10800" src="https://www.osradar.com/wp-content/uploads/2019/02/7-9.png" alt="7.- Enabling the ArangoDB web interface" width="894" height="384" srcset="https://www.osradar.com/wp-content/uploads/2019/02/7-9.png 894w, https://www.osradar.com/wp-content/uploads/2019/02/7-9-300x129.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/7-9-768x330.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/7-9-696x299.png 696w" sizes="(max-width: 894px) 100vw, 894px" /><figcaption id="caption-attachment-10800" class="wp-caption-text">7.- Enabling the ArangoDB web interface</figcaption></figure></p>
<p>Then, restart the ArangoDB service.</p>
<pre class="">:~# systemctl restart arangodb3</pre>
<p>Next, set the firewall rules to allow the use of the port 8529 by ArangoDB.</p>
<pre class="">:~# firewall-cmd --add-port=8529/tcp --permanent
:~# firewall-cmd --reload</pre>
<p><figure id="attachment_10801" aria-describedby="caption-attachment-10801" style="width: 885px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10801" src="https://www.osradar.com/wp-content/uploads/2019/02/8-10.png" alt="8.- Add the port" width="885" height="164" srcset="https://www.osradar.com/wp-content/uploads/2019/02/8-10.png 885w, https://www.osradar.com/wp-content/uploads/2019/02/8-10-300x56.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/8-10-768x142.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/8-10-696x129.png 696w" sizes="(max-width: 885px) 100vw, 885px" /><figcaption id="caption-attachment-10801" class="wp-caption-text">8.- Add the port</figcaption></figure></p>
<p>After that, open the web browser and go to <code>http://SERVER_IP:8529</code> and you will see this:</p>
<p><figure id="attachment_10803" aria-describedby="caption-attachment-10803" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10803" src="https://www.osradar.com/wp-content/uploads/2019/02/10-9.png" alt="10.- ArangoDB web interface" width="1366" height="666" srcset="https://www.osradar.com/wp-content/uploads/2019/02/10-9.png 1366w, https://www.osradar.com/wp-content/uploads/2019/02/10-9-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/10-9-768x374.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/10-9-1024x499.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/10-9-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/02/10-9-696x339.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/10-9-1068x521.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/10-9-861x420.png 861w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10803" class="wp-caption-text">10.- ArangoDB web interface</figcaption></figure></p>
<p>Now, we have to change the root password. Just type:</p>
<pre class="">:~# systemctl stop arangodb3
:~# ARANGODB_DEFAULT_ROOT_PASSWORD=your_password arango-secure-installation</pre>
<p><figure id="attachment_10804" aria-describedby="caption-attachment-10804" style="width: 1201px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10804" src="https://www.osradar.com/wp-content/uploads/2019/02/9-99.png" alt="9.- Change the root password" width="1201" height="203" srcset="https://www.osradar.com/wp-content/uploads/2019/02/9-99.png 1201w, https://www.osradar.com/wp-content/uploads/2019/02/9-99-300x51.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/9-99-768x130.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/9-99-1024x173.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/9-99-696x118.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/9-99-1068x181.png 1068w" sizes="(max-width: 1201px) 100vw, 1201px" /><figcaption id="caption-attachment-10804" class="wp-caption-text">9.- Change the root password</figcaption></figure></p>
<p>You can also run the command to change the root password:</p>
<pre class="">:~# arangodb_secure_installation</pre>
<p>Go back to the web browser and log in.</p>
<p><figure id="attachment_10805" aria-describedby="caption-attachment-10805" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10805" src="https://www.osradar.com/wp-content/uploads/2019/02/11-6.png" alt="11.- Log in" width="1366" height="666" srcset="https://www.osradar.com/wp-content/uploads/2019/02/11-6.png 1366w, https://www.osradar.com/wp-content/uploads/2019/02/11-6-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/11-6-768x374.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/11-6-1024x499.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/11-6-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/02/11-6-696x339.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/11-6-1068x521.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/11-6-861x420.png 861w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10805" class="wp-caption-text">11.- Log in</figcaption></figure></p>
<p>Next, select the database.</p>
<p><figure id="attachment_10806" aria-describedby="caption-attachment-10806" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10806" src="https://www.osradar.com/wp-content/uploads/2019/02/12-5.png" alt="12.- Select the database" width="1366" height="666" srcset="https://www.osradar.com/wp-content/uploads/2019/02/12-5.png 1366w, https://www.osradar.com/wp-content/uploads/2019/02/12-5-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/12-5-768x374.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/12-5-1024x499.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/12-5-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/02/12-5-696x339.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/12-5-1068x521.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/12-5-861x420.png 861w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10806" class="wp-caption-text">12.- Select the database</figcaption></figure></p>
<p>And you will see the main screen.</p>
<p><figure id="attachment_10807" aria-describedby="caption-attachment-10807" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10807" src="https://www.osradar.com/wp-content/uploads/2019/02/13-5.png" alt="13. ArangoDB interface" width="1366" height="666" srcset="https://www.osradar.com/wp-content/uploads/2019/02/13-5.png 1366w, https://www.osradar.com/wp-content/uploads/2019/02/13-5-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/13-5-768x374.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/13-5-1024x499.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/13-5-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/02/13-5-696x339.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/13-5-1068x521.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/13-5-861x420.png 861w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-10807" class="wp-caption-text">13. ArangoDB interface</figcaption></figure></p>
<h2>Conclusion</h2>
<p>As you can notice, ArangoDB has a fairly simple installation process, taking into account its potential. For it, it has a repository for CentOS 7 that facilitates the process of installation and update.</p>
<p>Please share this post with your friends.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-arangodb-on-centos-7/">Install ArangoDB on CentOS 7</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-arangodb-on-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Protect your files from accidental deletion</title>
		<link>https://www.osradar.com/protect-your-files-from-accidental-deletion/</link>
					<comments>https://www.osradar.com/protect-your-files-from-accidental-deletion/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 06 Feb 2019 06:19:35 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=10535</guid>

					<description><![CDATA[<p>It seems like a lie but if you work a long time with the Linux terminal, it is very likely that at some point you will have to delete several files. And that is where the problem comes in, you can make a mistake and delete some very important files or even an entire partition. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/protect-your-files-from-accidental-deletion/">Protect your files from accidental deletion</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>It seems like a lie but if you work a long time with the Linux terminal, it is very likely that at some point you will have to delete several files. And that is where the problem comes in, you can make a mistake and delete some very important files or even an entire partition. So for that, today I will teach you how to protect your files from accidental deletion, with this you can work safer with your files safe.</p>
<p>To do it I present you two very simple methods to do it, one consists of using an external program for it. The other method is with a command that normally comes installed on all Linux distributions.</p>
<p>So, let us start.</p>
<h2>1. Protect your files using rm-protection</h2>
<p>rm-protection is a small program similar to an rm extension that protects your files from accidental deletion. The program can be installed via PIP so there should be no problem with it.</p>
<p>First, you need to install PIP.</p>
<p>If you use Debian, Ubuntu, Linux Mint or derivate:</p>
<pre class="">$ sudo apt install python-pip
$ sudo apt-get install python-setuptools</pre>
<p><figure id="attachment_10536" aria-describedby="caption-attachment-10536" style="width: 815px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10536" src="https://www.osradar.com/wp-content/uploads/2019/02/1-3.png" alt="1.- Install python-pip" width="815" height="344" srcset="https://www.osradar.com/wp-content/uploads/2019/02/1-3.png 815w, https://www.osradar.com/wp-content/uploads/2019/02/1-3-300x127.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/1-3-768x324.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/1-3-696x294.png 696w" sizes="(max-width: 815px) 100vw, 815px" /><figcaption id="caption-attachment-10536" class="wp-caption-text">1.- Install python-pip</figcaption></figure></p>
<p>In case you are using Arch Linux or derivates, you can install it with this command:</p>
<pre class="">:~$ sudo pacman -S pyhton-pip</pre>
<p>On CentOS 7 and RHEL:</p>
<pre class="">:~$ su
:~# yum install epel-release
:~# yum install python-pip</pre>
<p>Next, install rm-protection.</p>
<pre class="">:~$ sudo -H pip install rm-protection</pre>
<p><figure id="attachment_10537" aria-describedby="caption-attachment-10537" style="width: 477px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10537" src="https://www.osradar.com/wp-content/uploads/2019/02/2-3.png" alt="2.- install rm-protection" width="477" height="123" srcset="https://www.osradar.com/wp-content/uploads/2019/02/2-3.png 477w, https://www.osradar.com/wp-content/uploads/2019/02/2-3-300x77.png 300w" sizes="(max-width: 477px) 100vw, 477px" /><figcaption id="caption-attachment-10537" class="wp-caption-text">2.- install rm-protection</figcaption></figure></p>
<p>Next, use the command to protect your file. For example, I have one file called examplerm.txt.</p>
<pre class="">:~$ protect examplerm.txt</pre>
<p><figure id="attachment_10539" aria-describedby="caption-attachment-10539" style="width: 800px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10539" src="https://www.osradar.com/wp-content/uploads/2019/02/3-333.png" alt="3- protect your files using rm-protection" width="800" height="188" srcset="https://www.osradar.com/wp-content/uploads/2019/02/3-333.png 800w, https://www.osradar.com/wp-content/uploads/2019/02/3-333-300x71.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/3-333-768x180.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/3-333-696x164.png 696w" sizes="(max-width: 800px) 100vw, 800px" /><figcaption id="caption-attachment-10539" class="wp-caption-text">3- protect your files using rm-protection</figcaption></figure></p>
<p>Then, the tool will ask your to set a question and answer. If you want to eliminate it, it will ask you a question and you must answer it correctly.</p>
<p>Now, try to remove it.</p>
<pre class="">:~$ rm-p example.txt</pre>
<p>You will see this:</p>
<p><figure id="attachment_10540" aria-describedby="caption-attachment-10540" style="width: 833px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10540" src="https://www.osradar.com/wp-content/uploads/2019/02/4-2.png" alt="4.- The questions" width="833" height="160" srcset="https://www.osradar.com/wp-content/uploads/2019/02/4-2.png 833w, https://www.osradar.com/wp-content/uploads/2019/02/4-2-300x58.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/4-2-768x148.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/4-2-696x134.png 696w" sizes="(max-width: 833px) 100vw, 833px" /><figcaption id="caption-attachment-10540" class="wp-caption-text">4.- The questions</figcaption></figure></p>
<p>As you can see, you have to answer the question. If you don not answer the question correctly, the program will not allow you to remove the file.</p>
<p><figure id="attachment_10541" aria-describedby="caption-attachment-10541" style="width: 811px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10541" src="https://www.osradar.com/wp-content/uploads/2019/02/5-3.png" alt="5.- Wrong answer" width="811" height="227" srcset="https://www.osradar.com/wp-content/uploads/2019/02/5-3.png 811w, https://www.osradar.com/wp-content/uploads/2019/02/5-3-300x84.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/5-3-768x215.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/5-3-696x195.png 696w" sizes="(max-width: 811px) 100vw, 811px" /><figcaption id="caption-attachment-10541" class="wp-caption-text">5.- Wrong answer</figcaption></figure></p>
<p>However, if you type the answer, then you will remove it.</p>
<p><figure id="attachment_10542" aria-describedby="caption-attachment-10542" style="width: 763px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10542" src="https://www.osradar.com/wp-content/uploads/2019/02/6-3.png" alt="6.- Deleting a file" width="763" height="149" srcset="https://www.osradar.com/wp-content/uploads/2019/02/6-3.png 763w, https://www.osradar.com/wp-content/uploads/2019/02/6-3-300x59.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/6-3-696x136.png 696w" sizes="(max-width: 763px) 100vw, 763px" /><figcaption id="caption-attachment-10542" class="wp-caption-text">6.- Deleting a file</figcaption></figure></p>
<p>The script is very good, but not infallible. The root user can delete without knowing the answer to the question, just as if the user knows the answer as well. Use it more than anything to avoid accidents, not to give security to the system.</p>
<p>If you want more security, I recommend to you create a Alias and change rm for rm-p.</p>
<h2>2.- Protect your files using the chattr command</h2>
<p>The second form is somewhat more drastic than the first and is using the chattr command. It is a command available on almost all Linux distributions.</p>
<p>Its usage is like this:</p>
<pre class="">:~$ chattr [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files</pre>
<p>Do not worry, it is too easy to use it.</p>
<p>For example, I will protect one file called examplechattr.txt.</p>
<pre class="">:~$ sudo chattr +i examplechattr.txt</pre>
<p>&nbsp;</p>
<p><figure id="attachment_10543" aria-describedby="caption-attachment-10543" style="width: 779px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10543" src="https://www.osradar.com/wp-content/uploads/2019/02/7-3.png" alt="7.- Protect a file using chattr" width="779" height="231" srcset="https://www.osradar.com/wp-content/uploads/2019/02/7-3.png 779w, https://www.osradar.com/wp-content/uploads/2019/02/7-3-300x89.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/7-3-768x228.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/7-3-696x206.png 696w" sizes="(max-width: 779px) 100vw, 779px" /><figcaption id="caption-attachment-10543" class="wp-caption-text">7.- Protect a file using chattr</figcaption></figure></p>
<p>I&#8217;ll explain briefly. Chattr has an operator like + that adds a feature or &#8211; that removes it. Option i indicates that the file is immutable, i.e. it cannot be deleted.</p>
<p>&nbsp;</p>
<p>Let us try to remove it.</p>
<p><figure id="attachment_10544" aria-describedby="caption-attachment-10544" style="width: 777px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10544" src="https://www.osradar.com/wp-content/uploads/2019/02/8-3.png" alt="8.- The file is protected" width="777" height="237" srcset="https://www.osradar.com/wp-content/uploads/2019/02/8-3.png 777w, https://www.osradar.com/wp-content/uploads/2019/02/8-3-300x92.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/8-3-768x234.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/8-3-696x212.png 696w" sizes="(max-width: 777px) 100vw, 777px" /><figcaption id="caption-attachment-10544" class="wp-caption-text">8.- The file is protected</figcaption></figure></p>
<p>As you can see, even the root user is not allowed to remove the file.</p>
<p>If you want to remove this attribute, you can do so with this command:</p>
<pre class="">:~$ sudo chattr -i examplechattr.txt</pre>
<p><figure id="attachment_10545" aria-describedby="caption-attachment-10545" style="width: 799px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10545" src="https://www.osradar.com/wp-content/uploads/2019/02/9-3.png" alt="9.- Revoke the i attribute" width="799" height="121" srcset="https://www.osradar.com/wp-content/uploads/2019/02/9-3.png 799w, https://www.osradar.com/wp-content/uploads/2019/02/9-3-300x45.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/9-3-768x116.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/9-3-696x105.png 696w" sizes="(max-width: 799px) 100vw, 799px" /><figcaption id="caption-attachment-10545" class="wp-caption-text">9.- Revoke the i attribute</figcaption></figure></p>
<p>Now, you can delete it.</p>
<p>The same way you can protect entire folders. For example:</p>
<pre class="">:~$ sudo chattr -R +i Example/</pre>
<p><figure id="attachment_10546" aria-describedby="caption-attachment-10546" style="width: 779px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-10546" src="https://www.osradar.com/wp-content/uploads/2019/02/10-3.png" alt="10.- Protecting a folder" width="779" height="226" srcset="https://www.osradar.com/wp-content/uploads/2019/02/10-3.png 779w, https://www.osradar.com/wp-content/uploads/2019/02/10-3-300x87.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/10-3-768x223.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/10-3-696x202.png 696w" sizes="(max-width: 779px) 100vw, 779px" /><figcaption id="caption-attachment-10546" class="wp-caption-text">10.- Protecting a folder</figcaption></figure></p>
<p>To revoke it</p>
<pre class="">:~$ sudo chattr -R -i Example/</pre>
<p>So, that&#8217;s it.</p>
<h2>Conclusion</h2>
<p>The protection of data and files is an essential task of a sysadmin, for it there are two very simple ways to do it.</p>
<p>Please share this post with your friends.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/protect-your-files-from-accidental-deletion/">Protect your files from accidental deletion</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/protect-your-files-from-accidental-deletion/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
