August 2025
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

Categories

August 2025
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

Create a Logical Volume using Linux LVM

If you like this article, please +1 or Recommend via FB with the provided buttons above:
Article ID: 137
by: Reese K.
Posted: 16 Oct, 2013
Last updated: 21 Oct, 2013
Views: 561

Create a Logical Volume using Linux LVM
This example uses a local hard disk to create a logical volume.

1. partition the disk as normal using fdisk. I new the fdisk options ahead of time from having done this before.

EDS etldev1 ~ # FDISK_CMDLIST=”n\np\n1\n\nt\n8e\nw\n”
EDS etldev1 ~ # echo -e -n “${FDISK_CMDLIST}” | ( fdisk /dev/sdc )
This is the same thing as doing it from the fdisk menu as follows:

EDS etldev1 ~ # fdisk /dev/sdc

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’).

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-17769, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-17769, default 17769):
Using default value 17769

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
2. Initialize the partition for use by LVM using pvcreate.

3. Create a volume group using the block device specified in pvcreate

4. Create a logical volume in the volume group from step 3

Steps 2, 3, 4 are illustrated below

EDS etldev1 ~ # pvcreate /dev/sdc1
Physical volume “/dev/sdc1” successfully created

EDS etldev1 ~ # vgcreate vg_dwstore /dev/sdc1
Volume group “vg_dwstore” successfully created

EDS etldev1 ~ # vgs
VG #PV #LV #SN Attr VSize VFree
vg_dwstore 1 0 0 wz–n- 136.11g 136.11g
vg_etldev1 1 8 0 wz–n- 135.62g 124.00m
vg_etldev1_data 1 1 0 wz–n- 136.12g 0

EDS etldev1 ~ # lvcreate -L 136.11g -n lv_dwstore vg_dwstore
Rounding up size to full physical extent 136.11 GiB
Logical volume “lv_dwstore” created

EDS etldev1 ~ # mkfs.ext4 /dev/vg_dwstore/lv_dwstore
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
8921088 inodes, 35681280 blocks
1784064 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1089 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
EDS etldev1 ~ #
EDS etldev1 ~ # mkdir /dwstore
EDS etldev1 ~ # mount /dev/vg_dwstore/lv_dwstore /dwstore
EDS etldev1 ~ # df -Ph /dwstore
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_dwstore-lv_dwstore 134G 188M 127G 1% /dwstore
EDS etldev1 ~ #

Extending root partition using LVM

After deploying a VMware virtual machine via template, it may be necessary to extend the root file system based on use requirements as templates typically are minimal in their configuration. In this example, I opted to add a virtual disk instead of increasing the size of the existing vmdk, and extend the LVM vg (volume group) and lv (logical volume), then the file system itself.

In this particular example, the above description will be performed on a RedHat 6.3 OS. Therefore, there is no need to manually add the disk as the kernel now does so automatically.

The steps to be performed include:

fdisk to verify presence of new disk
pvcreate to initialize the new disk
In this example, I do NOT create a partition on the new disk. Instead, I’m just using the whole disk. In the case of physical media (using a recycled disk from another system), and you opt to use the whole disk device only (instead of partitioning it first), the partition table must be erased, which will obviously destroy all data on that disk, so be sure this is what you want to do. Refer to the pvcreate man page. To erase the partition table on a previously used disk, zero out the first sector with:
dd if=/dev/zero of=PhysicalVolume bs=512 count=1
vgextend to add the newly created physical volume to a volume group
lvextend to extend the size of the logical volume
resize2fs to resize the root partition, which of course is mounted. Refer to the resize2fs man page, citing “If the filesystem is mounted, it can be used to expand the size of the mounted filesystem, assuming the kernel supports on-line resizing. (As of this writing, the Linux 2.6 kernel supports on-line resize for filesystems mounted using ext3 and ext4.).”
Real life example:

QAMAIN ctbapp2a ~ # df -Ph /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_ctbapp2a-lv_root 16G 2.7G 12G 19% /
QAMAIN ctbapp2a ~ #
QAMAIN ctbapp2a ~ # fdisk -l /dev/sdb

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

QAMAIN ctbapp2a ~ # pvcreate /dev/sdb
Physical volume “/dev/sdb” successfully created
QAMAIN ctbapp2a ~ #
QAMAIN ctbapp2a ~ # vgextend vg_ctbapp2a /dev/sdb
Volume group “vg_ctbapp2a” successfully extended
QAMAIN ctbapp2a ~ #
QAMAIN ctbapp2a ~ # lvextend /dev/vg_ctbapp2a/lv_root /dev/sdb
Extending logical volume lv_root to 35.63 GiB
Logical volume lv_root successfully resized
QAMAIN ctbapp2a ~ #
QAMAIN ctbapp2a ~ # resize2fs /dev/vg_ctbapp2a/lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/vg_ctbapp2a/lv_root is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 3
Performing an on-line resize of /dev/vg_ctbapp2a/lv_root to 9339904 (4k) blocks.
The filesystem on /dev/vg_ctbapp2a/lv_root is now 9339904 blocks long.

QAMAIN ctbapp2a ~ # df -Ph /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_ctbapp2a-lv_root 36G 2.7G 31G 8% /
In the case of physical disk storage, the process would be nearly identical when adding another physical hard disk. If you do not have the option to add physical media, and there exists ample storage on the disk containing the root file system, you can extend said disk by adding another partition to it. This would require a reboot for the changes to be seen, otherwise, the overall process would be the same except you’d specify the newly created partition in the place of /dev/sdb above from the pvcreate command on down.

Couldn’t find device with uuid

Linux LVM commands result in
Couldn’t find device with uuid

Couldn’t find all physical volumes for volume group

Help! Commands like ‘lvs’, ‘lvdisplay’, ‘vgdisplay’, and ‘pvscan’ result in an error like the following:

Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find all physical volumes for volume group metabackupvg.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find all physical volumes for volume group metabackupvg.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find all physical volumes for volume group metabackupvg.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find all physical volumes for volume group metabackupvg.

Volume group “metabackupvg” not found

[root@dwetlprod2 ~]# pvscan
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
PV /dev/emcpoweraa1 VG srcdata1vg lvm2 [50.00 GB / 0 free]
PV /dev/emcpowerz1 VG srcdata2vg lvm2 [50.00 GB / 0 free]
PV /dev/emcpowerj1 VG metalogvg lvm2 [3.00 GB / 0 free]
PV /dev/emcpowerl1 VG metalogvg lvm2 [3.00 GB / 0 free]
PV /dev/emcpowern1 VG metalogvg lvm2 [4.99 GB / 0 free]
PV /dev/emcpowerad1 VG metalogvg lvm2 [14.00 GB / 0 free]
PV /dev/emcpowery1 VG auditbackupvg lvm2 [229.99 GB / 0 free]
PV /dev/emcpoweru1 VG metabackupvg lvm2 [45.00 GB / 0 free]
PV unknown device VG metabackupvg lvm2 [69.99 GB / 0 free]
PV /dev/emcpoweraf1 VG metabackupvg lvm2 [124.99 GB / 0 free]
PV /dev/emcpowerv1 VG auditlogvg lvm2 [3.00 GB / 0 free]
PV /dev/emcpowerw1 VG auditlogvg lvm2 [3.00 GB / 0 free]
PV /dev/emcpowerx1 VG auditlogvg lvm2 [3.00 GB / 0 free]
PV /dev/emcpowert1 VG auditlogvg lvm2 [89.99 GB / 0 free]
PV /dev/emcpowerb1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowerc1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowerd1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowere1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowerk1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowerm1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowero1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowerq1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowerp1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowerr1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowerab1 VG auditdatavg lvm2 [25.00 GB / 0 free]
PV /dev/emcpowerf1 VG metadatavg lvm2 [11.00 GB / 0 free]
PV /dev/emcpowerg1 VG metadatavg lvm2 [11.00 GB / 0 free]
PV /dev/emcpowerh1 VG metadatavg lvm2 [11.00 GB / 0 free]
PV /dev/emcpoweri1 VG metadatavg lvm2 [11.00 GB / 0 free]
PV /dev/emcpowers1 VG metadatavg lvm2 [20.00 GB / 0 free]
PV /dev/emcpowera1 VG metadatavg lvm2 [20.00 GB / 0 free]
PV /dev/emcpowerae1 VG metadatavg lvm2 [14.00 GB / 0 free]
Total: 32 [1.04 TB] / in use: 32 [1.04 TB] / in no VG: 0 [0 ]
Solution

This scenario indicates that a disk is missing from the volume group. This is clear since pvscan scans all disks for physical volumes, and it’s telling us that it cannot find a device. In my case, I deleted a LUN from the EMC that I knew was no longer being used, but I forgot to update the LVM configuration. To correct the issue, I removed the lost physical volume from the volume group using the –removemissing argument of the vgreduce command.

Tip: Run vgreduce with the –test and –verbose options to validate what will be executed and confirm this is what you want to do.

[root@dwetlprod2 ~]# vgreduce –removemissing –verbose metabackupvg
Finding volume group “metabackupvg”
Wiping cache of LVM-capable devices
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find all physical volumes for volume group metabackupvg.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find all physical volumes for volume group metabackupvg.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find all physical volumes for volume group metabackupvg.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find all physical volumes for volume group metabackupvg.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Couldn’t find device with uuid ‘R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP’.
Archiving volume group “metabackupvg” metadata (seqno 73).
metabackupvg/backup2lv has missing extents: removing (including dependencies)
Removing LV backup2lv from VG metabackupvg
Removing PV with UUID R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP from VG metabackupvg
Creating volume group backup “/etc/lvm/backup/metabackupvg” (seqno 74).
Wrote out consistent volume group metabackupvg
[root@dwetlprod2 ~]#
If a device needs to be added back, a solution for recovery is to cut another 70G LUN on the EMC, present it to the host and add it back into the volume group with the same UUID. Read my post on adding a new lun.

[root@dwetlprod2 ~]# pvcreate –uuid R5zG2s-g4yi-ytEO-8Xvk-2B0s-S36G-9nWhXP /dev/emcpowerah
Physical volume “/dev/emcpowerah” successfully created
[root@dwetlprod2 ~]# vgcfgrestore metabackupvg
Restored volume group metabackupvg
[root@dwetlprod2 ~]# vgscan
Reading all physical volumes. This may take a while…
Found volume group “srcdata1vg” using metadata type lvm2
Found volume group “srcdata2vg” using metadata type lvm2
Found volume group “metalogvg” using metadata type lvm2
Found volume group “auditbackupvg” using metadata type lvm2
Found volume group “auditlogvg” using metadata type lvm2
Found volume group “metabackupvg” using metadata type lvm2
Found volume group “auditdatavg” using metadata type lvm2
Found volume group “metadatavg” using metadata type lvm2
Run a file system check on the device then mount it. If your device (LUN) was mistakenly deleted, or in the case of physical media the disk has gone kaput, then you’ll need to restore data from backups.

You may have noticed that I didn’t even fdisk the replacement device. Don’t forget to do this step if you will be restoring data and you’re restoring to a partition.

Recovering a Lost LVM Volume Disk

Overview

Logical Volume Management (LVM) provides a high level, flexible view of a server’s disk storage. Though robust, problems can occur. The purpose of this document is to review the recovery process when a disk is missing or damaged, and then apply that process to plausible examples. When a disk is accidentally removed or damaged in some way that adversely affects the logical volume, the general recovery process is:

Replace the failed or missing disk
Restore the missing disk’s UUID
Restore the LVM meta data
Repair the file system on the LVM device
The recovery process will be demonstrated in three specific cases:

A disk belonging to a logical volume group is removed from the server
The LVM meta data is damaged or corrupted
One disk in a multi-disk volume group has been permanently removed
This article discusses how to restore the LVM meta data. This is a risky proposition. If you restore invalid information, you can loose all the data on the LVM device. An important part of LVM recovery is having backups of the meta data to begin with, and knowing how it’s supposed to look when everything is running smoothly. LVM keeps backup and archive copies of it’s meta data in /etc/lvm/backup and /etc/lvm/archive. Backup these directories regularly, and be familiar with their contents. You should also manually backup the LVM meta data with vgcfgbackup before starting any maintenance projects on your LVM volumes.

If you are planning on removing a disk from the server that belongs to a volume group, you should refer to the LVM HOWTO before doing so.

Server Configuration

In all three examples, a server with SUSE Linux Enterprise Server 10 with Service Pack 1 (SLES10 SP1) will be used with LVM version 2. The examples will use a volume group called “sales” with a linear logical volume called “reports”. The logical volume and it’s mount point are shown below. You will need to substitute your mount points and volume names as needed to match your specific environment.

ls-lvm:~ # cat /proc/partitions
major minor #blocks name

8 0 4194304 sda
8 1 514048 sda1
8 2 1052257 sda2
8 3 1 sda3
8 5 248976 sda5
8 16 524288 sdb
8 32 524288 sdc
8 48 524288 sdd

ls-lvm:~ # pvcreate /dev/sda5 /dev/sd[b-d]
Physical volume “/dev/sda5” successfully created
Physical volume “/dev/sdb” successfully created
Physical volume “/dev/sdc” successfully created
Physical volume “/dev/sdd” successfully created

ls-lvm:~ # vgcreate sales /dev/sda5 /dev/sd[b-d]
Volume group “sales” successfully created

ls-lvm:~ # lvcreate -n reports -L +1G sales
Logical volume “reports” created

ls-lvm:~ # pvscan
PV /dev/sda5 VG sales lvm2 [240.00 MB / 240.00 MB free]
PV /dev/sdb VG sales lvm2 [508.00 MB / 0 free]
PV /dev/sdc VG sales lvm2 [508.00 MB / 0 free]
PV /dev/sdd VG sales lvm2 [508.00 MB / 500.00 MB free]
Total: 4 [1.72 GB] / in use: 4 [1.72 GB] / in no VG: 0 [0 ]

ls-lvm:~ # vgs
VG #PV #LV #SN Attr VSize VFree
sales 4 1 0 wz–n- 1.72G 740.00M

ls-lvm:~ # lvs
LV VG Attr LSize Origin Snap% Move Log Copy%
reports sales -wi-ao 1.00G

ls-lvm:~ # mount | grep sales
/dev/mapper/sales-reports on /sales/reports type ext3 (rw)

ls-lvm:~ # df -h /sales/reports
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/sales-reports
1008M 33M 925M 4% /sales/reports
Disk Belonging to a Volume Group Removed

Removing a disk, belonging to a logical volume group, from the server may sound a bit strange, but with Storage Area Networks (SAN) or fast paced schedules, it happens.

Symptom:

The first thing you may notice when the server boots are messages like:

“Couldn’t find all physical volumes for volume group sales.”
“Couldn’t find device with uuid ’56pgEk-0zLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.”
‘Volume group “sales” not found’

Type root’s password.
Edit the /etc/fstab file.
Comment out the line with /dev/sales/report
Reboot
The LVM symptom is a missing sales volume group. Typing cat /proc/partitions confirms the server is missing one of it’s disks.

ls-lvm:~ # cat /proc/partitions
major minor #blocks name

8 0 4194304 sda
8 1 514048 sda1
8 2 1052257 sda2
8 3 1 sda3
8 5 248976 sda5
8 16 524288 sdb
8 32 524288 sdc

ls-lvm:~ # pvscan
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
PV /dev/sda5 VG sales lvm2 [240.00 MB / 240.00 MB free]
PV /dev/sdb VG sales lvm2 [508.00 MB / 0 free]
PV unknown device VG sales lvm2 [508.00 MB / 0 free]
PV /dev/sdc VG sales lvm2 [508.00 MB / 500.00 MB free]
Total: 4 [1.72 GB] / in use: 4 [1.72 GB] / in no VG: 0 [0 ]
Solution:

Fortunately, the meta data and file system on the disk that was /dev/sdc are intact.
So the recovery is to just put the disk back.
Reboot the server.
The /etc/init.d/boot.lvm start script will scan and activate the volume group at boot time.
Don’t forget to uncomment the /dev/sales/reports device in the /etc/fstab file.
If this procedure does not work, then you may have corrupt LVM meta data.

Corrupted LVM Meta Data

The LVM meta data does not get corrupted very often; but when it does, the file system on the LVM logical volume should also be considered unstable. The goal is to recover the LVM volume, and then check file system integrity.

Symptom 1:

Attempting to activate the volume group gives the following:

ls-lvm:~ # vgchange -ay sales
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
Couldn’t read volume group metadata.
Volume group sales metadata is inconsistent
Volume group for uuid not found: m4Cg2vkBVSGe1qSMNDf63v3fDHqN4uEkmWoTq5TpHpRQwmnAGD18r44OshLdHj05
0 logical volume(s) in volume group “sales” now active
This symptom is the result of a minor change in the meta data. In fact, only three bytes were overwritten. Since only a portion of the meta data was damaged, LVM can compare it’s internal check sum against the meta data on the device and know it’s wrong. There is enough meta data for LVM to know that the “sales” volume group and devices exit, but are unreadable.

ls-lvm:~ # pvscan
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
/dev/sdc: Checksum error
PV /dev/sda5 VG sales lvm2 [240.00 MB / 240.00 MB free]
PV /dev/sdb VG sales lvm2 [508.00 MB / 0 free]
PV /dev/sdc VG sales lvm2 [508.00 MB / 0 free]
PV /dev/sdd VG sales lvm2 [508.00 MB / 500.00 MB free]
Total: 4 [1.72 GB] / in use: 4 [1.72 GB] / in no VG: 0 [0 ]
Notice pvscan shows all devices present and associated with the sales volume group. It’s not the device UUID that is not found, but the volume group UUID.

Solution 1:

Since the disk was never removed, leave it as is.
There were no device UUID errors, so don’t attempt to restore the UUIDs.
This is a good candidate to just try restoring the LVM meta data.
ls-lvm:~ # vgcfgrestore sales
/dev/sdc: Checksum error
/dev/sdc: Checksum error
Restored volume group sales

ls-lvm:~ # vgchange -ay sales
1 logical volume(s) in volume group “sales” now active

ls-lvm:~ # pvscan
PV /dev/sda5 VG sales lvm2 [240.00 MB / 240.00 MB free]
PV /dev/sdb VG sales lvm2 [508.00 MB / 0 free]
PV /dev/sdc VG sales lvm2 [508.00 MB / 0 free]
PV /dev/sdd VG sales lvm2 [508.00 MB / 500.00 MB free]
Total: 4 [1.72 GB] / in use: 4 [1.72 GB] / in no VG: 0 [0 ]
Run a file system check on /dev/sales/reports.
ls-lvm:~ # e2fsck /dev/sales/reports
e2fsck 1.38 (30-Jun-2005)
/dev/sales/reports: clean, 961/131072 files, 257431/262144 blocks

ls-lvm:~ # mount /dev/sales/reports /sales/reports/

ls-lvm:~ # df -h /sales/reports/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/sales-reports
1008M 990M 0 100% /sales/reports
Symptom 2:

Minor damage to the LVM meta data is easily fixed with vgcfgrestore. If the meta data is gone, or severely damaged, then LVM will consider that disk as an “unknown device.” If the volume group contains only one disk, then the volume group and it’s logical volumes will simply be gone. In this case the symptom is the same as if the disk was accidentally removed, with the exception of the device name. Since /dev/sdc was not actually removed from the server, the devices are still labeled a through d.

ls-lvm:~ # pvscan
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
PV /dev/sda5 VG sales lvm2 [240.00 MB / 240.00 MB free]
PV /dev/sdb VG sales lvm2 [508.00 MB / 0 free]
PV unknown device VG sales lvm2 [508.00 MB / 0 free]
PV /dev/sdd VG sales lvm2 [508.00 MB / 500.00 MB free]
Total: 4 [1.72 GB] / in use: 4 [1.72 GB] / in no VG: 0 [0 ]
Solution 2:

First, replace the disk. Most likely the disk is already there, just damaged.
Since the UUID on /dev/sdc is not there, a vgcfgrestore will not work.
ls-lvm:~ # vgcfgrestore sales
Couldn’t find device with uuid ’56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu’.
Couldn’t find all physical volumes for volume group sales.
Restore failed.
Comparing the output of cat /proc/partitions and pvscan shows the missing device is /dev/sdc, and pvscan shows which UUID it needs for that device. So, copy and paste the UUID that pvscan shows for /dev/sdc.
ls-lvm:~ # pvcreate –uuid 56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu /dev/sdc
Physical volume “/dev/sdc” successfully created
Restore the LVM meta data
ls-lvm:~ # vgcfgrestore sales
Restored volume group sales

ls-lvm:~ # vgscan
Reading all physical volumes. This may take a while…
Found volume group “sales” using metadata type lvm2

ls-lvm:~ # vgchange -ay sales
1 logical volume(s) in volume group “sales” now active
Run a file system check on /dev/sales/reports.
ls-lvm:~ # e2fsck /dev/sales/reports
e2fsck 1.38 (30-Jun-2005)
/dev/sales/reports: clean, 961/131072 files, 257431/262144 blocks

ls-lvm:~ # mount /dev/sales/reports /sales/reports/

ls-lvm:~ # df -h /sales/reports
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/sales-reports
1008M 990M 0 100% /sales/reports

Disk Permanently Removed

This is the most severe case. Obviously if the disk is gone and unrecoverable, the data on that disk is likewise unrecoverable. This is a great time to feel good knowing you have a solid backup to rely on. However, if the good feelings are gone, and there is no backup, how do you recover as much data as possible from the remaining disks in the volume group? No attempt will be made to address the data on the unrecoverable disk; this topic will be left to the data recovery experts.

Symptom:

The symptom will be the same as Symptom 2 in the Corrupted LVM Meta Data section above. You will see errors about an “unknown device” and missing device with UUID.

Solution:

Add a replacement disk to the server. Make sure the disk is empty.
Create the LVM meta data on the new disk using the old disk’s UUID that pvscan displays.
ls-lvm:~ # pvcreate –uuid 56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu /dev/sdc
Physical volume “/dev/sdc” successfully created
Restore the backup copy of the LVM meta data for the sales volume group.
ls-lvm:~ # vgcfgrestore sales
Restored volume group sales

ls-lvm:~ # vgscan
Reading all physical volumes. This may take a while…
Found volume group “sales” using metadata type lvm2

ls-lvm:~ # vgchange -ay sales
1 logical volume(s) in volume group “sales” now active
Run a file system check to rebuild the file system.
ls-lvm:~ # e2fsck -y /dev/sales/reports
e2fsck 1.38 (30-Jun-2005)
–snip–
Free inodes count wrong for group #5 (16258, counted=16384).
Fix? yes

Free inodes count wrong (130111, counted=130237).
Fix? yes

/dev/sales/reports: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sales/reports: 835/131072 files (5.7% non-contiguous), 137213/262144 blocks
Mount the file system and recover as much data as possible.
NOTE: If the missing disk contains the beginning of the file system, then the file system’s superblock will be missing. You will need to rebuild or use an alternate superblock. Restoring a file system superblock is outside the scope of this article, please refer to your file system’s documentation.
Conclusion

LVM by default keeps backup copies of it’s meta data for all LVM devices. These backup files are stored in /etc/lvm/backup and /etc/lvm/archive. If a disk is removed or the meta data gets damaged in some way, it can be easily restored, if you have backups of the meta data. This is why it is highly recommended to never turn off LVM’s auto backup feature. Even if a disk is permanently removed from the volume group, it can be reconstructed, and often times the remaining data on the file system recovered.

VSFTPD CENTOS 6.5

CentOS installation configuration FTP server

CentOS install FTP server is configured under a simple procedure notes.

192.168.1.12 client
192.168.1.10 server

Installation
yum install vsftpd

[root@server ~]# yum install -y vsftpd
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.secureax.com
* extras: centos.mirror.secureax.com
* updates: centos.mirror.secureax.com
Resolving Dependencies
–> Running transaction check
—> Package vsftpd.x86_64 0:2.2.2-13.el6_6.1 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
vsftpd x86_64 2.2.2-13.el6_6.1 updates 151 k

Transaction Summary
========================================================================================================================================
Install 1 Package(s)

Total download size: 151 k
Installed size: 332 k
Downloading Packages:
vsftpd-2.2.2-13.el6_6.1.x86_64.rpm | 151 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : vsftpd-2.2.2-13.el6_6.1.x86_64 1/1
Verifying : vsftpd-2.2.2-13.el6_6.1.x86_64 1/1

Installed:
vsftpd.x86_64 0:2.2.2-13.el6_6.1

Complete!

Start/Restart/Shutdown

/sbin/service vsftpd start
/sbin/service vsftpd restart
/sbin/service vsftpd stop

/etc/vsftpd/vsftpd.conf

Anonymous uploading and downloading
Modify the configuration file to vsftpd.conf

anonymous_enable=yes
anon_upload_enable=yes
anon_mkdir_write_enable=yes
anon_umask=022

Configuration vsftpd.conf

anonymous_enable=NO # prohibit anonymous
local_enable=YES # Allow log on locally
write_enable=YES # allowed to write, For uploading, you must
llocal_umask=027 # upload the file permissions set to: 777 – local_umask
anon_upload_enable=YES # allows virtual users and anonymous users to upload
anon_other_write_enable=YES # allows virtual users and anonymous users to modify file names and delete files
dirmessage_enable=YES
xferlog_enable=YES # turn on logging
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log # standard log format
xferlog_std_format=YES
idle_session_timeout=600 # idle connection timeout
data_connection_timeout=120
ftpd_banner=Welcome to Server FTP service # welcome message
chroot_local_user=NO
chroot_list_enable=YES # The above two lines virtual user restrictions in its directory, you can not access other directories, or directly with
chroot_local_user=YES
listen=yes # monitor / passive mode
listen_port=21 # listening port
chroot_list_file=/etc/vsftpd/vsftpd.chroot_list # virtual user to save the file list /etc/vsftpd/vsftpd.chroot_list in
user_config_dir=/etc/vsftpd/vsftpd_user_conf #each virtual user name in the /etc/vsftpd/vsftpd_user_conf in

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=027
anon_upload_enable=YES
anon_other_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
ftpd_banner=Welcome to Server FTP service
chroot_local_user=NO
chroot_list_enable=YES
chroot_local_user=YES
listen=yes
listen_port=21
chroot_list_file=/etc/vsftpd/vsftpd.chroot_list
user_config_dir=/etc/vsftpd/vsftpd_user_conf

500 oops bad bool value in config file for anonymous_enable

This can be caused by having trailing space at the end of the line. Check that there is no whitespace after “YES”. If that isn’t the case check that you don’t have Windows CRLF line endings.

The following sed command will remove any trailing space and CR characters from the specified file:

sed -i ‘s,\r,,;s, *$,,’ /etc/vsftpd.conf

Enable Chroot Jail in VSFTPD

To enable chroot jail in vsftp, Edit vsftp configuration file in your favorite editor

# vim /etc/vsftpd/vsftpd.conf
and un comment or add following entry in configuration file

chroot_local_user=YES
After adding above line, save file and restart vsftpd service.

# service vsftpd restart

NFS SERVER Centos 6.5

yum install -y nfs-utils rpcbind

Environmental instructions

nfs server system: CentOS 6.5 x86_64
nfs server IP: 192.168.1.10
nfs client system: CentOS 6.5 x86_64
nfs client IP: 192.168.1.12

Install the NFS server (192.168.1.10)

Step-1: install nfs-utils and rpcbind, run the following command:

yum install -y nfs-utils rpcbind

Step-2: specify a fixed port for NFS, run the following command:
vi /etc/sysconfig/nfs
RQUOTAD_PORT=30001
LOCKD_TCPPORT=30002
LOCKD_UDPPORT=30002
MOUNTD_PORT=30003
STATD_PORT=30004

Step-3: Open the firewall above the port, run the following command:

iptables -I INPUT -p tcp –dport 111 -j ACCEPT
iptables -I INPUT -p udp –dport 111 -j ACCEPT
iptables -I INPUT -p tcp –dport 2049 -j ACCEPT
iptables -I INPUT -p udp –dport 2049 -j ACCEPT
iptables -I INPUT -p tcp –dport 30001:30004 -j ACCEPT
iptables -I INPUT -p udp –dport 30001:30004 -j ACCEPT
service iptables save
service iptables restart

Step-4: Set SELinux for the licensing status, run the following command:
vi /etc/selinux/config
SELINUX=enforcing

SELINUX=permissive

setenforce 0

Step-5: Create a shared directory, run the following command:

mkdir -p /data/nfs_share

above command will create a shared directory /data/nfs_share

Step-6:Configuring exports file, run the following command:

vi /etc/exports

a new row at the end of the above documents, as follows:
/data/nfs_share 192.168.1.12(rw,sync,no_root_squash)
/data/nfs_share *(ro)

This line means that only 192.168.1.12 client can to read and write permission to mount the shared directory, other clients read-only privileges to mount.

Step-7: Start NFS-related services, run the following command:
chkconfig nfs on
chkconfig rpcbind on

root@server ~]# chkconfig rpcbind on
[root@server ~]# service nfs start
service rpcbind start
Starting NFS services: [ OK ]
Starting NFS mountd: [FAILED]
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connectio n refused)
rpc.nfsd: unable to set any sockets for nfsd
[FAILED]
[root@server ~]# service rpcbind start
Starting rpcbind: [ OK ]
[root@server ~]# service rpcbind start
[root@server ~]# service nfs start
Starting NFS services: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: [ OK ]
Starting RPC idmapd: [ OK ]
[root@server ~]# service nfs restart
Shutting down NFS daemon: [ OK ]
Shutting down NFS mountd: [ OK ]
Shutting down NFS services: [ OK ]
Shutting down RPC idmapd: [ OK ]
Starting NFS services: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: [ OK ]
Starting RPC idmapd: [ OK ]

service nfs start
service rpcbind start

Step-8: the relevant port inspection of NFS is already enabled, run the following command:
service iptables status
rpcinfo -p localhost

2. Install NFS client (192.168.1.12)

NFS client does not need to start the NFS service, but you need to install nfs-utils, run the following command:
yum install -y nfs-utils autofs

3. Manually mount the NFS share

Step-1: determine the mount point, run the following command:
showmount -e 192.168.1.10 -e option to display the export list NFS server-side.

Step-2: Create the mount directory, run the following command:
mkdir -p /root/remote_dir

/root/remote_dir for the mount point directory shared directory.

Step-3: Mount the shared directory, run the following command:
mount -t nfs 192.168.1.10:/data/nfs_share /root/remote_dir

remote_dir which, -t option specifies that the type of the file system for nfs.

Step-4: After sharing the end catalog, unload the shared directory, run the following command:
umount /root/remote_dir

4. boot automatically mount

Adding to the fstab file to mount the entries of the shared directory, you can achieve startup automatically mount, but then the connection with the NFS server will always be active. Run the following command:

mkdir -p /root/remote_dir

vi /etc/fstab

at the end of the above documents to join mount entries shared directory, as follows:
192.168.1.10:/data/nfs_share /root/remote_dir nfs defaults 0 0

where the first five fields Set to 0 to the shared directory file system does not use the dump command to dump the first six field is set to 0 indicates that the shared directory file system does not need to use the fsck command to check.

In addition, you can use the automounter (autofs) achieve on-demand to automatically mount a network shared directory. When the share is no longer used, and inactivity certain time automounter will share unmounting.

5. Demand automatically mount (special map)

When the autofs service is running, the system exists in a file called / special directory net, but the directory will appear empty. Step NFS client through a special map-demand automatically mount the shared directory is as follows:

Step-1: Modify the timeout period of inactivity, run the following command:

vi /etc/sysconfig/autofs
TIMEOUT=300
TIMEOUT=600
the above file TIMEOUT = 300 replaced TIMEOUT = 600 is the timeout inactivity by five minutes modified to 10 minutes.
After configuration is complete,

restart the autofs service: service autofs restart

Step-2: access network shared directory, run the following command:
cd /net/192.168.1.10/data/nfs_share When you run the above command,

autofs will automatically mount an NFS server in a network shared directory.

Step-3: Uninstall the mounted network share, the details are as follows:
All files and directories under /net/192.168.1.10/data/nfs_share stop use and the timeout expires after (10 minutes),
autofs will unload the shared directory.

6. Demand automatically mount (an indirect map)

Step-1: Modify the timeout period of inactivity, run the following command:

vi /etc/sysconfig/autofs
the above file

TIMEOUT=300
replaced
TIMEOUT=600

is the timeout inactivity by five minutes modified to 10 minutes.

Step-2: the establishment of a shared directory mount point of the parent directory, run the following command:

mkdir -p /root/demo

Step-3: Configure shared parent directory directory mount point, run the following command:
vi /etc/auto.master
the content of the file are as follows:

/root/demo /etc/auto.demo

is the parent directory mount point, this directory is always visible in the system, by autofs service monitoring, to determine whether the “need” to mount / create subdirectories mount point.
/etc/auto.demo for a single configuration file that contains the autofs service under this parent directory management subdirectory mount point list.

Step-4: Configure shared directory mount point directory, run the following command:
vi /etc/auto.demo

the content of the file are as follows: remote_dir -rw 192.168.1.10:/data/nfs_share which, remote_dir subdirectory mount point,

this directory is not normally visible only when the autofs service creates this directory and
When after Mount sharing them directly naming / access, it will become visible. -rw to mount a network share when you want to use the mount option.
192.168.1.10:/data/nfs_share need to mount an NFS server and shared directories.

remote_dir -rw 192.168.1.10:/data/nfs_share

Step-5: Restart the autofs service, run the following command:

service autofs restart

Step-6: access to network shared directory, run the following command:
cd /root/demo/remote_dir

After running the above command, autofs will automatically create a mount point directory and mount the shared directory.

Step-7: offload network shared directory, the details are as follows:

All files and directories under /root/demo /remote_dir Stop use
and the timeout expires after (10 minutes), autofs will unload the shared directory.

CentOS 7 Own CLoud 7

Install minimal install Centos 7

yum -y update

[root@testserver7 ~]# yum install httpd php php-mysql mariadb-server mariadb sqlite php-dom php-mbstring php-gd php-pdo wget vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.vodien.com
* extras: mirror.vodien.com
* updates: mirror.vodien.com
Package sqlite-3.7.17-4.el7.x86_64 already installed and latest version
Package wget-1.14-10.el7_0.1.x86_64 already installed and latest version
Resolving Dependencies
–> Running transaction check
—> Package httpd.x86_64 0:2.4.6-19.el7.centos will be installed
–> Processing Dependency: httpd-tools = 2.4.6-19.el7.centos for package: httpd-2.4.6-19.el7.centos.x86_64
–> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-19.el7.centos.x86_64
–> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-19.el7.centos.x86_64
–> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-19.el7.centos.x86_64
—> Package mariadb.x86_64 1:5.5.40-2.el7_0 will be installed
–> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.40-2.el7_0 for package: 1:mariadb-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl(Sys::Hostname) for package: 1:mariadb-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl(IPC::Open3) for package: 1:mariadb-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl(Getopt::Long) for package: 1:mariadb-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl(File::Temp) for package: 1:mariadb-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl(Fcntl) for package: 1:mariadb-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl(Exporter) for package: 1:mariadb-5.5.40-2.el7_0.x86_64
–> Processing Dependency: /usr/bin/perl for package: 1:mariadb-5.5.40-2.el7_0.x86_64
—> Package mariadb-server.x86_64 1:5.5.40-2.el7_0 will be installed
–> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl(File::Path) for package: 1:mariadb-server-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl(Data::Dumper) for package: 1:mariadb-server-5.5.40-2.el7_0.x86_64
–> Processing Dependency: perl(DBI) for package: 1:mariadb-server-5.5.40-2.el7_0.x86_64
–> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: 1:mariadb-server-5.5.40-2.el7_0.x86_64
–> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: 1:mariadb-server-5.5.40-2.el7_0.x86_64
–> Processing Dependency: libaio.so.1()(64bit) for package: 1:mariadb-server-5.5.40-2.el7_0.x86_64
—> Package php.x86_64 0:5.4.16-23.el7_0.3 will be installed
–> Processing Dependency: php-common(x86-64) = 5.4.16-23.el7_0.3 for package: php-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: php-cli(x86-64) = 5.4.16-23.el7_0.3 for package: php-5.4.16-23.el7_0.3.x86_64
—> Package php-gd.x86_64 0:5.4.16-23.el7_0.3 will be installed
–> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2)(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libpng15.so.15()(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libjpeg.so.62()(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libX11.so.6()(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
—> Package php-mbstring.x86_64 0:5.4.16-23.el7_0.3 will be installed
—> Package php-mysql.x86_64 0:5.4.16-23.el7_0.3 will be installed
—> Package php-pdo.x86_64 0:5.4.16-23.el7_0.3 will be installed
—> Package php-xml.x86_64 0:5.4.16-23.el7_0.3 will be installed
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php-xml-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php-xml-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php-xml-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php-xml-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php-xml-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libxslt.so.1()(64bit) for package: php-xml-5.4.16-23.el7_0.3.x86_64
–> Processing Dependency: libexslt.so.0()(64bit) for package: php-xml-5.4.16-23.el7_0.3.x86_64
—> Package vim-enhanced.x86_64 2:7.4.160-1.el7 will be installed
–> Processing Dependency: vim-common = 2:7.4.160-1.el7 for package: 2:vim-enhanced-7.4.160-1.el7.x86_64
–> Processing Dependency: libperl.so()(64bit) for package: 2:vim-enhanced-7.4.160-1.el7.x86_64
–> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.160-1.el7.x86_64
–> Running transaction check
—> Package apr.x86_64 0:1.4.8-3.el7 will be installed
—> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
—> Package gpm-libs.x86_64 0:1.20.7-5.el7 will be installed
—> Package httpd-tools.x86_64 0:2.4.6-19.el7.centos will be installed
—> Package libX11.x86_64 0:1.6.0-2.1.el7 will be installed
–> Processing Dependency: libX11-common = 1.6.0-2.1.el7 for package: libX11-1.6.0-2.1.el7.x86_64
–> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.0-2.1.el7.x86_64
—> Package libXpm.x86_64 0:3.5.10-5.1.el7 will be installed
—> Package libaio.x86_64 0:0.3.109-12.el7 will be installed
—> Package libjpeg-turbo.x86_64 0:1.2.90-5.el7 will be installed
—> Package libpng.x86_64 2:1.5.13-5.el7 will be installed
—> Package libxslt.x86_64 0:1.1.28-5.el7 will be installed
—> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
—> Package mariadb-libs.x86_64 1:5.5.35-3.el7 will be updated
—> Package mariadb-libs.x86_64 1:5.5.40-2.el7_0 will be an update
—> Package perl.x86_64 4:5.16.3-283.el7 will be installed
–> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl-macros for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-283.el7.x86_64
–> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-283.el7.x86_64
—> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be installed
—> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
–> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
–> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
—> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
—> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
—> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed
—> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed
—> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed
–> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch
–> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch
—> Package perl-libs.x86_64 4:5.16.3-283.el7 will be installed
—> Package php-cli.x86_64 0:5.4.16-23.el7_0.3 will be installed
—> Package php-common.x86_64 0:5.4.16-23.el7_0.3 will be installed
–> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-23.el7_0.3.x86_64
—> Package t1lib.x86_64 0:5.1.2-14.el7 will be installed
—> Package vim-common.x86_64 2:7.4.160-1.el7 will be installed
–> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.160-1.el7.x86_64
–> Running transaction check
—> Package libX11-common.noarch 0:1.6.0-2.1.el7 will be installed
—> Package libxcb.x86_64 0:1.9-5.el7 will be installed
–> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.9-5.el7.x86_64
—> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
—> Package perl-Carp.noarch 0:1.26-244.el7 will be installed
—> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed
—> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
—> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed
–> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch
–> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch
–> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch
–> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch
—> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed
–> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
–> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
—> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed
–> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch
–> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch
—> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
—> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed
—> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
—> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed
—> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed
—> Package perl-constant.noarch 0:1.27-2.el7 will be installed
—> Package perl-macros.x86_64 4:5.16.3-283.el7 will be installed
—> Package perl-threads.x86_64 0:1.87-4.el7 will be installed
—> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed
—> Package vim-filesystem.x86_64 2:7.4.160-1.el7 will be installed
–> Running transaction check
—> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
—> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
—> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
–> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
–> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
—> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
—> Package perl-Pod-Escapes.noarch 1:1.04-283.el7 will be installed
—> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed
–> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
–> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
—> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed
–> Running transaction check
—> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed
—> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
—> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed
—> Package perl-parent.noarch 1:0.225-244.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================
Package                                                Arch                                  Version                                             Repository                              Size
===============================================================================================================================================================================================
Installing:
httpd                                                  x86_64                                2.4.6-19.el7.centos                                 updates                                2.7 M
mariadb                                                x86_64                                1:5.5.40-2.el7_0                                    updates                                8.9 M
mariadb-server                                         x86_64                                1:5.5.40-2.el7_0                                    updates                                 11 M
php                                                    x86_64                                5.4.16-23.el7_0.3                                   updates                                1.3 M
php-gd                                                 x86_64                                5.4.16-23.el7_0.3                                   updates                                124 k
php-mbstring                                           x86_64                                5.4.16-23.el7_0.3                                   updates                                501 k
php-mysql                                              x86_64                                5.4.16-23.el7_0.3                                   updates                                 97 k
php-pdo                                                x86_64                                5.4.16-23.el7_0.3                                   updates                                 95 k
php-xml                                                x86_64                                5.4.16-23.el7_0.3                                   updates                                122 k
vim-enhanced                                           x86_64                                2:7.4.160-1.el7                                     base                                   1.0 M
Installing for dependencies:
apr                                                    x86_64                                1.4.8-3.el7                                         base                                   103 k
apr-util                                               x86_64                                1.5.2-6.el7                                         base                                    92 k
gpm-libs                                               x86_64                                1.20.7-5.el7                                        base                                    32 k
httpd-tools                                            x86_64                                2.4.6-19.el7.centos                                 updates                                 78 k
libX11                                                 x86_64                                1.6.0-2.1.el7                                       base                                   605 k
libX11-common                                          noarch                                1.6.0-2.1.el7                                       base                                   181 k
libXau                                                 x86_64                                1.0.8-2.1.el7                                       base                                    29 k
libXpm                                                 x86_64                                3.5.10-5.1.el7                                      base                                    52 k
libaio                                                 x86_64                                0.3.109-12.el7                                      base                                    24 k
libjpeg-turbo                                          x86_64                                1.2.90-5.el7                                        base                                   134 k
libpng                                                 x86_64                                2:1.5.13-5.el7                                      base                                   212 k
libxcb                                                 x86_64                                1.9-5.el7                                           base                                   169 k
libxslt                                                x86_64                                1.1.28-5.el7                                        base                                   242 k
libzip                                                 x86_64                                0.10.1-8.el7                                        base                                    48 k
mailcap                                                noarch                                2.1.41-2.el7                                        base                                    31 k
perl                                                   x86_64                                4:5.16.3-283.el7                                    base                                   8.0 M
perl-Carp                                              noarch                                1.26-244.el7                                        base                                    19 k
perl-Compress-Raw-Bzip2                                x86_64                                2.061-3.el7                                         base                                    32 k
perl-Compress-Raw-Zlib                                 x86_64                                1:2.061-4.el7                                       base                                    57 k
perl-DBD-MySQL                                         x86_64                                4.023-5.el7                                         base                                   140 k
perl-DBI                                               x86_64                                1.627-4.el7                                         base                                   802 k
perl-Data-Dumper                                       x86_64                                2.145-3.el7                                         base                                    47 k
perl-Encode                                            x86_64                                2.51-7.el7                                          base                                   1.5 M
perl-Exporter                                          noarch                                5.68-3.el7                                          base                                    28 k
perl-File-Path                                         noarch                                2.09-2.el7                                          base                                    26 k
perl-File-Temp                                         noarch                                0.23.01-3.el7                                       base                                    56 k
perl-Filter                                            x86_64                                1.49-3.el7                                          base                                    76 k
perl-Getopt-Long                                       noarch                                2.40-2.el7                                          base                                    56 k
perl-HTTP-Tiny                                         noarch                                0.033-3.el7                                         base                                    38 k
perl-IO-Compress                                       noarch                                2.061-2.el7                                         base                                   260 k
perl-Net-Daemon                                        noarch                                0.48-5.el7                                          base                                    51 k
perl-PathTools                                         x86_64                                3.40-5.el7                                          base                                    82 k
perl-PlRPC                                             noarch                                0.2020-14.el7                                       base                                    36 k
perl-Pod-Escapes                                       noarch                                1:1.04-283.el7                                      base                                    49 k
perl-Pod-Perldoc                                       noarch                                3.20-4.el7                                          base                                    87 k
perl-Pod-Simple                                        noarch                                1:3.28-4.el7                                        base                                   216 k
perl-Pod-Usage                                         noarch                                1.63-3.el7                                          base                                    27 k
perl-Scalar-List-Utils                                 x86_64                                1.27-248.el7                                        base                                    36 k
perl-Socket                                            x86_64                                2.010-3.el7                                         base                                    49 k
perl-Storable                                          x86_64                                2.45-3.el7                                          base                                    77 k
perl-Text-ParseWords                                   noarch                                3.29-4.el7                                          base                                    14 k
perl-Time-Local                                        noarch                                1.2300-2.el7                                        base                                    24 k
perl-constant                                          noarch                                1.27-2.el7                                          base                                    19 k
perl-libs                                              x86_64                                4:5.16.3-283.el7                                    base                                   686 k
perl-macros                                            x86_64                                4:5.16.3-283.el7                                    base                                    42 k
perl-parent                                            noarch                                1:0.225-244.el7                                     base                                    12 k
perl-podlators                                         noarch                                2.5.1-3.el7                                         base                                   112 k
perl-threads                                           x86_64                                1.87-4.el7                                          base                                    49 k
perl-threads-shared                                    x86_64                                1.43-6.el7                                          base                                    39 k
php-cli                                                x86_64                                5.4.16-23.el7_0.3                                   updates                                2.7 M
php-common                                             x86_64                                5.4.16-23.el7_0.3                                   updates                                561 k
t1lib                                                  x86_64                                5.1.2-14.el7                                        base                                   166 k
vim-common                                             x86_64                                2:7.4.160-1.el7                                     base                                   5.9 M
vim-filesystem                                         x86_64                                2:7.4.160-1.el7                                     base                                   9.6 k
Updating for dependencies:
mariadb-libs                                           x86_64                                1:5.5.40-2.el7_0                                    updates                                753 k

Transaction Summary
===============================================================================================================================================================================================
Install  10 Packages (+54 Dependent packages)
Upgrade              (  1 Dependent package)

Total size: 50 M
Total download size: 50 M
Is this ok [y/d/N]: y

Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/64): apr-util-1.5.2-6.el7.x86_64.rpm                                                                                                                                 |  92 kB  00:00:00
(2/64): gpm-libs-1.20.7-5.el7.x86_64.rpm                                                                                                                                |  32 kB  00:00:00
(3/64): apr-1.4.8-3.el7.x86_64.rpm                                                                                                                                      | 103 kB  00:00:00
(4/64): httpd-tools-2.4.6-19.el7.centos.x86_64.rpm                                                                                                                      |  78 kB  00:00:00
(5/64): libX11-common-1.6.0-2.1.el7.noarch.rpm                                                                                                                          | 181 kB  00:00:00
(6/64): libXau-1.0.8-2.1.el7.x86_64.rpm                                                                                                                                 |  29 kB  00:00:00
(7/64): libXpm-3.5.10-5.1.el7.x86_64.rpm                                                                                                                                |  52 kB  00:00:00
(8/64): libaio-0.3.109-12.el7.x86_64.rpm                                                                                                                                |  24 kB  00:00:00
(9/64): libjpeg-turbo-1.2.90-5.el7.x86_64.rpm                                                                                                                           | 134 kB  00:00:00
(10/64): libX11-1.6.0-2.1.el7.x86_64.rpm                                                                                                                                | 605 kB  00:00:01
(11/64): libpng-1.5.13-5.el7.x86_64.rpm                                                                                                                                 | 212 kB  00:00:00
(12/64): httpd-2.4.6-19.el7.centos.x86_64.rpm                                                                                                                           | 2.7 MB  00:00:02
(13/64): libxslt-1.1.28-5.el7.x86_64.rpm                                                                                                                                | 242 kB  00:00:00
(14/64): libzip-0.10.1-8.el7.x86_64.rpm                                                                                                                                 |  48 kB  00:00:00
(15/64): mailcap-2.1.41-2.el7.noarch.rpm                                                                                                                                |  31 kB  00:00:00
(16/64): libxcb-1.9-5.el7.x86_64.rpm                                                                                                                                    | 169 kB  00:00:03
(17/64): perl-Carp-1.26-244.el7.noarch.rpm                                                                                                                              |  19 kB  00:00:00
(18/64): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm                                                                                                                 |  32 kB  00:00:00
(19/64): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm                                                                                                                  |  57 kB  00:00:00
(20/64): perl-5.16.3-283.el7.x86_64.rpm                                                                                                                                 | 8.0 MB  00:00:03
(21/64): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm                                                                                                                          | 140 kB  00:00:00
(22/64): perl-Data-Dumper-2.145-3.el7.x86_64.rpm                                                                                                                        |  47 kB  00:00:00
(23/64): perl-DBI-1.627-4.el7.x86_64.rpm                                                                                                                                | 802 kB  00:00:00
(24/64): perl-Exporter-5.68-3.el7.noarch.rpm                                                                                                                            |  28 kB  00:00:00
(25/64): perl-File-Path-2.09-2.el7.noarch.rpm                                                                                                                           |  26 kB  00:00:00
(26/64): perl-File-Temp-0.23.01-3.el7.noarch.rpm                                                                                                                        |  56 kB  00:00:00
(27/64): perl-Filter-1.49-3.el7.x86_64.rpm                                                                                                                              |  76 kB  00:00:00
(28/64): perl-Getopt-Long-2.40-2.el7.noarch.rpm                                                                                                                         |  56 kB  00:00:00
(29/64): perl-HTTP-Tiny-0.033-3.el7.noarch.rpm                                                                                                                          |  38 kB  00:00:00
(30/64): perl-IO-Compress-2.061-2.el7.noarch.rpm                                                                                                                        | 260 kB  00:00:00
(31/64): perl-Net-Daemon-0.48-5.el7.noarch.rpm                                                                                                                          |  51 kB  00:00:00
(32/64): perl-PathTools-3.40-5.el7.x86_64.rpm                                                                                                                           |  82 kB  00:00:00
(33/64): perl-Encode-2.51-7.el7.x86_64.rpm                                                                                                                              | 1.5 MB  00:00:04
(34/64): perl-Pod-Escapes-1.04-283.el7.noarch.rpm                                                                                                                       |  49 kB  00:00:00
(35/64): perl-Pod-Perldoc-3.20-4.el7.noarch.rpm                                                                                                                         |  87 kB  00:00:00
(36/64): perl-Pod-Simple-3.28-4.el7.noarch.rpm                                                                                                                          | 216 kB  00:00:00
(37/64): perl-Pod-Usage-1.63-3.el7.noarch.rpm                                                                                                                           |  27 kB  00:00:00
(38/64): perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm                                                                                                                 |  36 kB  00:00:00
(39/64): perl-Socket-2.010-3.el7.x86_64.rpm                                                                                                                             |  49 kB  00:00:00
(40/64): perl-Storable-2.45-3.el7.x86_64.rpm                                                                                                                            |  77 kB  00:00:00
(41/64): perl-Text-ParseWords-3.29-4.el7.noarch.rpm                                                                                                                     |  14 kB  00:00:00
(42/64): perl-Time-Local-1.2300-2.el7.noarch.rpm                                                                                                                        |  24 kB  00:00:00
(43/64): mariadb-5.5.40-2.el7_0.x86_64.rpm                                                                                                                              | 8.9 MB  00:00:12
(44/64): perl-constant-1.27-2.el7.noarch.rpm                                                                                                                            |  19 kB  00:00:00
(45/64): perl-libs-5.16.3-283.el7.x86_64.rpm                                                                                                                            | 686 kB  00:00:00
(46/64): perl-macros-5.16.3-283.el7.x86_64.rpm                                                                                                                          |  42 kB  00:00:00
(47/64): perl-parent-0.225-244.el7.noarch.rpm                                                                                                                           |  12 kB  00:00:00
(48/64): perl-podlators-2.5.1-3.el7.noarch.rpm                                                                                                                          | 112 kB  00:00:00
(49/64): perl-threads-1.87-4.el7.x86_64.rpm                                                                                                                             |  49 kB  00:00:00
(50/64): perl-threads-shared-1.43-6.el7.x86_64.rpm                                                                                                                      |  39 kB  00:00:00
(51/64): mariadb-server-5.5.40-2.el7_0.x86_64.rpm                                                                                                                       |  11 MB  00:00:14
(52/64): php-5.4.16-23.el7_0.3.x86_64.rpm                                                                                                                               | 1.3 MB  00:00:01
(53/64): php-common-5.4.16-23.el7_0.3.x86_64.rpm                                                                                                                        | 561 kB  00:00:00
(54/64): perl-PlRPC-0.2020-14.el7.noarch.rpm                                                                                                                            |  36 kB  00:00:08
(55/64): php-gd-5.4.16-23.el7_0.3.x86_64.rpm                                                                                                                            | 124 kB  00:00:00
(56/64): php-mbstring-5.4.16-23.el7_0.3.x86_64.rpm                                                                                                                      | 501 kB  00:00:00
(57/64): php-mysql-5.4.16-23.el7_0.3.x86_64.rpm                                                                                                                         |  97 kB  00:00:00
(58/64): php-pdo-5.4.16-23.el7_0.3.x86_64.rpm                                                                                                                           |  95 kB  00:00:00
(59/64): php-xml-5.4.16-23.el7_0.3.x86_64.rpm                                                                                                                           | 122 kB  00:00:00
(60/64): php-cli-5.4.16-23.el7_0.3.x86_64.rpm                                                                                                                           | 2.7 MB  00:00:03
(61/64): t1lib-5.1.2-14.el7.x86_64.rpm                                                                                                                                  | 166 kB  00:00:00
(62/64): vim-enhanced-7.4.160-1.el7.x86_64.rpm                                                                                                                          | 1.0 MB  00:00:01
(63/64): vim-filesystem-7.4.160-1.el7.x86_64.rpm                                                                                                                        | 9.6 kB  00:00:00
(64/64): vim-common-7.4.160-1.el7.x86_64.rpm                                                                                                                            | 5.9 MB  00:00:03
———————————————————————————————————————————————————————————————–
Total                                                                                                                                                          2.1 MB/s |  50 MB  00:00:23
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating   : 1:mariadb-libs-5.5.40-2.el7_0.x86_64                                                                                                                                       1/66
Installing : apr-1.4.8-3.el7.x86_64                                                                                                                                                     2/66
Installing : apr-util-1.5.2-6.el7.x86_64                                                                                                                                                3/66
Installing : httpd-tools-2.4.6-19.el7.centos.x86_64                                                                                                                                     4/66
Installing : 1:perl-parent-0.225-244.el7.noarch                                                                                                                                         5/66
Installing : perl-HTTP-Tiny-0.033-3.el7.noarch                                                                                                                                          6/66
Installing : perl-podlators-2.5.1-3.el7.noarch                                                                                                                                          7/66
Installing : perl-Pod-Perldoc-3.20-4.el7.noarch                                                                                                                                         8/66
Installing : 1:perl-Pod-Escapes-1.04-283.el7.noarch                                                                                                                                     9/66
Installing : perl-Encode-2.51-7.el7.x86_64                                                                                                                                             10/66
Installing : perl-Text-ParseWords-3.29-4.el7.noarch                                                                                                                                    11/66
Installing : perl-Pod-Usage-1.63-3.el7.noarch                                                                                                                                          12/66
Installing : 4:perl-macros-5.16.3-283.el7.x86_64                                                                                                                                       13/66
Installing : perl-Storable-2.45-3.el7.x86_64                                                                                                                                           14/66
Installing : perl-Exporter-5.68-3.el7.noarch                                                                                                                                           15/66
Installing : perl-Socket-2.010-3.el7.x86_64                                                                                                                                            16/66
Installing : perl-Carp-1.26-244.el7.noarch                                                                                                                                             17/66
Installing : perl-PathTools-3.40-5.el7.x86_64                                                                                                                                          18/66
Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64                                                                                                                                19/66
Installing : 4:perl-libs-5.16.3-283.el7.x86_64                                                                                                                                         20/66
Installing : perl-Time-Local-1.2300-2.el7.noarch                                                                                                                                       21/66
Installing : perl-constant-1.27-2.el7.noarch                                                                                                                                           22/66
Installing : perl-File-Temp-0.23.01-3.el7.noarch                                                                                                                                       23/66
Installing : perl-File-Path-2.09-2.el7.noarch                                                                                                                                          24/66
Installing : perl-threads-shared-1.43-6.el7.x86_64                                                                                                                                     25/66
Installing : perl-threads-1.87-4.el7.x86_64                                                                                                                                            26/66
Installing : perl-Filter-1.49-3.el7.x86_64                                                                                                                                             27/66
Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch                                                                                                                                       28/66
Installing : perl-Getopt-Long-2.40-2.el7.noarch                                                                                                                                        29/66
Installing : 4:perl-5.16.3-283.el7.x86_64                                                                                                                                              30/66
Installing : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                                       31/66
Installing : 1:mariadb-5.5.40-2.el7_0.x86_64                                                                                                                                           32/66
Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                                                                                33/66
Installing : perl-Net-Daemon-0.48-5.el7.noarch                                                                                                                                         34/66
Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                                                                               35/66
Installing : perl-IO-Compress-2.061-2.el7.noarch                                                                                                                                       36/66
Installing : perl-PlRPC-0.2020-14.el7.noarch                                                                                                                                           37/66
Installing : perl-DBI-1.627-4.el7.x86_64                                                                                                                                               38/66
Installing : perl-DBD-MySQL-4.023-5.el7.x86_64                                                                                                                                         39/66
Installing : libzip-0.10.1-8.el7.x86_64                                                                                                                                                40/66
Installing : php-common-5.4.16-23.el7_0.3.x86_64                                                                                                                                       41/66
Installing : php-pdo-5.4.16-23.el7_0.3.x86_64                                                                                                                                          42/66
Installing : php-cli-5.4.16-23.el7_0.3.x86_64                                                                                                                                          43/66
Installing : libxslt-1.1.28-5.el7.x86_64                                                                                                                                               44/66
Installing : gpm-libs-1.20.7-5.el7.x86_64                                                                                                                                              45/66
Installing : 2:libpng-1.5.13-5.el7.x86_64                                                                                                                                              46/66
Installing : 2:vim-filesystem-7.4.160-1.el7.x86_64                                                                                                                                     47/66
Installing : 2:vim-common-7.4.160-1.el7.x86_64                                                                                                                                         48/66
Installing : libaio-0.3.109-12.el7.x86_64                                                                                                                                              49/66
Installing : libX11-common-1.6.0-2.1.el7.noarch                                                                                                                                        50/66
Installing : mailcap-2.1.41-2.el7.noarch                                                                                                                                               51/66
Installing : httpd-2.4.6-19.el7.centos.x86_64                                                                                                                                          52/66
Installing : libXau-1.0.8-2.1.el7.x86_64                                                                                                                                               53/66
Installing : libxcb-1.9-5.el7.x86_64                                                                                                                                                   54/66
Installing : libX11-1.6.0-2.1.el7.x86_64                                                                                                                                               55/66
Installing : libXpm-3.5.10-5.1.el7.x86_64                                                                                                                                              56/66
Installing : t1lib-5.1.2-14.el7.x86_64                                                                                                                                                 57/66
Installing : libjpeg-turbo-1.2.90-5.el7.x86_64                                                                                                                                         58/66
Installing : php-gd-5.4.16-23.el7_0.3.x86_64                                                                                                                                           59/66
Installing : php-5.4.16-23.el7_0.3.x86_64                                                                                                                                              60/66
Installing : 1:mariadb-server-5.5.40-2.el7_0.x86_64                                                                                                                                    61/66
Installing : 2:vim-enhanced-7.4.160-1.el7.x86_64                                                                                                                                       62/66
Installing : php-xml-5.4.16-23.el7_0.3.x86_64                                                                                                                                          63/66
Installing : php-mysql-5.4.16-23.el7_0.3.x86_64                                                                                                                                        64/66
Installing : php-mbstring-5.4.16-23.el7_0.3.x86_64                                                                                                                                     65/66
Cleanup    : 1:mariadb-libs-5.5.35-3.el7.x86_64                                                                                                                                        66/66
Verifying  : 2:vim-common-7.4.160-1.el7.x86_64                                                                                                                                          1/66
Verifying  : perl-HTTP-Tiny-0.033-3.el7.noarch                                                                                                                                          2/66
Verifying  : 1:mariadb-5.5.40-2.el7_0.x86_64                                                                                                                                            3/66
Verifying  : libjpeg-turbo-1.2.90-5.el7.x86_64                                                                                                                                          4/66
Verifying  : libXau-1.0.8-2.1.el7.x86_64                                                                                                                                                5/66
Verifying  : mailcap-2.1.41-2.el7.noarch                                                                                                                                                6/66
Verifying  : libX11-common-1.6.0-2.1.el7.noarch                                                                                                                                         7/66
Verifying  : perl-threads-shared-1.43-6.el7.x86_64                                                                                                                                      8/66
Verifying  : perl-Storable-2.45-3.el7.x86_64                                                                                                                                            9/66
Verifying  : perl-IO-Compress-2.061-2.el7.noarch                                                                                                                                       10/66
Verifying  : perl-Exporter-5.68-3.el7.noarch                                                                                                                                           11/66
Verifying  : perl-PathTools-3.40-5.el7.x86_64                                                                                                                                          12/66
Verifying  : 1:perl-Pod-Escapes-1.04-283.el7.noarch                                                                                                                                    13/66
Verifying  : php-gd-5.4.16-23.el7_0.3.x86_64                                                                                                                                           14/66
Verifying  : libaio-0.3.109-12.el7.x86_64                                                                                                                                              15/66
Verifying  : libXpm-3.5.10-5.1.el7.x86_64                                                                                                                                              16/66
Verifying  : 2:vim-filesystem-7.4.160-1.el7.x86_64                                                                                                                                     17/66
Verifying  : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                                                                                18/66
Verifying  : php-mbstring-5.4.16-23.el7_0.3.x86_64                                                                                                                                     19/66
Verifying  : php-common-5.4.16-23.el7_0.3.x86_64                                                                                                                                       20/66
Verifying  : perl-Net-Daemon-0.48-5.el7.noarch                                                                                                                                         21/66
Verifying  : php-pdo-5.4.16-23.el7_0.3.x86_64                                                                                                                                          22/66
Verifying  : apr-1.4.8-3.el7.x86_64                                                                                                                                                    23/66
Verifying  : 2:libpng-1.5.13-5.el7.x86_64                                                                                                                                              24/66
Verifying  : perl-File-Temp-0.23.01-3.el7.noarch                                                                                                                                       25/66
Verifying  : httpd-2.4.6-19.el7.centos.x86_64                                                                                                                                          26/66
Verifying  : t1lib-5.1.2-14.el7.x86_64                                                                                                                                                 27/66
Verifying  : httpd-tools-2.4.6-19.el7.centos.x86_64                                                                                                                                    28/66
Verifying  : php-xml-5.4.16-23.el7_0.3.x86_64                                                                                                                                          29/66
Verifying  : php-mysql-5.4.16-23.el7_0.3.x86_64                                                                                                                                        30/66
Verifying  : php-cli-5.4.16-23.el7_0.3.x86_64                                                                                                                                          31/66
Verifying  : perl-Time-Local-1.2300-2.el7.noarch                                                                                                                                       32/66
Verifying  : perl-DBI-1.627-4.el7.x86_64                                                                                                                                               33/66
Verifying  : perl-Socket-2.010-3.el7.x86_64                                                                                                                                            34/66
Verifying  : 4:perl-macros-5.16.3-283.el7.x86_64                                                                                                                                       35/66
Verifying  : libxcb-1.9-5.el7.x86_64                                                                                                                                                   36/66
Verifying  : 4:perl-5.16.3-283.el7.x86_64                                                                                                                                              37/66
Verifying  : perl-Carp-1.26-244.el7.noarch                                                                                                                                             38/66
Verifying  : gpm-libs-1.20.7-5.el7.x86_64                                                                                                                                              39/66
Verifying  : 2:vim-enhanced-7.4.160-1.el7.x86_64                                                                                                                                       40/66
Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                                                       41/66
Verifying  : perl-podlators-2.5.1-3.el7.noarch                                                                                                                                         42/66
Verifying  : libxslt-1.1.28-5.el7.x86_64                                                                                                                                               43/66
Verifying  : php-5.4.16-23.el7_0.3.x86_64                                                                                                                                              44/66
Verifying  : apr-util-1.5.2-6.el7.x86_64                                                                                                                                               45/66
Verifying  : perl-Scalar-List-Utils-1.27-248.el7.x86_64                                                                                                                                46/66
Verifying  : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                                                                               47/66
Verifying  : 4:perl-libs-5.16.3-283.el7.x86_64                                                                                                                                         48/66
Verifying  : perl-PlRPC-0.2020-14.el7.noarch                                                                                                                                           49/66
Verifying  : libX11-1.6.0-2.1.el7.x86_64                                                                                                                                               50/66
Verifying  : perl-Pod-Usage-1.63-3.el7.noarch                                                                                                                                          51/66
Verifying  : perl-DBD-MySQL-4.023-5.el7.x86_64                                                                                                                                         52/66
Verifying  : 1:mariadb-libs-5.5.40-2.el7_0.x86_64                                                                                                                                      53/66
Verifying  : perl-Encode-2.51-7.el7.x86_64                                                                                                                                             54/66
Verifying  : libzip-0.10.1-8.el7.x86_64                                                                                                                                                55/66
Verifying  : perl-Getopt-Long-2.40-2.el7.noarch                                                                                                                                        56/66
Verifying  : perl-constant-1.27-2.el7.noarch                                                                                                                                           57/66
Verifying  : 1:mariadb-server-5.5.40-2.el7_0.x86_64                                                                                                                                    58/66
Verifying  : perl-File-Path-2.09-2.el7.noarch                                                                                                                                          59/66
Verifying  : perl-threads-1.87-4.el7.x86_64                                                                                                                                            60/66
Verifying  : 1:perl-Pod-Simple-3.28-4.el7.noarch                                                                                                                                       61/66
Verifying  : perl-Filter-1.49-3.el7.x86_64                                                                                                                                             62/66
Verifying  : perl-Pod-Perldoc-3.20-4.el7.noarch                                                                                                                                        63/66
Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                                                                                                                                    64/66
Verifying  : 1:perl-parent-0.225-244.el7.noarch                                                                                                                                        65/66
Verifying  : 1:mariadb-libs-5.5.35-3.el7.x86_64                                                                                                                                        66/66

Installed:
httpd.x86_64 0:2.4.6-19.el7.centos      mariadb.x86_64 1:5.5.40-2.el7_0      mariadb-server.x86_64 1:5.5.40-2.el7_0 php.x86_64 0:5.4.16-23.el7_0.3     php-gd.x86_64 0:5.4.16-23.el7_0.3
php-mbstring.x86_64 0:5.4.16-23.el7_0.3 php-mysql.x86_64 0:5.4.16-23.el7_0.3 php-pdo.x86_64 0:5.4.16-23.el7_0.3     php-xml.x86_64 0:5.4.16-23.el7_0.3 vim-enhanced.x86_64 2:7.4.160-1.el7

Dependency Installed:
apr.x86_64 0:1.4.8-3.el7                     apr-util.x86_64 0:1.5.2-6.el7                    gpm-libs.x86_64 0:1.20.7-5.el7                  httpd-tools.x86_64 0:2.4.6-19.el7.centos
libX11.x86_64 0:1.6.0-2.1.el7                libX11-common.noarch 0:1.6.0-2.1.el7             libXau.x86_64 0:1.0.8-2.1.el7                   libXpm.x86_64 0:3.5.10-5.1.el7
libaio.x86_64 0:0.3.109-12.el7               libjpeg-turbo.x86_64 0:1.2.90-5.el7              libpng.x86_64 2:1.5.13-5.el7                    libxcb.x86_64 0:1.9-5.el7
libxslt.x86_64 0:1.1.28-5.el7                libzip.x86_64 0:0.10.1-8.el7                     mailcap.noarch 0:2.1.41-2.el7                   perl.x86_64 4:5.16.3-283.el7
perl-Carp.noarch 0:1.26-244.el7              perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7     perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7     perl-DBD-MySQL.x86_64 0:4.023-5.el7
perl-DBI.x86_64 0:1.627-4.el7                perl-Data-Dumper.x86_64 0:2.145-3.el7            perl-Encode.x86_64 0:2.51-7.el7                 perl-Exporter.noarch 0:5.68-3.el7
perl-File-Path.noarch 0:2.09-2.el7           perl-File-Temp.noarch 0:0.23.01-3.el7            perl-Filter.x86_64 0:1.49-3.el7                 perl-Getopt-Long.noarch 0:2.40-2.el7
perl-HTTP-Tiny.noarch 0:0.033-3.el7          perl-IO-Compress.noarch 0:2.061-2.el7            perl-Net-Daemon.noarch 0:0.48-5.el7             perl-PathTools.x86_64 0:3.40-5.el7
perl-PlRPC.noarch 0:0.2020-14.el7            perl-Pod-Escapes.noarch 1:1.04-283.el7           perl-Pod-Perldoc.noarch 0:3.20-4.el7            perl-Pod-Simple.noarch 1:3.28-4.el7
perl-Pod-Usage.noarch 0:1.63-3.el7           perl-Scalar-List-Utils.x86_64 0:1.27-248.el7     perl-Socket.x86_64 0:2.010-3.el7                perl-Storable.x86_64 0:2.45-3.el7
perl-Text-ParseWords.noarch 0:3.29-4.el7     perl-Time-Local.noarch 0:1.2300-2.el7            perl-constant.noarch 0:1.27-2.el7               perl-libs.x86_64 4:5.16.3-283.el7
perl-macros.x86_64 4:5.16.3-283.el7          perl-parent.noarch 1:0.225-244.el7               perl-podlators.noarch 0:2.5.1-3.el7             perl-threads.x86_64 0:1.87-4.el7
perl-threads-shared.x86_64 0:1.43-6.el7      php-cli.x86_64 0:5.4.16-23.el7_0.3               php-common.x86_64 0:5.4.16-23.el7_0.3           t1lib.x86_64 0:5.1.2-14.el7
vim-common.x86_64 2:7.4.160-1.el7            vim-filesystem.x86_64 2:7.4.160-1.el7

Dependency Updated:
mariadb-libs.x86_64 1:5.5.40-2.el7_0

Complete!

 

[root@testserver7 ~]# setsebool -P httpd_unified 1
[root@testserver7 ~]# firewall-cmd –permanent –zone=public –add-service=http
success
[root@testserver7 ~]# firewall-cmd –permanent –zone=public –add-service=https
success
[root@testserver7 ~]# firewall-cmd –reload
success
[root@testserver7 ~]#

 

[root@testserver7 software]# mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we’ll need the current
password for the root user.  If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
… Success!

Normally, root should only be allowed to connect from ‘localhost’.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
… Success!

By default, MariaDB comes with a database named ‘test’ that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
… Success!

Cleaning up…

All done!  If you’ve completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

 

create database owncloud;

CREATE USER ‘owncloud’@’localhost’ IDENTIFIED BY ‘test123’;

GRANT SELECT,UPDATE,DELETE ON owncloud.* TO ‘owncloud’@’localhost’;

GRANT all ON owncloud.* TO ‘owncloud’@’localhost’;
vi  /etc/httpd/conf.d/owncloud.conf

Alias /owncloud /var/www/html/owncloud

Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all

 

http://192.168.1.11/owncloud/index.php

150119120039511

Image 11

ifconfig command not found on CentOS 7

ifconfig command not found on CentOS 7

A few days back I minimal installed CentOS 7 (x86_64) on my local system. On and Before CentOS 6.x releases,I was habitual to use the command called ifconfig . The ifconfing command helps to provide information about the ethernet devices on your system.

On CentOS 6.x and before, ifconfig command by default used to shipped. Whereas in minimal installed CentOS 7 , I have not found ifconfig command.

This will give you the error , ifconfig command not found.

To get the ifconfig command into our system , run the below given command

yum install net-tools

Now check the ifconfig command and its path in system (which and whereis command will help)

ifconfig
ifconfig -a
which ifconfig
whereis ifconfig

How I got to know net-tools package need to be installed

Using yum command with provides or whatprovides options help to give you list of package which is required for that particular command.

As per man page of yum :

provides or whatprovides
Is used to find out which package provides some feature or file. Just use a specific name or a file-glob-syntax wildcards to list the packages available or installed that provide that feature or file.

We have used the below given command to find which package provides the ifconfig command.

yum provides ifconfig


[root@testserver7 ~]# yum install net-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.vodien.com
* extras: mirror.vodien.com
* updates: mirror.vodien.com
Resolving Dependencies
–> Running transaction check
—> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================
Package                                     Arch                                     Version                                                     Repository                              Size
===============================================================================================================================================================================================
Installing:
net-tools                                   x86_64                                   2.0-0.17.20131004git.el7                                    base                                   304 k

Transaction Summary
===============================================================================================================================================================================================
Install  1 Package

Total download size: 304 k
Installed size: 917 k
Is this ok [y/d/N]: y
Downloading packages:
net-tools-2.0-0.17.20131004git.el7.x86_64.rpm                                                                                                                           | 304 kB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : net-tools-2.0-0.17.20131004git.el7.x86_64                                                                                                                                   1/1
Verifying  : net-tools-2.0-0.17.20131004git.el7.x86_64                                                                                                                                   1/1

Installed:
net-tools.x86_64 0:2.0-0.17.20131004git.el7

Complete!
[root@testserver7 ~]#

 

How to clone a MySQL database

Below shows your the steps needed to clone a MySQL database.

mysqladmin create [new db name] -u [username] –password=[password] && \
mysqldump -u [username] —password=[password] [old db name] | mysql -u [username] –password=[password] -h [host] [new db name]

How do I Export and Import a MySQL Database ?

There are times during migrations, database restores etc that you will need to export and import your MySQL database. Below shows you the commands required to achieved this.

Note : This article is meant as a reference point rather then a full blown article.

EXPORT

mysqldump -u root -p {database} > db.sql

IMPORT

mysql -u root -p -h 127.0.0.1 {database} < db.sql