Showing posts with label IT. Show all posts
Showing posts with label IT. Show all posts

Wednesday, April 5, 2023

What is DevOps? DevOps Kya hai?


DevOps is not a tool or a software. DevOps simply is a hassle free process to implement, develop and deliver the product to client. It's allow best coordination between Development and IT operation team to work together, faster.

DevOps first described in 2009 by Patrick Debois. As mentioned DevOps is not a specific technology, but a tactical approach, by working together. In this process development and operation team together can dismantle the roadblock and focus to improving and following the smooth process to create, deploy, and monitoring the software. 


Thanks.!



Tuesday, April 4, 2023

How to clone VMs on VMware ESXi

In This blog we will learn how to clone VMs or Servers in VMware ESXi.If we don't have vCenter, VMware ESXi allow us to clone VMs / Servers on its web-interface.

 In this process it will take a little time to copy and clone the VMss.

 Note: Before processing further, Please take the snapshot backup and turn off the target VM / Server.

1. Access vSphere web-client, Click Storage in the left side, and then click Datastore browser.


2. In popup Click on create a folder for example: "dev-clone" and provide any name to copy the data there.

3. Folder is created, Now we will copy the data,

4. Select the folder which you want to clone the VM and select the .vmx file and .vmdk file and click on copy tab and copy it in to newly created folder dev-clone.

Complete this copy process one by one .vmx file and .vmdk file

It will take little time to copy depends on your data size.


If successfully copied now we can move next process to created clone VM.

Now we will created VM from copied folder.

5. On dashboard Click Virtual Machine and Click Create/ Register VM.


6. On select Creation type page, select Register an existing virtual machine, and Click Next.


7. Now on select VMs for registration, click Select one or more virtual machines, a datastore or a directory. 
Select the newly created folder dev-clone where we have copied the data. Click Next and Finish.


8. 
Back to Virtual Machines, now you can see there is one newly Created VM with the same name as the old one. That’s because the name comes from the .vmx file. You can right-click the VM and Rename it.
9. Now you can power on the newly created VM. while you powering on there will be a popup window select I copied  click Finish/Answer.

We have successfully clone VM in VMware ESXi on web Client.

Thanks for the reading my Blog.





Monday, March 27, 2023

Let’s Encrypt SSL Certificate in Linux Nginx.



Let’s Encrypt is a free and open certificate authority developed by the Internet Security Research Group (ISRG). Certificates issued by Let’s Encrypt are trusted by almost all browsers today.

Prerequisites.

  1. You have a domain name pointing to your public server IP. In this tutorial, we will use nazitech.com.
  2. You have enabled the EPEL repository and installed Nginx.

Step-1 Install Certbot.

To install the certbot package form the EPEL repository run.

Before installing certboat install python and python-pip.

sudo apt-get install python
sudo apt-get install python-pip
sudo apt-get install certbot

Now install certbot Nginx plugin.

python3.6 -m pip install certbot-nginx
or
apt-get install python-certbot-nginx

You can now run Certbot with the Webroot plugin and obtain the SSL certificate files for your domain by issuing:

certbot --nginx -d nazitech.com -d www.nazitech.com

If the SSL certificate is successfully obtained, certbot will print the following message:

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/nazitech.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/nazitech.com/privkey.pem
   Your cert will expire on 2018-06-11. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - If you like Certbot, please consider supporting our work by:
   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF: https://eff.org/donate-le

Now that you have the certificate files. You can edit your Nginx conf file.

/etc/nginx/nginx.conf

server {
    listen 80;
    server_name www.example.com example.com;
}
server {
     listen 443 ssl http2;
     server_name  172.16.0.36;
     ssl_certificate /etc/letsencrypt/live/nazitech.com/fullchain.pem;
     ssl_certificate_key /etc/letsencrypt/live/nazitech.com/privkey.pem;
     ssl_trusted_certificate /etc/letsencrypt/nazitech.com/chain.pem;
     ssl_dhparam /etc/ssl/certs/dhparam.pem;
location / {
     proxy_pass http://ywebsite.co.in;
     proxy_http_version 1.1;
       }
}

Don’t forget to add Proxy_HTTP_version in the location line.

Restart Nginx service and check.

sudo systemctl restart nginx

Thnaks..!!

Friday, February 17, 2023

What is ChatGPT?


It is an AI-powered chatbot developed by OpenAI, which is designed to simulate human-like conversation. It is based on a language model called the Generative Pre-trained Transformer 3, which is one of the most advanced natural language processing models available today.

ChatGPT works by analyzing the text input it receives from users, identifying the most relevant information, and generating a response that is contextually appropriate. It uses a vast amount of data from various sources to learn patterns and relationships between words and phrases, allowing it to generate human-like responses that are often difficult to distinguish from those generated by real humans.

ChatGPT can be used for a variety of purposes, including language learning, and general conversation. Its ability to understand and respond to a wide range of questions and topics makes it a versatile and useful tool for businesses, educators, and individuals who are looking for an intelligent and interactive way to engage with. 


==============

ChatGPT OpenAI द्वारा विकसित एक AI-संचालित चैटबॉट है, जिसे मानव जैसी बातचीत को अनुकरण करने के लिए डिज़ाइन किया गया है। यह जनरेटिव प्री-ट्रेन्ड ट्रांसफॉर्मर 3 (GPT-3) नामक एक परिष्कृत भाषा मॉडल पर आधारित है, जो आज उपलब्ध सबसे उन्नत प्राकृतिक भाषा प्रसंस्करण मॉडल में से एक है।

ChatGPT उपयोगकर्ताओं से प्राप्त टेक्स्ट इनपुट का विश्लेषण करके, सबसे अधिक प्रासंगिक जानकारी की पहचान करके और प्रासंगिक रूप से उपयुक्त और भाषाई रूप से सुसंगत प्रतिक्रिया उत्पन्न करके काम करता है। यह पैटर्न और शब्दों और वाक्यांशों के बीच संबंधों को जानने के लिए विभिन्न स्रोतों से बड़ी मात्रा में डेटा का उपयोग करता है, जिससे यह मानव जैसी प्रतिक्रियाएं उत्पन्न करने की अनुमति देता है जो अक्सर वास्तविक मनुष्यों द्वारा उत्पन्न प्रतिक्रियाओं से अलग करना मुश्किल होता है।

ChatGPT का उपयोग ग्राहक सेवा, भाषा सीखने और सामान्य बातचीत सहित विभिन्न उद्देश्यों के लिए किया जा सकता है। सवालों और विषयों की एक विस्तृत श्रृंखला को समझने और उनका जवाब देने की इसकी क्षमता इसे व्यवसायों, शिक्षकों और व्यक्तियों के लिए एक बहुमुखी और उपयोगी उपकरण बनाती है जो दूसरों के साथ जुड़ने के लिए एक बुद्धिमान और इंटरैक्टिव तरीके की तलाश कर रहे हैं।

Thursday, November 17, 2022

Nginx Error 413, Request Entity Too Large

What is 413 Error?

413 HTTP error occurs when the size of a client’s request exceeds the server’s file size limit. This happens when a client attempts to upload a large file to a Nginx server.


Let's fix this.

The directive which determines what the allowable HTTP request size can be is client_max_body_size. You can add that directive in either an http, server, or location block in nginx.conf file located at /etc/nginx/nginx.conf.

server {
    client_max_body_size 100M; #As much as you can set according to your use case.
    ...
}

Wednesday, September 7, 2022

How to Install and Configure Nginx proxy pass on centos



Nginx is a web server which can also be used as a reverse proxy, load balancer, mail proxy, and HTTP cache. The software was created by Igor Sysoev and first publicly released in 2004.

This tutorial will teach you how to install and start Nginx on your CentOS server.

Step-1 Add Nginx Repository.

$sudo yum install epel-release

Step-2 Install Nginx.

$sudo yum install nginx

Step-3 Start Nginx service.

After installation Nginx, use the below commands to start and enable the Nginx service.

$sudo systemctl start nginx

$sudo systemctl enable nginx

Check the status of the Nginx service with the following command.

$sudo systemctl status nginx

The output should look something like this.

nginx.service - The nginx HTTP and reverse proxy server

  Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)

  Active: active (running) since Mon 2018-03-12 16:12:48 UTC; 2s ago

  Process: 1677 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)

  Process: 1675 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)

  Process: 1673 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)

Main PID: 1680 (nginx)

  CGroup: /system.slice/nginx.service

          ├─1680 nginx: master process /usr/sbin/nginx

          └─1681 nginx: worker process


If you are running a firewall, allow HTTP “80” and HTTPS “443” traffic, run the below commands.

$sudo firewall-cmd --permanent --zone=public --add-service=http 

$sudo firewall-cmd --permanent --zone=public --add-service=https

$sudo firewall-cmd --reload

Step-4 Verify installation.

To verifying the Nginx installation open your browser and type http://YOUR_SERVER_IP 

You will see the default Nginx welcome page as shown in the image below.


Configure the reverse proxy Nginx.

Open Nginx configuration file in your choice editor.

$sudo vim /etc/nginx/nginx.conf

Configure your setting as an example given below and save & exit.

server {

      listen 443 ssl http2;

      server_name  172.16.x.x #Domain name or IP

location / {

       proxy_pass http://bizdirect-coupons-async.172.16.1.0.nip.io; #Where you want to redirect your request localy. 

             proxy_http_version 1.1;

        }

}

server {

      listen 80;

      server_name  172.16.x.x; # Put Domain name or IP here.

location / {

       proxy_pass http://bizdirect-coupons-async172.16.1.0.nip.io; #Where you want to redirect your request localy.

             proxy_http_version 1.1;

        }

}

Restart Nginx service.

$sudo systemctl restart nginx

Conclusion.

Congratulations, you have successfully installed Nginx on your CentOS server.

You’re now ready to start deploying your applications and use Nginx as a web or proxy server.

Thursday, August 11, 2022

Migrate EC2-Classic Instance to VPC



AWS retire the EC2-Classic environment on 15th August 2022 and you will need to migrate your AWS resources from EC2-Classic to Amazon VPC before this date. 

What is classic and VPC network in AWS?

i) Classic network is where your instance run in a single flat network that is shared with other customers.

ii) VPC network is logically isolated to only your AWS account. Ec2 VPC instance run in a virtual private cloud.


Migration Process.

First create VPC network if not created or you can use default VPC network if it is already there.

1. Create AMI of which server you want to migrate.
2. Create new (SG) security group or copy existing security group under VPC network.
3. Create Elastic public IP under VPC scope.

Now you are ready to launch instance under VPC.

4. Click launch instance and select your AMI which you have created.
5. Fill all the required details. while you select the network select VPC network and subnets.
6. If all goes good your instance will be ready under VPC network.

To verify the instance created under VPC network or not.

From console select instance verify VPC ID.

From AWS CLI run below command to verify.

aws ec2 describe-instances
--region us-east-1
--output table
--query 'Reservations[*].Instances[*].InstanceId'

Done..!!☝










Wednesday, June 29, 2022

Jenkins, Backup server setup. If master crash.

 

In this blog we will restore Jenkins backup in a new Jenkins server. where you can restore you previous or existing Jenkins backup in to a new Jenkins server. 

To complete this process you should have Jenkins backup with you.


>> Let's start.<< 

First we need to setup a new server and install Jenkins on it.


Now restore the old Jenkins backup to the new server under /$JENKINS_HOME folder /var/lib/Jenkins.

Create SSH secret file in Jenkins home directory with command ssh-keygen

Put SSH public key “id_rsa.pub” key into GitLab ssh-key-access settings.

And also put the public key “id_rsa.pub” key into the deployment server for communication between the Jenkins server to the deployment server.

Note: White list the new Jenkins server public IP for Gitlab server and deployment servers on AWS or respective cloud.



Monday, February 15, 2021

How to Enable 2FA for Gmail Account

How to Turn On 2FA for Gmail

Gmail offers 2-Step Verification to protect the security of user accounts.

1. First, log in to your Gmail account as you usually would.

2. Click on your account icon in blue in the upper right-hand corner, and select Manage your Google Account. This will take you to your Account Settings page then select Security and choose 2-step Verification.






3. Set up your phone number with Google if you have not already done so. Enter your number in the field provided and click Send Code and enter the verification code.

4. You are almost done! Now that you’ve set up your number and trusted device with 2-Step Verification, click Confirm or Turn on to finalize the process.



YOU ARE DONE..!!

Friday, April 5, 2019

IPV4 and IPV6


IPV4 vs IPV6



An IP address is a numeric and text address used to communicate between two or more electronic devices each other. which identify the devices across the internet so the can be located. every device that is identified through its own IP addresses. IP address divided into classes. 

1. IPV4: IPV4 address is a numeric address invented in september1981. since then internet user and equipment use keep increasing day by day very fast.
IPV4 is a 32-bit address and contains up to four billion 4,294,967,296 addresses. now the question is four billion IPV4 address will full fill our requirement in this current technology world where every device can be connected with internet really not we need to find out other solution or a new version of the address to full fill the requirement.




IPV4 has four octets every octet ahs 8 bit and divided into five classes class A-to-E. where class A-to-C used for industry. class D used for multicast and class E reserved for Experimental purpose.



Let's move on why we need the ipv6 address.  

2. IPV6: As mention, earlier the shortage of IP address in IPv4, improve security, etc. IPv6 is the latest version of the IP address. IPv6 is quickly on its way to becoming the new backbone of the internet. and it's probably not a bad thing.
The number of available addresses shouldn’t be a problem for a very long time as IPv6 has 340 undecillion addresses.

Here's an example of a full IPv6 address: 

                         FE80:CD00:0000:0CDE:1257:0000:211E:729C

IPv6 will help to manage the increasing number of devices and things in many ways.

2.1 The advantage of IPv6:    
  • Reliability
  • Faster Speeds
  • Stringer Security
  • Routing efficiency
  • Global Reachability
  • Enhanced Encryption
  • Higher Website Conversion
  • Improved User Experience
  • Better Customer Insights
2.2 Disadvantages of IPv6:
Communication: IPv4 and IPv6 machines cannot communicate directly with each other. They need in-between equipment to make that possible.
Transition: For an individual to switch from IPv4 to IPv6, it requires immense effort and countless hours.
Readability: IPv6 sub-netting is very difficult to comprehend while remembering your IPv6 address is nearly impossible, unlike IPv4.
Reference:

IPv6https://www.juniper.net/documentation/en_US/junos/topics/concept/ipv6-flow-ipv6-address-types.html
Subnetting calculator: http://www.subnet-calculator.com/







What is DevOps? DevOps Kya hai?

DevOps is not a tool or a software. DevOps simply is a hassle free process to implement, develop and deliver the product to client. It'...