<?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>Forem: Sagar Jethi</title>
    <description>The latest articles on Forem by Sagar Jethi (@sagarjethi).</description>
    <link>https://forem.com/sagarjethi</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%2F132479%2F3881ee24-8b3a-4417-8e2f-cf8d5496d61d.jpeg</url>
      <title>Forem: Sagar Jethi</title>
      <link>https://forem.com/sagarjethi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sagarjethi"/>
    <language>en</language>
    <item>
      <title>What are your favorite freelance sites to find work?</title>
      <dc:creator>Sagar Jethi</dc:creator>
      <pubDate>Mon, 20 Jan 2020 07:35:21 +0000</pubDate>
      <link>https://forem.com/sagarjethi/what-are-your-favorite-freelance-sites-to-find-work-1cd9</link>
      <guid>https://forem.com/sagarjethi/what-are-your-favorite-freelance-sites-to-find-work-1cd9</guid>
      <description>&lt;p&gt;I've seen Upwork and freelancer, but wondering what are people's favorite freelance sites?&lt;/p&gt;

</description>
      <category>freelance</category>
      <category>remotework</category>
      <category>freelancesite</category>
      <category>reactdevelope</category>
    </item>
    <item>
      <title>How To Install Linux, Nginx, MySQL, PHP (LEMP stack) on Ubuntu 19.04</title>
      <dc:creator>Sagar Jethi</dc:creator>
      <pubDate>Thu, 12 Dec 2019 13:57:53 +0000</pubDate>
      <link>https://forem.com/sagarjethi/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-19-04-2a93</link>
      <guid>https://forem.com/sagarjethi/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-19-04-2a93</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eKr4MLFS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/adkthxh8wymp82sax36n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eKr4MLFS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/adkthxh8wymp82sax36n.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Introduction&lt;/h4&gt;

&lt;p&gt;LEMP is an acronym of the Linux operating system, with an Nginx (pronounced like “Engine-X”) web serve, MySQL database, PHP. LEMP stack used for developing and deploying a web application&lt;br&gt;
application.&lt;br&gt;
More check : &lt;a href="https://lemp.io/%22"&gt;About LEMP&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Step 1: Update Package Repository Cache&lt;/h4&gt;

&lt;p&gt;Before you begin:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Let's open the terminal using the CTRL+ALT+T keyboard shortcut or by searching for the word terminal in Ubuntu Dash.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7eCfoUx---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/7h564zlain1yhnemwi5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7eCfoUx---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/7h564zlain1yhnemwi5f.png" alt="search terminal"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next update the package repository cache, type in the following command:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h4&gt;Step 2: Installing the Nginx&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;To install Nginx, run the following command in the terminal:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; sudo apt install nginx
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;On Ubuntu 19.04, Nginx is configured to start running upon installation.&lt;/p&gt;

&lt;p&gt;2.Let enable the most restrictive profile that will still allow the traffic you want. But we not configured SSL for your server, so you will only need to allow traffic on port 80.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw allow 'Nginx HTTP'
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;3.Check if Nginx is installed correctly by running the Apache service status. Use the following the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ufw status
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;4.To ensure Nginx is running, enter the IP address of your server in the address bar and press ENTER.:&lt;/p&gt;

&lt;p&gt;Note: To identify the server’s public IP address, run the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install curl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl http://icanhazip.com
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;Step 3:  Installing MySQL to Create and Manage Site Database&lt;/h4&gt;

&lt;p&gt;Now install MySQL, type in the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install mysql-server

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Press y to allow the installation mysql.&lt;br&gt;
During the installation, you will be prompted to set the root user password.&lt;/p&gt;

&lt;h4&gt;Step 3: Installing PHP and Configuring with Nginx&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;To install PHP, run the following command:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Since Nginx does not contain native PHP processing like some other web servers, you will need to install php-fpm, Also php-mysql, which will allow PHP to communicate with your database backend.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install php-fpm php-mysql
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql --version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo mysql_secure_installation
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Start MySQL shell
&lt;/h1&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo mysql
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You now have all of the required LEMP stack components installed&lt;br&gt;
But still need to make a few configuration changes in order to tell Nginx to use the PHP processor for dynamic content.&lt;/p&gt;

&lt;p&gt;This is done on the server block level, for that open file using following &lt;br&gt;
command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/nginx/sites-available/example.com
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;After that add the following content, which changes the default configuration file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {
        listen 80;
        root /var/www/html;
        index index.php index.html index.htm index.nginx-debian.html;
        server_name example.com;

        location / {
                try_files $uri $uri/ =404;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        }

        location ~ /\.ht {
                deny all;
        }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;After adding this content, save and close the file. Enable your new server block by creating a symbolic link&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Then, unlink the default configuration file from the /sites-enabled/ directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo unlink /etc/nginx/sites-enabled/default

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Test your new configuration file using the following  command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nginx -t
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;Step 5: Restart Nginx&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl reload nginx
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>lemp</category>
      <category>php</category>
      <category>nginx</category>
      <category>sagarjethi</category>
    </item>
    <item>
      <title>How to install and configure mongodb on ubuntu 18.04</title>
      <dc:creator>Sagar Jethi</dc:creator>
      <pubDate>Fri, 19 Jul 2019 11:49:54 +0000</pubDate>
      <link>https://forem.com/sagarjethi/how-to-install-and-configure-mongodb-on-ubuntu-18-04-4m6l</link>
      <guid>https://forem.com/sagarjethi/how-to-install-and-configure-mongodb-on-ubuntu-18-04-4m6l</guid>
      <description>&lt;h4&gt;Introduction&lt;/h4&gt;

&lt;p&gt;MongoDB is opensource NoSQL(document) database and document database designed for ease of development. It provides Rich Query Language, High Availability, Horizontal Scalability, Support for Multiple Storage Engines.&lt;br&gt;
More check: &lt;a href="https://docs.mongodb.com/manual/introduction/"&gt;official intriduction &lt;/a&gt;&lt;/p&gt;


&lt;h4&gt;Install MongoDB&lt;h4&gt;

&lt;/h4&gt;
&lt;/h4&gt;
&lt;p&gt;The following is stepped to install MongoDB Community Edition. This step by step guideline which you can follow&lt;/p&gt;

&lt;p&gt;&lt;b&gt; step 1. Import the public key used by the PMS(package management system)&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The Ubuntu package management tools ensure package consistency and authenticity by verifying that they are signed with GPG keys. The following command will import the MongoDB public GPG key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;b&gt; step 2. Create a list file for MongoDB.&lt;br&gt;
&lt;/b&gt;&lt;br&gt;
Create a source list file for MongoDB&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;b&gt; step 3 Reload local Ubuntu package database.&lt;/b&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;b&gt; step 4 Install the MongoDB package&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Install the latest version of MongoDB.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install -y mongodb-org
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Install a specific release of MongoDB.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install -y mongodb-org=4.0.10 mongodb-org-server=4.0.10 mongodb-org-shell=4.0.10 mongodb-org-mongos=4.0.10 mongodb-org-tools=4.0.10
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;For help with troubleshooting if errors encountered then check &lt;a href="https://docs.mongodb.com/manual/reference/installation-ubuntu-community-troubleshooting/#install-ubuntu-troubleshooting"&gt;troubleshooting&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Configure and Run MongoDB &lt;br&gt;
te&lt;br&gt;
The following step by step instructions can excute after download MongoDB and not the unofficial MongoDB package provided by Ubuntu.&lt;/p&gt;

&lt;p&gt;&lt;b&gt; Step 1:Start MongoDB.&lt;/b&gt;&lt;br&gt;
Follow command start mongodb&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service mongod start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;b&gt; Step 2 Verify that MongoDB has started successfully&lt;/b&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl status mongod
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Output
mongod.service - MongoDB Database Server
   Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: 
   Active: active (running) since Fri 2019-07-19 16:50:52 IST; 15min ago
     Docs: https://docs.mongodb.org/manual
 Main PID: 30977 (mongod)
   CGroup: /system.slice/mongod.service
           └─30977 /usr/bin/mongod --config /etc/mongod.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;you enable automatically starting MongoDB when the system starts. it is upto you&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl enable mongod

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;b&gt; Step 3 Stop MongoDB.&lt;/b&gt;&lt;br&gt;
By following command stop mongod&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service mongod stop

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;b&gt; Step 4 Restart MongoDB.&lt;/b&gt;&lt;br&gt;
The following command to restart mongod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service mongod restart

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;b&gt; Step 5 Begin using MongoDB.&lt;/b&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mongo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>mongodb</category>
      <category>mongo</category>
      <category>mongodbinstall</category>
      <category>sagarjethi</category>
    </item>
  </channel>
</rss>
