Posts

Showing posts from September, 2023

Python

  What is a Package :-   A package contains all the files you need for a module. Modules are Python code libraries you can include in your project. # Install Package :- pip install <Package Name> # Remove Package :- pip uninstall <Package Name> # List Packages :- pip list

MiniKube Installation

Linux :-  Step 1: Install Docker :-                  URL :-  https://docs.docker.com/engine/install/centos/ Step 2: Install kubectl binary  :-             URL:-   https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/ Step 3: Install Minikube  :-             URL:-  https://infotechys.com/install-minikube-on-rhel9-or-centos9/          $ Tuen off the swap memory          $  sudo usermod -aG docker $USER && newgrp docker           $ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64           $ sudo chmod +x minikube-linux-amd64           $ sudo mv minikube-linux-amd64 /usr/local/bin/minikube OR          $ ...

DevOps- Project 1 []

Image
                    CI PIPELINE SETUP WITH VARIOUS TOOLS Step 1 – Create the Ec2 instance in AWS  account with these                                         parameters                     EC2 type – Ubuntu t2.medium                     EBS volume – 30 GB                     Region – US-EAST-1 Step 2 – Connect to EC2 and Install all tools  in that system as root user                     To login as root user - sudo su Step 3 – Install Jenkins on CentOS                          https://www.jenkins.io/do...

sudoers file

  URL :-   https://www.ibm.com/docs/en/pm-and-q/2.5.2?topic=requirements-modifying-sudoers-file-user-who-runs-installation Procedure Log in as  root  user. Enter the following command to open the  sudoers  file for editing: visudo -f /etc/sudoers At the end of the file, add the following line for your user: username ALL=(ALL) ALL Press the Esc key, and enter  :wq  to save and close the file. Repeat these steps on each computer on which you install a  Predictive Maintenance and Quality  node.

Linux Networking command

URL:-   https://www.linuxtechi.com/set-static-ip-address-on-rhel-9/ RHEL 9 :- /etc/NetworkManager/system-connections nmcli   :- is a command-line tool for controlling NetworkManager and reporting network status               ex :- nmcli device nmcli connection show :- view current connection. nmtui :-  It is text-based user interface for managing the networking on modern Linux systems. ip route show :- 

Docker containers keeps restarting after reboot

  Docker  ps and docker-compose ps Docker inspect Docker stop and start Docker  logs The docker ps command gives you the output of the following information: container id image – version of the image command – what process it is running when created status ports names – comment or friendly name Docker inspect With the docker inspect command, you can see the volumes that are mounted, the networking, the restart policy, and many other configuration parameters of the container to help with troubleshooting. Docker stop and docker start You can if you want to try to stop the container and start the container again, you can issue the command docker stop <container id or name> and then execute docker start <container id or name> to attempt to stop and start the container. Docker logs One of the key commands to get to the bottom of why the container is restarting is the docker logs command. You will likely see the low-level error message in the Docker logs causing the...

Emergency Mode

https://kb.synology.com/en-sg/DSM/tutorial/My_virtual_machine_running_RHEL_9_enters_emergency_mode Recover the virtual machine from the emergency mode In emergency mode, enter the root password of the virtual machine. Enter the command below to delete the original device file. [root@localhost ~]# rm /etc/lvm/devices/system.devices Enter the command below to create a new device file. [root@localhost ~]# vgimportdevices -a Enter the command below to reboot the virtual machine. [root@localhost ~]# reboot Prevent the virtual machine from entering emergency mode Open the configuration file  /etc/lvm/lvm.conf . Locate the  use_devicesfile  option. # use_devicesfile = 0 Uncomment the option and make sure it is set to 0. use_devicesfile = 0

Jenkins

  Installing and configuring Jenkins in RHEL 1.URL  https://www.redhat.com/sysadmin/install-jenkins-rhel8 2. URL  :  https://www.jenkins.io/doc/book/installing/linux/#red-hat-centos

Java

  S pecify the default Java version [ If multiple Java versions are installed on your server ]: # update-alternatives --config java Install Java 20 :-   How to Install Java 20 on Fedora & CentOS Stream/RHEL 9/8 (tecadmin.net)