Yum how to check for installed packages

run : yum list installed

Further if you read the yum.conf man page:

  1. Red: ‘bold,red’:
    • packages in list/info installed which has no available package with the same name and arch.
  2. Yellow: ‘bold,yellow’:
    • packages in list/info installed which are newer than the latest available package with the same name and arch.
  3. Blue: ‘bold,blue’:
    • packages in list/info available which is an upgrade for the latest installed package with the same name and arch.
  4. Cyan: ‘dim,cyan’:
    • packages in list/info available which is a downgrade for the latest installed package with the same name and arch.
  5. White: ‘bold’:
    • packages in list/info installed which are older than the latest available package with the same name and arch.
  6. White and underlined: ‘bold,underline’:
    • kernel packages in list/info installed which is the same version as the running kernel.

Configure Static IP Address in CentOS 7.6 Virtual Box

  1. Set virtual box like this:
  2. Log into Linux Centos and edit the file:

    vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 and modify the configuration like this in order to have a fix ip in your network and permit you to enter with a ssh console. (you have to modify the ip according to your network configuration.)

    TYPE=Ethernet
    PROXY_METHOD=none
    BROWSER_ONLY=no
    BOOTPROTO=static
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=enp0s3
    UUID=6d9a4e86-ae47-456d-97ae-93ce156f9cd9
    DEVICE=enp0s3
    ONBOOT=yes
    IPADDR=192.168.178.131
    NETMASK=255.255.255.0
    GATEWAY=192.168.178.1
    BNS=8.8.8.8
    

     

  3. Modify the file /etc/resolv.conf like :
    nameserver 8.8.8.8
    
  4. restart the network service :service network restart
  5. check the configuration: ifconfig or ping your gateway

Expand linux centos7 partition

from here very easy

Steps

1. Shut down the VM from Hypervisor

 

2. Expand the disk capacity from settings with your desired value. Here we choose to expand the VHD with additional 60 GB space.

3. Start the VM from the hypervisor.

4. Login to virtual machine console as root.

5. Execute below command to check the disk space.

fdisk -l

6. Now execute this below command to initialize the expanded space and mount it.

fdisk /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

7. After this enter ‘n’ in the next line for creating new partition.

Command action
e extended
p primary partition (1-4)
p

8. Then assign the partition number you wish based on your existing partition numbering.

Partition number (1-4): 3

Partition number (1-4): 3
Hex code (type L to list codes): 8e
Changed system type of partition 3 to 8e (Linux LVM)

9. In the next line choose code ‘8e’ for select the LINUX OS

Hex code (type L to list codes): 8e

Hex code (type L to list codes): 8e
Changed system type of partition 3 to 8e (Linux LVM)

10. Next enter ‘w’ to proceed further.

Command (m for help): w

Command (m for help): w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
 
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

11. Reboot the system.

12. Now we need to create physical & logical volumes execute below command to create physical volume.

pvcreate /dev/sda3

13. Execute below command to get the name of current Volume Group

vgdisplay

14. Execute below command to extend the Volume Group with /dev/sda3

vgextend VolGroup /dev/sda3

15. Execute below command to get Logical Volume path.

lvdisplay

16. Execute below command to extend the Logical Volume with /dev/sda3

lvextend /dev/VolGroup/lv_root /dev/sda3

17. Execute below command to update the Logical Volume

xfs_growfs /dev/VolGroup/lv_root

18. Check for the new disk space.

>df -h

19. Your Disk space is now successfully increased with 60 GB.

How to know if a disk is an SSD or an HDD Linux Centos 7

I needed to do this on the VPS and none of the provided solutions worked for me,

this answer did the trick

https://serverfault.com/questions/551453/how-do-i-verify-that-my-hosting-provider-gave-me-ssds/551495#551495

so, it is about reading random data from the drive and assessing the time.

time for i in `seq 1 1000`; do
    dd bs=4k if=/dev/sda count=1 skip=$(( $RANDOM * 128 )) >/dev/null 2>&1;
done

here are my results for SSD

real    0m1.375s
user    0m0.285s
sys     0m0.944s

and HDD

real    0m14.249s
user    0m0.752s
sys     0m6.284s