You can create virtual IP address with linux service. I designed the linux service to create a virtual IP address when operating system is rebooted. My System Properties Ethernet Adaptor Name : ens14025 Virtual IP : 192.168.44.55 1. Create Bash Script To Create Virtual IP Address [root@test ~]# vi /opt/scripts/virtual_ip_up.sh #!/bin/bash ifconfig ens14025:1 192.168.44.55 netmask…
Tag: Linux Administration
Find And Delete Files Greater Than Given Size on Linux
If you want to delete files which are greater than given size on Linux, you can use below examples by changing as your need. Delete Files Delete files which are size more than 2 MB. and type is jgp. [root@testserver ~]# find /tmp/ -type f -size +2M -name “*.jpg” -exec rm -rf {} \; Delete…
Check Service Status With Python on OEL 7 / Centos 7
I write a python code to check mysql service open or close. It is simple and you can change service_name parameter in the code to check another services. You can download from here check_service_status.py Below code maybe can not run because of python language format is tab structure. You can use with download original code…
Change Hostname on OEL 7 CentOS 7
You can use hostnamectl command to list and change hostname of operating system on OEL 7 or CentOS 7 version. List Hostname Status [root@localhost ~]# hostnamectl Static hostname: localhost.localdomain Icon name: computer-vm Chassis: vm Machine ID: 6f021291e2384a219e1f23ca39eadc9a Boot ID: ec195c69cfde417b88b86f4d7419cf24 Virtualization: vmware Operating System: Oracle Linux Server 7.3 CPE OS Name: cpe:/o:oracle:linux:7:3:server Kernel: Linux 4.1.12-61.1.28.el7uek.x86_64…
Change Hostname in RHEL 7
Changing hostname is different from RHEL 6 version in RHEL 7. You can use few method to change hostname. I will demonstrate useful and easy method that is hostnamectl command. Show Current Hostname [root@localhost ~]# hostname localhost.localdomain or [root@localhost ~]# hostnamectl status Static hostname: localhost.localdomain Icon name: computer-vm Chassis: vm Machine ID: 418f684e1a5c45c9a22f76065c732de3 Boot ID:…
Firewalld Add New Port, List All Ports, Remove Port with firewall-cmd command in Oracle Linux 7
What is firewalld Firewalld provides a dynamically managed firewall with support for network/firewall zones that define the trust level of network connections or interfaces. It has support for IPv4, IPv6 firewall settings, ethernet bridges and IP sets. There is a separation of runtime and permanent configuration options. It also provides an interface for services or…
How to Add EPEL Yum Repository on Oracle Linux 7
EPEL (Extra Packages for Enterprise Linux) is open source and free community based repository project from Fedora team which provides 100% high quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS, and Scientific Linux. Epel project is not a part of RHEL/CentOS but it is designed for major Linux distributions…
RPM Command Using on Linux Systems
If you connect linux repo, you can use yum install or yum update to manage your package. On the other hand, if you have RPM package, you can use rpm command to manage packages. RPM command has been using for installing, uninstalling, upgrading, listing,querying and checking RPM packages on linux system. You can use rpm…
How to Lock and Unlock Users on Oracle Linux / Centos / Redhat
Lock User Method 1 [root@test ~]# passwd -l username Method 2 [root@test ~]# usermod -L username Unlock User Method 1 [root@test ~]# passwd -u username Method 2 [root@test ~]# usermod -U username Check Status of Users [root@test ~]# more /etc/shadow username:!!$6$pmQO0ZPH$POolvCzxe1nsd1OpLkMc6E3cd1ffOkcz224caQs1d/oL.OwscUhYfcas//41sS12.:16531:0:99999:7::: Note : If you see “!!” expression or “!” expression start of password of…
How to Create Virtual IP Address on Oracle Linux System
You can create virtual IP addresses on Oracle Linux, Redhat and Centos Operating Systems with below operations. Virtual IP address can be temporary or static according to your wishes. You have to have a ethernet adaptor interface for example eth0. You can use ifconfig eth0:0 <IP address> syntax to create temporary virtual IP. Create Temporary Virtual…