<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: iffishells</title>
    <description>The latest articles on DEV Community by iffishells (@iffishells).</description>
    <link>https://dev.to/iffishells</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F456333%2F23e1d602-f026-4093-acff-94d9289c8235.jpg</url>
      <title>DEV Community: iffishells</title>
      <link>https://dev.to/iffishells</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iffishells"/>
    <language>en</language>
    <item>
      <title>Wordpress</title>
      <dc:creator>iffishells</dc:creator>
      <pubDate>Fri, 02 Oct 2020 13:19:34 +0000</pubDate>
      <link>https://dev.to/iffishells/wordpress-4443</link>
      <guid>https://dev.to/iffishells/wordpress-4443</guid>
      <description>&lt;p&gt;&lt;a href="https://wordpress.com/create-blog/?aff=46628&amp;amp;sid=zxbblKWcqB1yvm91xYbN"&gt;https://wordpress.com/create-blog/?aff=46628&amp;amp;sid=zxbblKWcqB1yvm91xYbN&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>https://iffishells.wordpress.com/2020/10/02/get-started-with-docker/</title>
      <dc:creator>iffishells</dc:creator>
      <pubDate>Fri, 02 Oct 2020 13:08:22 +0000</pubDate>
      <link>https://dev.to/iffishells/https-iffishells-wordpress-com-2020-10-02-get-started-with-docker-2fck</link>
      <guid>https://dev.to/iffishells/https-iffishells-wordpress-com-2020-10-02-get-started-with-docker-2fck</guid>
      <description>

</description>
    </item>
    <item>
      <title>Installation of MongoDb  on Ubuntu 18.04</title>
      <dc:creator>iffishells</dc:creator>
      <pubDate>Sat, 22 Aug 2020 19:01:42 +0000</pubDate>
      <link>https://dev.to/iffishells/installation-of-mongodb-on-ubuntu-18-04-3hng</link>
      <guid>https://dev.to/iffishells/installation-of-mongodb-on-ubuntu-18-04-3hng</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yy6dPVXN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/mogno-cover.png%3Fw%3D770" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yy6dPVXN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/mogno-cover.png%3Fw%3D770" alt="" class="wp-image-237"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;p&gt;ManngoDb is a free and open-source NOsql Document database used commonly in the modern web application on the internet.Classified as a NoSQL database program, &lt;strong&gt;MongoDB&lt;/strong&gt; uses JSON-like documents with optional schemas.&lt;strong&gt;MongoDB&lt;/strong&gt; &lt;strong&gt;is&lt;/strong&gt; developed by &lt;strong&gt;MongoDB&lt;/strong&gt; .&lt;/p&gt;

&lt;h2&gt;Pre-requisites&lt;/h2&gt;

&lt;p&gt;To follow this tutorial , you will need : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One Ubuntu 18.04 &lt;/li&gt;
&lt;li&gt;sudo non-root and firewall  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;step 1 :&lt;/h2&gt;

&lt;p&gt;Ubuntu official package repositories include an up to  date version of mangodb ,which mean can install the necessary packages using &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;apt
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;first , update the packages list to have the most latest version of the repository listinggs : &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt update -y&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now can install the Mangodb packages itself &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt install -y mangodb&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8WEYfmKJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/install-mangodb-.png%3Fw%3D846" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8WEYfmKJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/install-mangodb-.png%3Fw%3D846" alt="" class="wp-image-224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;this command install several packages containing the latest stable version of MongoDb ,along with the helpfull tools.The Databse server is automatically started after installation&lt;/p&gt;

&lt;h2&gt;step 2 : checking service and DB&lt;/h2&gt;

&lt;p&gt;The installation process started MongoDb automatically,but lets verify the service is started and database is working or not. &lt;/p&gt;

&lt;p&gt;first check the service status : &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo systemctl status mongodb &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;you will see th output like this : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EsAfKcum--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/systemctl.png%3Fw%3D871" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EsAfKcum--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/systemctl.png%3Fw%3D871" alt="" class="wp-image-225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to systemd , the Mongodb server is up and running .&lt;/p&gt;

&lt;p&gt;we can verify this further by actually connecting to the dataabase server and executing diagnostic command . &lt;/p&gt;

&lt;p&gt;Execute this command &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;mongo --eval 'db.runCommand([connnectionStatus:1})' &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will output the current database version , the server address and port , and the output of the status command : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OUjFZTdM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/mango-eval.png%3Fw%3D703" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OUjFZTdM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/mango-eval.png%3Fw%3D703" alt="" class="wp-image-228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Value of  1 for the ok field in the response indicates that the server is working properly ,Next we 'll look how to manage the server is instance .&lt;/p&gt;

&lt;h2&gt;step 3 : Managin the MongoDb Service&lt;/h2&gt;

&lt;p&gt;MongoDb  install as a systemd service , which means you that can manage it using standard systemd commands algonside all other system services in Ubuntu .&lt;/p&gt;

&lt;p&gt;To verify status of the service type : &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo systemctl status mongodb &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7LRn5Ckb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/systemctl-1.png%3Fw%3D871" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7LRn5Ckb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/systemctl-1.png%3Fw%3D871" alt="" class="wp-image-230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can stop the server anytime by typing : &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo systemctl stop mongodb &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To start the server when it is stopped , type : &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo systemctl start mongodb &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;you can also restart the server with single command : &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo systemctl restart mognodb&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;By default Mongodb is configured to start automatically with the server but if you can to disable it . &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo systemctl disable mongodb &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;its easy to enable it again &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo systemctl enable mongodb&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Next , let's adjust the firewall setting for our Mongodb installation.&lt;/p&gt;

&lt;h2&gt;step 4 : adjusting the firewall (choice)&lt;/h2&gt;

&lt;p&gt;Assumming you have follow the above information for the installation for mogodb . if You intend to use the Mongodb server only locally with application running on the same server .this is the recommended and secure setting .However if you would like to be connect to your Mongodb server from the internet , you have to allow the incoming connection in ufw.&lt;/p&gt;

&lt;p&gt;To Allow access to Mongodb on its default port 27017 from the everwhere , you could use . &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo ufw allow 27017&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;However enabling internet access to MongoDb server on a default installation gives anyone unrestricted access to the database server and its data .&lt;/p&gt;

&lt;p&gt;In Most cases Mongodb should be accessed only from the certain trusted locations , such as another server hosting an application . To achieve this task, you can allow access on MongoDb default port while specifying the IP address of another server that will be explicity allow to connect .&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo ufw allow from other_server_IP/32 to any port 27017&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;you can verify the change in firewall setting with UFW : &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo ufw status&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;if you have decided to allow only a certain IP address to connect to MongoDb server , the address of the allowed location will be instead of anywhere in the output.&lt;/p&gt;

&lt;p&gt;you can find more advance firewall setting for restriction access to services in &lt;a href="https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands"&gt;this community.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though the port is open MongoDb is currently only listening on the local address 127.0.0.1 . To allow remote connection , add your server publically-routable IP address to mongod.conf file.&lt;/p&gt;

&lt;p&gt;Open the MongoDB Configuration file in your editor . &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo vim /etc/mongodb.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Add your server IP address to the &lt;strong&gt;bindip&lt;/strong&gt; value : &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;...
logappend=true

bind_ip = 127.0.0.1,your_server_ip
#port = 27017

...&lt;/code&gt;&lt;/pre&gt;

&lt;ul class="wp-block-social-links"&gt;









&lt;/ul&gt;

&lt;p&gt;Be sure to place a comma between the existing IP address and one you added  . save te file . if you are using &lt;strong&gt;vim . &lt;/strong&gt;&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;:wq!
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;This is all from my side if you are facing any problem you feel free to contact me.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Python Generator's  and How to used them</title>
      <dc:creator>iffishells</dc:creator>
      <pubDate>Sat, 22 Aug 2020 19:00:00 +0000</pubDate>
      <link>https://dev.to/iffishells/python-generator-s-and-how-to-used-them-ig7</link>
      <guid>https://dev.to/iffishells/python-generator-s-and-how-to-used-them-ig7</guid>
      <description>&lt;h2&gt;Agenda :&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What are Generators?&lt;/li&gt;
&lt;li&gt;Normal function vs Generator &lt;/li&gt;
&lt;li&gt;Advantages of using Generator&lt;/li&gt;
&lt;li&gt;Generator with loops &lt;/li&gt;
&lt;li&gt;Generator with function&lt;/li&gt;
&lt;li&gt;Generator Expression&lt;/li&gt;
&lt;li&gt;Use Cases&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;what are  Generator in Python?&lt;/h4&gt;

&lt;p class="has-drop-cap"&gt;Generators are basically function that return the traversable object or items. Generator do not produce the output at once time but Generator produce the output when we need them. Generator has lots of advantages some of them we will discuss Here :)&lt;/p&gt;

&lt;h4&gt;Advantages of using Generator&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;without the Generator in python producing the iterables is becomes very difficult and lenghty.&lt;/li&gt;
&lt;li&gt;Generator easy to implement as they automatically implement is __iter()__ and __next()__ and &lt;strong&gt;stopiteration&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;They can also used pipeline a numbe  of operations&lt;/li&gt;
&lt;li&gt;can be used to produce an infinite number of items&lt;/li&gt;
&lt;li&gt;Memory is saved as item is produced when we required unlike the in normal function. This facts becomes very important when you need to create a huge number of iterators.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Normal Function  VS Generator Functions :&lt;/h4&gt;

&lt;p&gt;The difference between Normal and Generator function is only keyword &lt;strong&gt;&lt;em&gt;return&lt;/em&gt;&lt;/strong&gt; to&lt;em&gt;&lt;strong&gt; yield&lt;/strong&gt;&lt;/em&gt;. in the normal function return the output but in the Generator function yield return the object of list . &lt;em&gt;&lt;strong&gt;using next()&lt;/strong&gt;&lt;/em&gt; we get the number using the object . in the Normal function we call the function by his function name but in the generator function we called them by &lt;strong&gt;&lt;em&gt;next()&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h5 class="has-text-align-center"&gt;Generator Function&lt;/h5&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;#Genarator function
def func(a):
    yield a #change keyword return to yield
a = [1,2,3]
b=func(a)
next(b)

output ---&amp;gt;
[1 , 2 , 3 ]&lt;/code&gt;&lt;/pre&gt;

&lt;h5 class="has-text-align-center"&gt;using next()&lt;/h5&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;def myfunc(a):
    while a&amp;gt;=3:
        yield a
        a=a+1
b =  myfunc(a)
print(b)
next(b)&lt;/code&gt;&lt;/pre&gt;

&lt;h5 class="has-text-align-center"&gt;Normal function&lt;/h5&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;def func(a):
    return a
a=[1,2,3]
func(a)

output --&amp;gt;
[1 ,2 , 3]&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;if you look the code above you will observer the  &lt;strong&gt;&lt;em&gt;return&lt;/em&gt;&lt;/strong&gt; change into the &lt;strong&gt;&lt;em&gt;yield&lt;/em&gt;&lt;/strong&gt; but their functional completly opposite. yield return the object of the output using next() and we get it . Normal function called by his name but Generator function called by next(). you will realize after see the below image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nu82OU41--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/new-generator.png%3Fw%3D1024" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nu82OU41--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/new-generator.png%3Fw%3D1024" alt="" class="wp-image-279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Generator with loops&lt;/h2&gt;

&lt;p&gt;In case you want to execute the same function at once, you can make use of the ‘for’ loop. This loop helps iterate over the objects and after all implementations it executes StopIteration.&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;def z():
    n=1
    yield n
    n=n+3
    yield n
for x in z():
    print(x)


output ---&amp;gt;&amp;gt;
1 
4&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Generator Expression :&lt;/h2&gt;

&lt;p&gt;You can also use the expression along with the loop for loop procedure iterators. this makes the generation iterables and easy to understand.&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;print("Generator Expression " , end= " :n ")
range_list=range(6)
ret =  (number for number in range_list)
print(c)
for ret_number in ret:
   print(ret_number)
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Major Difference &lt;/h2&gt;

&lt;p&gt;As we said Generator makes the code pretty and readable and taking less memory and less code and as well as reduce  the code . now its time to look first i will write the code without the generator and then with generators then you will see the difference and blessing of the generator in python.&lt;/p&gt;

&lt;h5 class="has-text-align-center"&gt;Code without using Generator&lt;/h5&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;class Nums:
    MAX = 4
    def __init__(self):
        self.current = 0
    def __iter__(self):
        return self
    def __next__(self):
        next_value = self.current
        if next_value &amp;gt;= self.MAX:
            raise StopIteration
        self.current += 1
        return next_value
&lt;/code&gt;&lt;/pre&gt;

&lt;h5 class="has-text-align-center"&gt;Code with Generator&lt;/h5&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;def func(var1):
    yield var1
    var1 +=1
&lt;/code&gt;&lt;/pre&gt;



</description>
    </item>
    <item>
      <title>Installation and Configuration of Apache Server and Mysql Phpmyadmin on Ubuntu 18 .04</title>
      <dc:creator>iffishells</dc:creator>
      <pubDate>Sat, 22 Aug 2020 18:58:47 +0000</pubDate>
      <link>https://dev.to/iffishells/installation-and-configuration-of-apache-server-and-mysql-phpmyadmin-on-ubuntu-18-04-2i6h</link>
      <guid>https://dev.to/iffishells/installation-and-configuration-of-apache-server-and-mysql-phpmyadmin-on-ubuntu-18-04-2i6h</guid>
      <description>&lt;h2&gt;Agenda &lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is Apache Server ?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Installation and Configuration of Apache2&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What is Mysql-Server?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Installation and Configuration of Mysql-Server&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What is Phpmyadmin?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Installation and Configuration of Phpmyadmin&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;What is Apache Server?&lt;/h2&gt;

&lt;p class="has-drop-cap"&gt;Apache is popular open-source , cross platform web Server that is , by number , the most popular web server in existence. Some high profile companies are using the Apache include &lt;a href="https://www.ibm.com/us-en/"&gt;IBM&lt;/a&gt; , &lt;a rel="noreferrer noopener" href="https://www.cisco.com/"&gt;CIsco&lt;/a&gt; , &lt;a rel="noreferrer noopener" href="https://www.adobe.com/"&gt;General Electric Adob&lt;/a&gt;e , &lt;a rel="noreferrer noopener" href="https://www.vmware.com/"&gt;VMWare&lt;/a&gt; ets . I don't do in more deeper but if want to now more deeply then you can read this &lt;a rel="noreferrer noopener" href="https://kinsta.com/knowledgebase/what-is-apache/"&gt;post&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;installation and configuration of apache2&lt;/h2&gt;

&lt;p&gt;first of all you will need to update the Ubuntu using following command .&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt update&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;check it there if there need to upgrade then do using Following command .&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt upgrade -y&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;for the installation of apache2 server you will need to run the following command .&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt install apache2&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dVQVOgoj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step1.png%3Fw%3D1024" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dVQVOgoj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step1.png%3Fw%3D1024" alt="" class="wp-image-293"&gt;&lt;/a&gt;Installing Apache2&lt;/p&gt;

&lt;p&gt;Now your installation of Apache2 is complet but for checking i will cross check whether is it wrong or right .for this you run the following command .&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apache2ctl configtest&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output of this command is &lt;strong&gt; &lt;em&gt;syntax Ok&lt;/em&gt; &lt;/strong&gt;but if you see any error other then this you need to fix it using this way. In my case there is no error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UxQaxaMM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step2.png%3Fw%3D519" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UxQaxaMM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step2.png%3Fw%3D519" alt="" class="wp-image-295"&gt;&lt;/a&gt;sudo apache2ctl configtest&lt;/p&gt;

&lt;p&gt;In order to fixing the error if you are facing that you will need to add  &lt;em&gt;&lt;strong&gt;ServerName 127.0.0.1&lt;/strong&gt;  &lt;/em&gt;on the last line in &lt;strong&gt;&lt;em&gt;/etc/apache2/apache2.cong. &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt; sudo vim /etc/apache2/apache2.conf &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zihtvJNo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step3.png%3Fw%3D899" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zihtvJNo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step3.png%3Fw%3D899" alt="" class="wp-image-297"&gt;&lt;/a&gt;sudo vim /etc/apache2/apache2.conf&lt;/p&gt;

&lt;p&gt;Now check it again by following command .after the configuration you need to restart the apache server by following command.&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apache2ctl configtest
&lt;/code&gt;&lt;/pre&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo systemctl restart apache2&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;What is Mysql Server? &lt;/h2&gt;

&lt;p&gt;Mysql server is a sql complaint server , in other word it is relational model database server . it is very popular it because its is free. It was developed by sun and moved to &lt;strong&gt;&lt;em&gt;&lt;a rel="noreferrer noopener" href="https://www.techopedia.com/definition/8711/oracle-database"&gt;Oracle&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt; When Oracle acquired Sun. Oracle continued improving it . and further more the relational model is way to organize data in the table. where each table as a primary key(which is Unique) and rows can relate to each other using key. If you want to know Further you can read this &lt;strong&gt;&lt;em&gt;&lt;a rel="noreferrer noopener" href="https://www.hostinger.com/tutorials/what-is-mysql"&gt;Post&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Installation and Configuration of Mysql-Server&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;for the configuration of mysql Server you need to change the permission of localhost file . In Ubuntu we can change the permission using terminal or GUI. I will do using Terminal because it is to follow.In order to  do this by run the following Command.&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo chmod 777 /var/www/html/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now it's time to install Mysql -server by following command.&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt install mysql-server&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gZ45gIAJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step4.png%3Fw%3D697" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gZ45gIAJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step4.png%3Fw%3D697" alt="" class="wp-image-300"&gt;&lt;/a&gt;sudo apt isntall mysql-server&lt;/p&gt;

&lt;p&gt;In order to works on the mysql server you will need more utilities/packages . but Don't worry you can install by following command.&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt install php&lt;/code&gt;&lt;/pre&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt install libapache2-mod-php&lt;/code&gt;&lt;/pre&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt install php-mysql&lt;/code&gt;&lt;/pre&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt install php-mcrypt&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or you can run by one's time instead of one by one.but This is good practice to run one by one by knowing about the packages&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;now Remaining part to config the files inside &lt;strong&gt;&lt;em&gt;/etc/apache2/mods-enabled/dir.conf&lt;/em&gt;&lt;/strong&gt; . you will need to add the index.php  on the front of seconed line in that file. Don't worry! i 'll do on the live screenshot.&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo vim /etc/apache2/mods-enabled/dir.conf &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7XV__3Wh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step5.png%3Fw%3D903" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7XV__3Wh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step5.png%3Fw%3D903" alt="" class="wp-image-303"&gt;&lt;/a&gt;sudo vim /etc/apache2/mods-enabled/dir.conf&lt;/p&gt;

&lt;p&gt;again restart the apache Server by following command .&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo systemctl restart apache2&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;for establish the connection from localhost to the local files I need to do little coding in PHP and keep this file in the specific directory.&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo vim /var/www/html/index.php
# Add the following code on the index.php
&amp;lt;?php
        phpinfo();
?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;
&lt;strong&gt;What is Phpmyadmin&lt;/strong&gt;?&lt;/h2&gt;

&lt;p&gt;Phpmyadmin is a free software tool that allow you to manage the mysql database of your websites. for example for Wordpress websites specifically , the MYSQL database stores all the data related to your posts , pages , comments , links and much more.if you want to know more abou the phpmyadmin you can read&lt;a rel="noreferrer noopener" href="https://www.phpmyadmin.net/"&gt; Post&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;&lt;strong&gt;Installation and Configuration of Phpmyadmin&lt;/strong&gt;&lt;/h2&gt;

&lt;p&gt;In order to install Phpmyadmin  by run the following command , &lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo apt install phpmyadmin&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jPq7GAq---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step6.png%3Fw%3D840" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jPq7GAq---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iffishells.files.wordpress.com/2020/08/step6.png%3Fw%3D840" alt="" class="wp-image-307"&gt;&lt;/a&gt;sudo apt install phpmyadmin&lt;/p&gt;

&lt;p&gt;set the password whatever you want.Approximately all the installation is completed.But you need to some config with files .For that you need to add one line in a Specific files.&lt;/p&gt;

&lt;pre class="wp-block-code"&gt;&lt;code&gt;sudo vim /etc/apache2/apache2.conf
## add the line on the bottom 
include /etc/phpmyadmin/apache.conf
## restart the Apache Server Again
sudo systemctl restart apache2&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;First i installed the Apache Server and config the files then establish the connection to localhost from the local file like index.php and then install the phpmyadmin. if you facing the any error please let me know on the comments. &lt;strong&gt;&lt;em&gt;Allah Hafiz&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
