<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hüseyin Bagirli on Medium]]></title>
        <description><![CDATA[Stories by Hüseyin Bagirli on Medium]]></description>
        <link>https://medium.com/@bagirlihuseyn089?source=rss-65eff4da9c24------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MFjq0ungq-czDQfM-aRhvA.jpeg</url>
            <title>Stories by Hüseyin Bagirli on Medium</title>
            <link>https://medium.com/@bagirlihuseyn089?source=rss-65eff4da9c24------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 02:21:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bagirlihuseyn089/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[LAMP SERVER Installation and Configuration in Centos]]></title>
            <link>https://medium.com/@bagirlihuseyn089/lamp-server-installation-and-configuration-in-centos-fde15e5035b4?source=rss-65eff4da9c24------2</link>
            <guid isPermaLink="false">https://medium.com/p/fde15e5035b4</guid>
            <dc:creator><![CDATA[Hüseyin Bagirli]]></dc:creator>
            <pubDate>Mon, 11 Mar 2024 17:39:27 GMT</pubDate>
            <atom:updated>2024-03-11T17:39:27.085Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bFfNw6FgwQxR8hMQ" /></figure><p>İlk öncə LAMP -ın nə olduğunu öyrənək. Əgər bizim kiçik bir proektimiz varsa o zaman biz bir Linux serverimizdə həm Apache və Database (MySql , MariaDB) quraşdırırıq.</p><p>İndi isə biz bir LAMP (Linux ,APACHE, MARİADB,PHP) serveri quraq</p><p>İlk Öncə lazım olan paketleri yükləyirik</p><pre>sudo yum install mariadb mariadb-server  httpd -y</pre><p>Daha sonra Php ni Və onun MariaDB ilə işləyə bilməsi üçün php-mysqlnd paketini yükləyirik</p><pre>sudo dnf install php php-mysqlnd -y</pre><p>Enable , Start MariaDB service</p><pre>systemctl enable --now mariadb</pre><p>Mysql Secure insallation edirik</p><pre>sudo mysql_secure_installation</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*OAm1ZtL4iHDW5mPqMWo_4A.png" /></figure><p>İndi isə MariaDB -yə təyin etdiyimiz Password vasitəsilə daxil oluruq</p><p>MyPassword = 123</p><pre>mysql -u root -p123</pre><p>Creat Database</p><pre>create database kurs;</pre><p>Daha sonra table yaradırıq və ora daxil edəcəyimiz dataların type -nı qeyd edirik</p><pre>use kurs ;<br>create  table students ( ID INT  AUTO_INCREMENT , NAME VARCHAR(20) NOT NULL, SURNAME VARCHAR(20) , AGE INT NOT NULL ,PRIMARY KEY (ID));</pre><p>İndi İsə Məlumatları daxil edirik (İnsert Data)</p><pre>insert into students (NAME ,SURNAME ,AGE ) values (&#39;HUSEYN&#39; , &#39;BAGHIRLI&#39; , 22 ) ;<br>insert into students (NAME ,SURNAME ,AGE ) values (&#39;ALI&#39; , &#39;TOSAYEV&#39; , 29 ) ;<br>insert into students (NAME ,SURNAME ,AGE ) values (&#39;TURAL&#39; , &#39;TAGHIYEV&#39; , 33 ) ;<br>insert into students (NAME ,SURNAME ,AGE ) values (&#39;OKTAY&#39; , &#39;BAXSALIYEV&#39; , 38 ) ;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZBTdnvXFqcFJax1_wkaVQ.png" /></figure><p>Daha Sonra Php useri yaradiriq Və Ona Password (123) təyin edirik</p><pre>GRANT ALL ON kurs.* TO &#39;php_user&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;123&#39; WITH GRANT OPTION;<br>exit</pre><p>Daha Sonra Php faylimizi yaradiriq</p><pre>vim /var/www/html/info.php</pre><p>Biz burda Php nin MariaDB ilə bağlanılmasını təmin edirik</p><pre>&lt;?php<br>$user = &quot;php_user&quot;;<br>$password = &quot;123&quot;;<br>$database = &quot;kurs&quot;;<br>$table = &quot;students&quot;;<br><br>try {<br>  $db = new PDO(&quot;mysql:host=localhost;dbname=$database&quot;, $user, $password);<br>  echo &quot;&lt;h2&gt;TODO&lt;/h2&gt;&lt;ol&gt;&quot;;<br>  foreach($db-&gt;query(&quot;select * from $table&quot;) as $row) {<br>    echo &quot;&lt;li&gt;&quot; . $row[&#39;NAME&#39;] . &quot; &quot; . $row[&#39;SURNAME&#39;] . &quot;, Age: &quot; . $row[&#39;AGE&#39;] . &quot;&lt;/li&gt;&quot;;<br>  }<br>  echo &quot;&lt;/ol&gt;&quot;;<br>} catch (PDOException $e) {<br>  print &quot;Bağlantı hatası: &quot; . $e-&gt;getMessage() . &quot;&lt;br/&gt;&quot;;<br>  die();<br>}<br>?&gt;</pre><p>Add port Firewall and restart httpd</p><pre> firewall-cmd --add-port=80/tcp  --permanent<br>firewall-cmd --reload<br>systemctl restart httpd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*cWTOLjAH9ciHWN5gT-fVGw.png" /></figure><p>İstəyimizə uygun Scriptə CSS və HTML kodları əlavə edə bilərik</p><pre>&lt;?php<br>$user = &quot;php_user&quot;;<br>$password = &quot;123&quot;;<br>$database = &quot;kurs&quot;;<br>$table = &quot;students&quot;;<br><br>try {<br>  $db = new PDO(&quot;mysql:host=localhost;dbname=$database&quot;, $user, $password);<br>  echo &quot;&lt;h2 style=&#39;color: #009688;&#39;&gt;Telebeler&lt;/h2&gt;&quot;;<br>  echo &quot;&lt;table class=&#39;styled-table&#39;&gt;&quot;;<br>  echo &quot;&lt;thead&gt;&lt;tr&gt;&lt;th style=&#39;background-color: #009688;&#39;&gt;ID&lt;/th&gt;&lt;th style=&#39;background-color: #009688;&#39;&gt;Ad&lt;/th&gt;&lt;th style=&#39;background-color: #009688;&#39;&gt;Soyad&lt;/th&gt;&lt;th style=&#39;background-color: #009688;&#39;&gt;Yaş&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&quot;;<br>  echo &quot;&lt;tbody&gt;&quot;;<br>  foreach($db-&gt;query(&quot;select * from $table&quot;) as $row) {<br>    echo &quot;&lt;tr&gt;&lt;td&gt;&quot; . $row[&#39;ID&#39;] . &quot;&lt;/td&gt;&lt;td&gt;&quot; . $row[&#39;NAME&#39;] . &quot;&lt;/td&gt;&lt;td&gt;&quot; . $row[&#39;SURNAME&#39;] . &quot;&lt;/td&gt;&lt;td&gt;&quot; . $row[&#39;AGE&#39;] . &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;<br>  }<br>  echo &quot;&lt;/tbody&gt;&quot;;<br>  echo &quot;&lt;/table&gt;&quot;;<br>} catch (PDOException $e) {<br>  print &quot;Bağlantı hatası: &quot; . $e-&gt;getMessage() . &quot;&lt;br/&gt;&quot;;<br>  die();<br>}<br>?&gt;<br><br>&lt;style&gt;<br>/* style.css */<br>.styled-table {<br>  width: 100%;<br>  border-collapse: collapse;<br>  margin: 25px 0;<br>  font-size: 1em;<br>  font-family: Arial, sans-serif;<br>  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);<br>}<br><br>.styled-table thead th {<br>  padding: 12px 15px;<br>  font-weight: bold;<br>  color: #fff;<br>}<br><br>.styled-table tbody td {<br>  padding: 12px 15px;<br>}<br><br>.styled-table tbody tr:nth-of-type(odd) {<br>  background-color: #f9f9f9;<br>}<br><br>.styled-table tbody tr:hover {<br>  background-color: #f2f2f2;<br>}<br>&lt;/style&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*hH0fYj2Lm1VmdTvsJ2LKtw.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fde15e5035b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup MariaDB Master-Slave Replication In CentOS,Redhat]]></title>
            <link>https://medium.com/@bagirlihuseyn089/setup-mariadb-master-slave-replication-in-centos-redhat-61f0cde4592e?source=rss-65eff4da9c24------2</link>
            <guid isPermaLink="false">https://medium.com/p/61f0cde4592e</guid>
            <dc:creator><![CDATA[Hüseyin Bagirli]]></dc:creator>
            <pubDate>Tue, 30 Jan 2024 09:34:05 GMT</pubDate>
            <atom:updated>2024-01-30T09:34:05.392Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Master-Slave Replication</strong> bir çox sistemdə məlumatların çoxsaylı nüsxələrini saxlamaq üçün bir üsuldur və məlumatlar avtomatik olaraq bir verilənlər bazasından (Master) digər verilənlər bazasına (Slave) kopyalanacaq. Bir server sıradan çıxsa, müştərilər yenə də digər (Slave) server verilənlər bazasından məlumat əldə edə bilərlər.</p><p>İndi isə Mariadb Database server üçün replikasiyasını quraşdıraq.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Ja_PIe9Zw4IP0WgIMlpfCQ.png" /></figure><p>Bunun üçün bizə iki ədəd VM (Virtual Machine) lazim olacaq .</p><ul><li><strong>MariaDB Master:</strong> CentOS 7 64bit Minimal Server</li><li><strong>Master IP Address:</strong> 192.168.100.106/24</li><li><strong>MariaDB Slave:</strong> CentOS 7 64bit Minimal Server</li><li><strong>Slave IP Address:</strong> 192.168.1.102/24</li></ul><h3>İlk once Masterde konfiqurasiyaları edək.</h3><p>İlk öncə MariaDb-nin Clinet və Server paketlərini yükləyirik.</p><pre>yum install mariadb-server mariadb -y</pre><p>Daha Sonra Mariadb nin servisin enable edib restart edirik</p><pre>systemctl start mariadb<br>systemctl enable mariadb</pre><p>Daha Sonra Mariadbni installation edirik. Burda root userine icaze verib Parolun deyişirik.</p><pre>mysql_secure_installation</pre><p>Və aşağıdakı kimi Daxil edirik</p><pre>/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found<br><br>NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB<br>      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!<br><br>In order to log into MariaDB to secure it, we&#39;ll need the current<br>password for the root user.  If you&#39;ve just installed MariaDB, and<br>you haven&#39;t set the root password yet, the password will be blank,<br>so you should just press enter here.<br><br>Enter current password for root (enter for none): ##press Enter<br>OK, successfully used password, moving on...<br><br>Setting the root password ensures that nobody can log into the MariaDB<br>root user without the proper authorisation.<br><br>Set root password? [Y/n] y ## Enter Y and press Enter<br>New password:   ## Enter new password<br>Re-enter new password:  ## Enter password again<br>Password updated successfully!<br>Reloading privilege tables..<br> ... Success!<br><br><br>By default, a MariaDB installation has an anonymous user, allowing anyone<br>to log into MariaDB without having to have a user account created for<br>them.  This is intended only for testing, and to make the installation<br>go a bit smoother.  You should remove them before moving into a<br>production environment.<br><br>Remove anonymous users? [Y/n] y  ## Enter Y and press Enter<br> ... Success!<br><br>Normally, root should only be allowed to connect from &#39;localhost&#39;.  This<br>ensures that someone cannot guess at the root password from the network.<br><br>Disallow root login remotely? [Y/n] y  ## Enter Y and press Enter<br> ... Success!<br><br>By default, MariaDB comes with a database named &#39;test&#39; that anyone can<br>access.  This is also intended only for testing, and should be removed<br>before moving into a production environment.<br><br>Remove test database and access to it? [Y/n] y  ## Enter Y and press Enter<br> - Dropping test database...<br> ... Success!<br> - Removing privileges on test database...<br> ... Success!<br><br>Reloading the privilege tables will ensure that all changes made so far<br>will take effect immediately.<br><br>Reload privilege tables now? [Y/n] y  ## Enter Y and press Enter<br> ... Success!<br><br>Cleaning up...<br><br>All done!  If you&#39;ve completed all of the above steps, your MariaDB<br>installation should now be secure.<br><br>Thanks for using MariaDB!</pre><p>Daha Sonra Sorğuların gələbilməsi üçün Firewallda icazələr veririk</p><pre>firewall-cmd --permanent --add-port=3306/tcp<br>firewall-cmd --reload</pre><p>Sonra isə /etc/my.cnf fileni redakte edirk. Biz burda Hansi Databasemizin replikasiya olunmasını və Master VM-in İP adresini qeyd edirik</p><pre>[mysqld]<br>log-basename=master<br>log-bin<br>server-id = 1<br>bind-address=192.168.100.106  ##Master server IP<br>binlog-do-db=db1 #Database Name<br>binlog-format=row</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*Gjw6HzPs9fNagp01HWm7eQ.png" /></figure><p>Servisi restart edirik</p><pre>systemctl restart mariadb</pre><p>Mariadbye daxil oluruq.Əvvəlcədən təyin etdiyimiz parolu daxil edirik</p><pre>mysql -u root -p</pre><p>Və replikasiya yerine yetiren bir user yaradib ona acces veririk.</p><pre>MariaDB [(none)]&gt; STOP SLAVE;<br>Query OK, 0 rows affected, 1 warning (0.00 sec)<br><br>MariaDB [(none)]&gt; GRANT REPLICATION SLAVE ON *.* TO &#39;master&#39;@&#39;%&#39; IDENTIFIED BY &#39;centos&#39;;<br>Query OK, 0 rows affected (0.00 sec)<br><br>MariaDB [(none)]&gt; FLUSH PRIVILEGES;<br>Query OK, 0 rows affected (0.00 sec)<br><br>MariaDB [(none)]&gt; FLUSH TABLES WITH READ LOCK;<br>Query OK, 0 rows affected (0.00 sec)</pre><p>Daha Sonra SHOW MASTER STATUS; edirik .Burdaki məlumatlar</p><p>Bizə Slave serverde lazim olacaq</p><pre>MariaDB [(none)]&gt; SHOW MASTER STATUS;<br>+--------------------+----------+--------------+------------------+<br>| File               | Position | Binlog_Do_DB | Binlog_Ignore_DB |<br>+--------------------+----------+--------------+------------------+<br>| mariadb-bin.000005 |      344 | db1          |                  |<br>+--------------------+----------+--------------+------------------+</pre><pre>1 row in set (0.00 sec)</pre><pre>MariaDB [(none)]&gt; exit<br>Bye</pre><p>Və dB1 databazamizi yaradib.Orda table yaradiriq</p><pre>MariaDB [(none)]&gt; create database db1 ;<br>Query OK, 1 row affected (0.001 sec)</pre><pre>MariaDB [(none)]&gt; use db1<br>Database changed<br>MariaDB [db1]&gt; create  table students ( ID INT  AUTO_INCREMENT ,<br> NAME VARCHAR(20) NOT NULL, SURNAME VARCHAR(20) ,<br> AGE INT NOT NULL ,<br>PRIMARY KEY (ID));<br>Query OK, 0 rows affected (0.011 sec)</pre><p>Daha Sonra databazanin backupin aliriq</p><p><strong>Backup Master server database and transfer it to the Slave</strong></p><pre>mysqldump --all-databases --user=root --password --master-data &gt; masterdatabase.sql</pre><p>Yeniden Mariadbye Daxil Oluruq</p><pre>mysql -u root -p</pre><pre>MariaDB [(none)]&gt; UNLOCK TABLES;<br>Query OK, 0 rows affected (0.00 sec)</pre><pre>MariaDB [(none)]&gt; quit<br>Bye</pre><p>Backup aldigimiz Masteri Scp vasitəsilə Slavə gonderirik.</p><pre>scp masterdatabase.sql root@192.168.100.102:/home</pre><h3>İndi isə Slave Serveri konfuqurasiya edək.</h3><h3>Configure MariaDB Slave</h3><p>Ilk once Mariadbnin Client və server paketlerini yukleyirik</p><pre>yum install mariadb-server mariadb -y</pre><p>Daha Sonra Mariadb nin servisini enable edib restart edirik</p><pre>systemctl start mariadb<br>systemctl enable mariadb</pre><p>Daha Sonra Sorğuların gedəbilməsi üçün Firewallda icazələr veririk.</p><pre>firewall-cmd --permanent --add-port=3306/tcp<br>firewall-cmd --reload</pre><p>Sonra isə <strong>/etc/my.cnf </strong>fileni redakte edirik.</p><pre>[mysqld]<br>server-id = 2<br>replicate-do-db=db1 #Database NAme</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*h3I7ZwwEv3AC0oxtXwywbA.png" /></figure><p>Masterde Aldigimiz backupu Slave de restore edirik</p><pre>mysql -u root -p &lt; /home/masterdatabase.sql</pre><p>Servisi restart edirik</p><pre>systemctl restart mariadb</pre><p>Mariadbye daxil olub . Master Server haqqinda məlumatlari qeyd edirik.</p><p><em>MASTER_LOG_FILE=’mariadb-bin.000005&#39;,</em></p><p><em>MASTER_LOG_POS=838;</em></p><p><em>Bura Masterdə </em><strong>SHOW MASTER STATUS</strong>; əmrini daxil etdikdə alinan məlumatları daxil edirik</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*Dx2oacdj6ELnj1HmyE2Atg.png" /></figure><pre>MariaDB [(none)]&gt; STOP SLAVE;<br>Query OK, 0 rows affected (0.01 sec)<br><br>MariaDB [(none)]&gt; CHANGE MASTER TO MASTER_HOST=&#39;192.168.100.106&#39;, <br>MASTER_USER=&#39;master&#39;, <br>MASTER_PASSWORD=&#39;centos&#39;, <br>MASTER_LOG_FILE=&#39;mariadb-bin.000005&#39;,<br>MASTER_LOG_POS=838;<br>Query OK, 0 rows affected (0.03 sec)<br><br>MariaDB [(none)]&gt; START SLAVE ;<br>Query OK, 0 rows affected (0.01 sec)<br><br>MariaDB [(none)]&gt; SHOW SLAVE STATUS\G;<br>*************************** 1. row ***************************<br>               Slave_IO_State: Waiting for master to send event<br>                  Master_Host: 192.168.1.150<br>                  Master_User: sk<br>                  Master_Port: 3306<br>                Connect_Retry: 60<br>              Master_Log_File: mariadb-bin.000001<br>          Read_Master_Log_Pos: 460<br>               Relay_Log_File: mariadb-relay-bin.000002<br>                Relay_Log_Pos: 531<br>        Relay_Master_Log_File: mariadb-bin.000001<br>             Slave_IO_Running: Yes<br>            Slave_SQL_Running: Yes<br>              Replicate_Do_DB: unixmen<br>          Replicate_Ignore_DB: <br>           Replicate_Do_Table: <br>       Replicate_Ignore_Table: <br>      Replicate_Wild_Do_Table: <br>  Replicate_Wild_Ignore_Table: <br>                   Last_Errno: 0<br>                   Last_Error: <br>                 Skip_Counter: 0<br>          Exec_Master_Log_Pos: 460<br>              Relay_Log_Space: 827<br>              Until_Condition: None<br>               Until_Log_File: <br>                Until_Log_Pos: 0<br>           Master_SSL_Allowed: No<br>           Master_SSL_CA_File: <br>           Master_SSL_CA_Path: <br>              Master_SSL_Cert: <br>            Master_SSL_Cipher: <br>               Master_SSL_Key: <br>        Seconds_Behind_Master: 0<br>Master_SSL_Verify_Server_Cert: No<br>                Last_IO_Errno: 0<br>                Last_IO_Error: <br>               Last_SQL_Errno: 0<br>               Last_SQL_Error: <br>  Replicate_Ignore_Server_Ids: <br>             Master_Server_Id: 1<br>1 row in set (0.00 sec)</pre><h3>Test MariaDB Replication</h3><p>Master DB-ye daxil olub Bezi melumatlar daxil edirik və Slavedədə yarandığını görürük</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sFOs1i54t63H1Zh6L5wUVA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61f0cde4592e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DHCP Server  installation and confugiration in Centos,Redhat]]></title>
            <link>https://medium.com/@bagirlihuseyn089/dhcp-server-installation-and-confugiration-in-centos-redhat-b2ac0ee3706c?source=rss-65eff4da9c24------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2ac0ee3706c</guid>
            <dc:creator><![CDATA[Hüseyin Bagirli]]></dc:creator>
            <pubDate>Tue, 23 Jan 2024 16:10:26 GMT</pubDate>
            <atom:updated>2024-01-23T16:10:26.616Z</atom:updated>
            <content:encoded><![CDATA[<h3>DHCP Server installation and confugiration in Centos,Redhat</h3><p><strong>DHCP (Dynamic Host Configuration Protocol)</strong> — Dinamik IP adresilərini <a href="https://az.wikipedia.org/wiki/Komp%C3%BCter">kompüterlərə</a> paylayan bir xidmət növüdür.</p><p>UDP <strong>67</strong> və <strong>68</strong> portlarını istifadə edir.</p><p><strong>Dynamic Host Configuration Protocol — yararları</strong></p><ol><li>IP Adresləri avtomatik olaraq kompüterlərə paylanır.</li><li>Böyük şəbəkələrdə İP toqquşmalarının qarşısı alınmış olur.</li><li>Şirkət içərisində tez-tez yerini dəyişən kompterlər üçün İP dəyişmə çətinliyini aradan qaldırır.</li><li>Wins, Gateway, Dns və s. kimi məlumatları birbaşa Server üzərindən daxil etmək imkanı yaradır.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VrhZqQeNTMzV3RSX.jpg" /></figure><p>İndi isə biz Centos,Redhat üzərində DHCP server quracayıq.</p><p>İlk növbədə DHCP server paketini yükləyirik.</p><pre>yum update -y &amp;&amp; yum install dhcp-server -y</pre><p>İndi isə onu konfiqurasiya edək. Bunu üçün <strong>/etc/dhcp/dhcpd.conf</strong></p><p>faylına daxil oluruq.</p><pre>authoritative;<br>#Bizim şəbəkəmiz və Subnet Mask<br>subnet 192.168.1.0 netmask 255.255.255.0 {  <br>#IP aralığımız<br>  range                       192.168.1.10 192.168.1.50;<br>#Default Gateway IP  <br>  option routers              192.168.1.1;<br>  option subnet-mask          255.255.255.0;<br>#Brodcast adress <br>  option broadcast-address    192.168.1.255;<br>  default-lease-time 600;<br>  max-lease-time 7200;<br>}</pre><p>Əgər biz istəyə uyğun İP rezervasiya elemək istəsək.</p><p>Yəni bu<strong> 00:11:22:33:44:55 MAC adresli </strong>cihazın bu <strong>192.168.1.100;</strong></p><p>İP ni almasını istəsək . O zaman bunu əlavə edirik</p><pre>host cihaz_adı {<br>  hardware ethernet 00:11:22:33:44:55;<br>  fixed-address 192.168.1.100;<br>}</pre><p>İndi isə Bizim serverimizə kənarda sorğuların gələ bilməsi üçün</p><p>firewalldan icazələr verək</p><pre>sudo firewall-cmd --permanent --add-service=dhcp<br>sudo firewall-cmd --reload</pre><p>Daha Sonra İsə Serverimizi enable edib restart edək</p><pre>sudo systemctl restart dhcpd<br>sudo systemctl enable dhcpd</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2ac0ee3706c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bind Dns Server installation and confugiration in Centos,Redhat]]></title>
            <link>https://medium.com/@bagirlihuseyn089/bind-dns-server-installation-and-confugiration-in-centos-redhat-d49b1b94abff?source=rss-65eff4da9c24------2</link>
            <guid isPermaLink="false">https://medium.com/p/d49b1b94abff</guid>
            <dc:creator><![CDATA[Hüseyin Bagirli]]></dc:creator>
            <pubDate>Mon, 22 Jan 2024 08:22:05 GMT</pubDate>
            <atom:updated>2024-01-22T09:13:07.749Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HFF5veRncIErJyNE.jpg" /></figure><p>Əvvəcə Bind və onun utiltslərini yükləyirik</p><pre>yum install bind bind-utils -y #Bind Installation  </pre><p>Daha Sonra isə Bind servisinin statusuna baxiriq</p><blockquote>Redhat,Centos,Fedorada bu service <strong>Named</strong> olaraq adlanir</blockquote><pre>systemctl status named</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*CxaUCIEPZ_iFUYxh5yhBrQ.png" /></figure><p>Sonra isə config faylına daxil oluruq</p><pre>vi /etc/named.conf</pre><p>Və burda bəzi əlavalər edirikki bizim serverimiz digər clientlərdən gələn sorğuları qəbul edə bilsin.</p><pre>options {<br>        listen-on port 53 { 127.0.0.1; any; };  #Buraya any əlavə edirik<br>        listen-on-v6 port 53 { ::1; };<br>        directory       &quot;/var/named&quot;;<br>        dump-file       &quot;/var/named/data/cache_dump.db&quot;;<br>        statistics-file &quot;/var/named/data/named_stats.txt&quot;;<br>        memstatistics-file &quot;/var/named/data/named_mem_stats.txt&quot;;<br>        secroots-file   &quot;/var/named/data/named.secroots&quot;;<br>        recursing-file  &quot;/var/named/data/named.recursing&quot;;<br>        allow-query     { localhost; any; };  #Buraya any əlavə edirik</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*ygx9qfRqmOt9XFfzQzlfTg.png" /></figure><p>Daha Sonra isə forward və revers zone filellarin configə əlavə edirik</p><pre>###########################ZONE_CONFIGS###################<br>##forward_zone<br>zone &quot;test.local.&quot; IN {   ## test.local - Bu bizim domeinimizdir<br>        type master; <br>        file &quot;forward_zone.test.local&quot;; ##forward_zone file<br>        allow-update {none; }; <br> <br>};<br><br>##revers_zone<br>zone &quot;100.168.192.in-addr.arpa&quot; IN {  ##Bu bizim şəbəkəmizdir<br>        type master;<br>        file &quot;reverse_zone.test.local&quot;; ##reverse_zone file<br>        forwarders {};<br>};<br><br></pre><p>Configi Save etdikdən sonra .</p><p>Bu əmr vasitəsilə configi <strong>check </strong>edirik.</p><pre>named-checkconf </pre><p><strong>Əgər heç bir output olmazsa .Hər şey qaydasindadir</strong></p><blockquote>DNS ümumi olaraq iki Zone-dan ibarətdir: <strong>Forward Lookup Zone</strong> və <strong>Reverse Lookup Zone</strong></blockquote><p><strong>Forward Lookup Zone: </strong>Host adlarını İP‐adresinə çevirir</p><p>(Client01 =172.16.2.11) və bu<strong> A recordu </strong>adlanır</p><p><strong>Reverse Lookup Zone: </strong>İP adreslərini host adlarına çevirir</p><p>(172.16.2.11= Client01) Bu isə <strong>PTR recordu</strong> adlanır</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N0xQfk28n5Equo3E5mrFJg.png" /></figure><p>İndi isə Forward və Reverse zone filellarını yaradaq</p><p><strong>Creat forward_zone file</strong></p><pre>vi /var/named/forward_zone.test.local</pre><pre>$TTL 3H<br>@       IN SOA  @ test.local. (<br>                                        0       ; serial<br>                                        1D      ; refresh<br>                                        1H      ; retry<br>                                        1W      ; expire<br>                                        3H )    ; minimum<br>        NS      @<br>        A       127.0.0.1<br>        AAAA    ::1<br>master IN       A       192.168.100.102<br>slave IN        A       192.168.100.105<br>client IN       A       192.168.100.103</pre><p>File<strong> Save</strong> etdikdən sonra Onu <strong>check</strong> edirik</p><pre>named-checkzone test.local /var/named/forward_zone.test.local</pre><p><strong>Creat reverse_zone file</strong></p><pre>vi /var/named/reverse_zone.test.local</pre><pre>$TTL 3H<br>@       IN SOA  @ test.local. (<br>                                        0       ; serial<br>                                        1D      ; refresh<br>                                        1H      ; retry<br>                                        1W      ; expire<br>                                        3H )    ; minimum<br><br>;       owner   TTL     CL      type    RDATA<br>            600     IN      NS      ns1.test.local.<br><br>102    IN     PTR    master.test.local.<br>103    IN     PTR    client1.test.local.</pre><p>File <strong>Save</strong> etdikdən sonra Onu <strong>check</strong> edirik</p><pre>named-checkzone 100.168.192.in-addr.arpa /var/named/reverse_zone.test.local</pre><p>Daha Sonra isə <strong>named.service</strong> nin yaratdığı <strong>named</strong> useri üçün acces verirk</p><pre>chown named:named /var/named/*</pre><p>Sonra isə firewaldda icazələr veririkki.Kənardan gələn sorğuları qəbul edə bilsin .</p><pre>firewall-cmd --add-port=53/udp --permanent<br>firewall-cmd --add-port=53/tcp --permanent<br>firewall-cmd --reload</pre><p>Sonra isə named.service enable edib restart edirik</p><pre>systemctl enable --now named &amp;&amp; systemctl restart named</pre><p>Daha sonra isə Qurduğumuz Dns Serverin İP adresini öz cihazımıza və ya hər hansi bizim şəbəkədə olan cihaza daxil edirik</p><pre>nmcli connection modify ens160 ipv4.dns 192.168.100.102</pre><p>İndi isə Test edirik</p><p><strong>Test Forward zone</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*sxGzGgRV57oXumT1BCrRjg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*Mqh6fc4hGn7p7xniOeNjdg.png" /></figure><p><strong>Test reverse zone</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*JQYpIcwwM94_P7OVR_T66g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d49b1b94abff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>