<?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>Centos7 Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/centos7/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 11 Feb 2019 09:55:56 +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>Join CentOS7 system into Windows Domain</title>
		<link>https://www.osradar.com/join-centos7-system-into-windows-domain/</link>
					<comments>https://www.osradar.com/join-centos7-system-into-windows-domain/#respond</comments>
		
		<dc:creator><![CDATA[osradar_editor]]></dc:creator>
		<pubDate>Mon, 11 Feb 2019 09:54:42 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Centos7]]></category>
		<category><![CDATA[Windows Active Directory]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=10675</guid>

					<description><![CDATA[<p>Why? That&#8217;s a good question. Why? That&#8217;s because then it allows us to authenticate users centrally whom already has Windows Active Directory user accounts. This really comes handy as we then don&#8217;t need to provision CentOS local user account as new users are in demand for server access. Think about a scenario, for example, a [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/join-centos7-system-into-windows-domain/">Join CentOS7 system into Windows Domain</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Why?<br />
That&#8217;s a good question. Why? That&#8217;s because then it allows us to authenticate users centrally whom already has Windows Active Directory user accounts. This really comes handy as we then don&#8217;t need to provision CentOS local user account as new users are in demand for server access. Think about a scenario, for example, a company whose having thousands of users who wish to have server access for  system administration. That would be a pain in the neck if our plan to setup each individual accounts locally. Problem even get started to worse if the server count increase over the time. Thus, having your LInux systems&#8217;s authentication over Windows Active Directory should be one of the obvious solutions.</p>
<h3>Getting Started</h3>
<p>This tutorial is based on the following configuration:</p>
<ul>
<li>domain name : osradar.com</li>
<li>workgroup : OSRADAR</li>
<li>kerberos realm : OSRADAR.COM</li>
<li>Winsdows AD IP address: 172.17.0.51</li>
<li>Windows AS DNS name: windows-ad.osradar.com</li>
<li>a valid user called &#8220;winaduser01&#8221; already existed at Windows AD.</li>
</ul>
<p>01. Install packages</p>
<pre class=""># yum install krb5-workstation pam_krb5 samba samba-client samba-winbind authconfig</pre>
<p>&nbsp;</p>
<p>02. Ensure that the clocks on both systems are in sync. Time synchronization is essential for Kerberos to work.</p>
<p>03. To have working DNS resolution, point all Linux client systems to Windows AD &#8211; Essential for Kerberos to work. Optionally, you can also work with /etc/hosts if required.</p>
<pre class=""># vim /etc/hosts

172.17.0.51 windows-ad.osradar.com</pre>
<p>04. Configure Kerberos to use AD Kerberos realm.</p>
<pre class="lang:sh decode:true"># vi /etc/krb5.conf

[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log

[libdefaults]
dns_lookup_realm = true
dns_lookup_kdc = true

ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = false
default_realm = OSRADAR.COM
default_ccache_name = KEYRING:persistent:%{uid}

[realms]
OSRADAR.COM = {
kdc = 172.17.0.51
admin_server = 172.17.0.51
}
</pre>
<p>&nbsp;</p>
<p>05. Verify Kerberos operation &#8211; (Assume following winaduser01 exist on the Windows AD)</p>
<pre class=""># kinit winaduser01
Password for winaduser01@OSRADAR.COM:</pre>
<p>(This of course is to get a Kerberos Ticket for our Linux client system)</p>
<pre class=""># klist

Ticket cache: FILE:/tmp/krb5cc_0
Default principal: winaduser01@OSRADAR.COM
Valid starting Expires Service principal
04/27/2019 00:42:19 04/27/2019 10:42:19 krbtgt/OSRADAR.COM@OSRADAR.COM
renew until 05/04/2019 00:42:10</pre>
<p>(To list whether do we have valid Kerberos Tickets now..)</p>
<pre class=""># kdestroy</pre>
<p>(Optionally, if you want to remove the existing Kerberos Ticket)</p>
<p>&nbsp;</p>
<p>06. Configure Samba to connect to AD server.</p>
<pre class="lang:sh decode:true "># vi /etc/samba/smb.conf

[global]
workgroup = OSRADAR
realm = OSRADAR.COM
security = ads
idmap config * : range = 16777216-33554431
winbind separator = +
template homedir = /home/%U
template shell = /bin/bash
kerberos method = secrets only
winbind use default domain = true
winbind offline logon = true

server string = Samba Server Version %v
netbios name = MYLINUXPC1
interfaces = lo ens9 172.17.0.0/24
hosts allow = 127. 172.17.0.
passdb backend = tdbsam
winbind enum users = yes
winbind enum groups = yes
client use spnego = yes
client ntlmv2 auth = yes
encrypt passwords = yes
idmap config MYCOMPANY:backend = rid
idmap config MYCOMPANY:range = 10000000-1999999</pre>
<p>&nbsp;</p>
<p>07. Check for configuration errors if present.</p>
<pre class=""># testparm</pre>
<p>&nbsp;</p>
<p>08. Configure NSS and PAM to use winbind for system authentication</p>
<pre class=""># authconfig --enablewinbind --enablewins --enablewinbindauth --update</pre>
<p>&nbsp;</p>
<p>09. Service Restarts</p>
<pre class=""># systemctl restart smb
# systemctl restart winbind</pre>
<p>&nbsp;</p>
<p>10. Lets add our linux client machine to the Winsows AD Domain</p>
<pre class=""># kinit winaduser01</pre>
<pre class=""># net ads join -U winaduser01
Enter winaduser's password:
Joined 'MYLINUXPC1' to dns domain 'OSRADAR.COM'</pre>
<p>&nbsp;</p>
<p>Congratulations. If you see the above message, it confirms that your Linux system is correctly joined with WIndows. Now, you can perform any user authentication against any user who has a valid account on windows Active Directory.</p>
<p>Optionally, if you want to leave the joined domains</p>
<pre class=""># net ads leave -U winaduser01</pre>
<p>&nbsp;</p>
<p><em><strong>&#8220;I hope this has been informative for you..&#8221;</strong></em></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/join-centos7-system-into-windows-domain/">Join CentOS7 system into Windows Domain</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/join-centos7-system-into-windows-domain/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to configure HAProxy Load Balancing on Centos 7</title>
		<link>https://www.osradar.com/how-to-configure-haproxy-load-balancing-on-centos-7/</link>
					<comments>https://www.osradar.com/how-to-configure-haproxy-load-balancing-on-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Tue, 05 Jun 2018 11:31:43 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Centos7]]></category>
		<category><![CDATA[HAProxy]]></category>
		<category><![CDATA[loadbalancer]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=3474</guid>

					<description><![CDATA[<p>Load balancing refers to efficiently distributing incoming network traffic across a group of backend servers, also known as a server farm or server pool. A load balancer acts as the “traffic cop” sitting in front of your servers and routing client requests across all servers capable of fulfilling those requests in a manner that maximizes [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-configure-haproxy-load-balancing-on-centos-7/">How to configure HAProxy Load Balancing 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>Load balancing refers to efficiently distributing incoming network traffic across a group of backend servers, also known as a server farm or server pool.<br />
A load balancer acts as the “traffic cop” sitting in front of your servers and routing client requests across all servers capable of fulfilling those requests in a manner that maximizes speed and capacity utilization and ensures that no one server is overworked, which could degrade performance. If any server goes down, the load balancer redirects traffic to the remaining online servers. When a new server is added to the server group, the load balancer automatically starts to send requests to it.<br />
In this manner, a load balancer performs the following functions:<br />
• Distributes client requests or network load efficiently across multiple servers<br />
• Ensures high availability and reliability by sending requests only to servers that are online<br />
• Provides the flexibility to add or subtract servers as demand dictates</p>
<p>To install and configure HAProxy loadbalancer we will consider below senario</p>
<ol>
<li>One is web server1&gt;IP Address: 192.168.248.132&gt;Hostname:system1.osradar.com</li>
<li>Two is web server2&gt;IP Address: 192.168.248.133&gt;Hostname:system2.osradar.com</li>
<li>HAproxyloadbalancer&gt;IPAddress:192.168.248.134&gt;Hostname:loadbalancer.osradar.com</li>
</ol>
<p>First make sure that you systems has above host name and IP Address.</p>
<p>Step 01: To check hostname (for three systems)<br />
<em><strong>#hostnamectl status</strong></em><br />
<em>Static hostname: system1.osradar.com</em><br />
<em>Static hostname: system2.osradar.com</em><br />
<em>Static hostname: loadbalancer.osradar.com</em></p>
<p>Step 02: To Check IP Address (for three system)<br />
<em><strong>#ip addr</strong></em><br />
or<br />
<em><strong>#ifconfig</strong></em><br />
<em>inet 192.168.248.132 netmask 255.255.255.0 broadcast 192.168.248.255</em><br />
<em>inet 192.168.248.133 netmask 255.255.255.0 broadcast 192.168.248.255</em><br />
<em>inet 192.168.248.134 netmask 255.255.255.0 broadcast 192.168.248.255</em></p>
<p>Step 03: Insert below information to all systems(system1, system2 and loadbalancer) <strong>/etc/hosts</strong> file<br />
<em><strong>#vim /ete/hosts</strong></em><br />
<em>192.168.248.132 system1.osradar.com system1</em><br />
<em>192.168.248.133 system2.osradar.com system2</em><br />
<em>192.168.248.134 loadbalancer.osradar.com loadbalancer</em><br />
<img loading="lazy" class="alignnone wp-image-3762 size-full" src="https://www.osradar.com/wp-content/uploads/2018/06/hosts-1.png" alt="" width="929" height="156" srcset="https://www.osradar.com/wp-content/uploads/2018/06/hosts-1.png 929w, https://www.osradar.com/wp-content/uploads/2018/06/hosts-1-300x50.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/hosts-1-768x129.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/hosts-1-696x117.png 696w" sizes="(max-width: 929px) 100vw, 929px" /></p>
<p>Step 04: To check that you can reach each system<br />
<em><strong>#ping system1</strong></em><br />
<em><strong>#ping system2</strong></em><br />
<em><strong>#Pint loadbalancer</strong></em></p>
<p>Step 05: Now install httpd to systems (system1, system2)<br />
<em><strong>#yum install httpd -y</strong></em><br />
<em><strong>#systemctl start httpd</strong></em><br />
<em><strong>#systemctl enable httpd</strong></em><br />
<em><strong>#firewall-cmd &#8211;permanent &#8211;zone=public &#8211;add-service=http</strong></em><br />
<em><strong>#firewall-cmd &#8211;permanent &#8211;zone=public &#8211;add-service=https</strong></em><br />
<em><strong>#firewall-cmd &#8211;reload</strong></em><br />
<em><strong>#firewall-cmd &#8211;list-all</strong></em> (to ckeck status)</p>
<p>Step 06: To check your web service is ok visit 192.168.248.132 and 192.168.248.133 from your systems browser. You will find that Apahe test page appears.<br />
<img loading="lazy" class="alignnone wp-image-3765 size-large" src="https://www.osradar.com/wp-content/uploads/2018/06/test123-1024x365.png" alt="" width="696" height="248" srcset="https://www.osradar.com/wp-content/uploads/2018/06/test123-1024x365.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/test123-300x107.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/test123-768x274.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/test123-696x248.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/test123-1068x381.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/test123-1178x420.png 1178w, https://www.osradar.com/wp-content/uploads/2018/06/test123.png 1330w" sizes="(max-width: 696px) 100vw, 696px" /></p>
<p>You can make different index.html files for system1 and system2. So that you can get the difference. Here, we create <strong>index.html</strong> for system1 and system2 under <strong>/var/www/html</strong></p>
<p><em><strong>#vim /var/www/html/index.html</strong></em> (for system1)<br />
<em>This is &lt;h1&gt;system1&lt;/h1&gt;.osradar.com</em><br />
<em>Website</em><br />
<em>&lt;h3&gt;IP: 192.168.248.132&lt;/h3&gt;</em><br />
<em>#vim /var/www/html/index.html (for system2)</em><br />
<em>This is &lt;h1&gt;system2&lt;/h1&gt;.osradar.com</em><br />
<em>Website</em><br />
<em>&lt;h3&gt;IP: 192.168.248.133&lt;/h3&gt;</em></p>
<p><img loading="lazy" class="alignnone wp-image-3767 size-large" src="https://www.osradar.com/wp-content/uploads/2018/06/system1-1024x446.png" alt="" width="696" height="303" srcset="https://www.osradar.com/wp-content/uploads/2018/06/system1-1024x446.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/system1-300x131.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/system1-768x335.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/system1-696x303.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/system1-1068x466.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/system1-963x420.png 963w, https://www.osradar.com/wp-content/uploads/2018/06/system1.png 1360w" sizes="(max-width: 696px) 100vw, 696px" /> <img loading="lazy" class="alignnone wp-image-3768 size-large" src="https://www.osradar.com/wp-content/uploads/2018/06/system2-1024x446.png" alt="" width="696" height="303" srcset="https://www.osradar.com/wp-content/uploads/2018/06/system2-1024x446.png 1024w, https://www.osradar.com/wp-content/uploads/2018/06/system2-300x131.png 300w, https://www.osradar.com/wp-content/uploads/2018/06/system2-768x335.png 768w, https://www.osradar.com/wp-content/uploads/2018/06/system2-696x303.png 696w, https://www.osradar.com/wp-content/uploads/2018/06/system2-1068x466.png 1068w, https://www.osradar.com/wp-content/uploads/2018/06/system2-963x420.png 963w, https://www.osradar.com/wp-content/uploads/2018/06/system2.png 1360w" sizes="(max-width: 696px) 100vw, 696px" /></p>
<p>Step 07: Install HAProxy on loadbalancer system and configure<br />
<em><strong>#yum install haproxy.x86_64 -y</strong></em><br />
<em><strong>#vim /etc/haproxy/haproxy.cfg</strong></em><br />
at the end of this file paste following information, save and exit.</p>
<h6>##############Frontend Server Configuration##########<br />
<em>frontend webapp</em><br />
<em>bind *:80</em><br />
<em>default_backend webserver</em></h6>
<p>#####################Backend Server Configuration##########</p>
<p><em>backend webserver</em><br />
<em>balance roundrobin</em><br />
<em>server system1 192.168.248.132:80 check</em><br />
<em>server system2 192.168.248.133:80 check</em></p>
<p>Step 08: Now we will check firewall status<br />
<em><strong>#firewall-cmd &#8211;list-all</strong></em><br />
If we found that port 80 and 8080 is not added in firewall then we have to add</p>
<p><em><strong>#firewall-cmd &#8211;permanent &#8211;zone=public &#8211;add-port=80/tcp</strong></em><br />
<em><strong>#firewall-cmd &#8211;permanent &#8211;zone=public &#8211;add-port=8080/tcp</strong></em><br />
<em><strong>#firewall-cmd &#8211;reload</strong></em></p>
<p>Step 09: We will change SeLinux status from enforcing to permissive<br />
<em><strong>#setenforce 0</strong></em></p>
<p>Step 10:<br />
<em><strong>#systemctl start haproxy.service</strong></em><br />
<em><strong>#systemctl enable haproxy.service</strong></em></p>
<p>From loadbalancer system web browser visit 192.168.248.134. Hit(refresh) this IP two/three times and you will see web page from system1 and system2 are visible.</p>
<p><img loading="lazy" class="aligncenter size-full wp-image-3773" src="https://www.osradar.com/wp-content/uploads/2018/06/loadbalance.png" alt="" width="560" height="321" srcset="https://www.osradar.com/wp-content/uploads/2018/06/loadbalance.png 560w, https://www.osradar.com/wp-content/uploads/2018/06/loadbalance-300x172.png 300w" sizes="(max-width: 560px) 100vw, 560px" /></p>
<p>That&#8217;s how loadbalancer works.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-configure-haproxy-load-balancing-on-centos-7/">How to configure HAProxy Load Balancing 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-configure-haproxy-load-balancing-on-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
