Category Archives: Linux starters

How to Install PhPMyAdmin on Centos 7 from source

Dear Friends,

First of all we will install required repositories.

[root@itpings opt]# yum -y install epel-release
[root@itpings opt]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Now we will install apache, mariadb, mariadb-server and php56

[root@itpings opt]# yum -y install httpd mariadb mariadb-server php56w php56w-mbstring php56w-mysql php56w-soap unzip vim wget

Once installed we will download phpmyadmin from phpmyadmin.net

[root@itpings opt]# wget https://files.phpmyadmin.net/phpMyAdmin/4.7.2/phpMyAdmin-4.7.2-all-languages.zip

unzip the content and move it to /var/www/html and rename the unzipped content to phpmyadmin

[root@itpings html]# unzip phpMyAdmin-4.7.2-all-languages.zip
[root@itpings html]# mv phpMyAdmin-4.7.2-all-languages.zip phpmyadmin

Now Change the ownership of the folder

[root@red html]# chown -R apache.apache phpMyAdmin
[root@red html]# chmod -R 755 phpMyAdmin

Now we will copy config.sample file to config.ini.php

[root@itpings html]# cp config.sample.inc.php config.inc.php

Now we will edit config.inc.php and only add root user and password of mysql ( Make sure you have root user and password of mysql)

/* User used to manipulate with storage */
 $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
 $cfg['Servers'][$i]['controluser'] = 'root';
 $cfg['Servers'][$i]['controlpass'] = 'itpings123';

Now to visit phpmyadmin visit http://<your-ip-address>/phpmyadmin and provide the above user and password.

Done

Thanks,

Salman A. Francis
YouTube: Linuxking
Facebook: LZHProject, Linuxking77

How to Add Physical Disk to Increase Size of /dev/mapper/centos-root

Dear Friends,

I ran into a problem where my openstack machine ran out of space. My Logical FS /dev/mapper/centos-root was only 50GB and most of the space was lost.

Solution:
LVM

I Added a new 500GB HDD (sdb), created partition with parted (sdb1) and gave the below commands:

[root@stack opt]# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created

Next Check your Volumes with “vgdisplay” command

[root@stack opt]# vgdisplay 
 --- Volume group ---
 VG Name centos
 System ID 
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 4
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 3
 Open LV 3
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 465.27 GiB
 PE Size 4.00 MiB
 Total PE 119109
 Alloc PE / Size 119109 / 465.27 GiB
 Free PE / Size 0 / 0 
 VG UUID TrvUI3-Xt7U-6vzF-5RtW-OfK0-OCOy-Tejrb6
 
 --- Volume group ---
 VG Name cinder-volumes
 System ID 
 Format lvm2
 Metadata Areas 1
 Metadata Sequence No 5
 VG Access read/write
 VG Status resizable
 MAX LV 0
 Cur LV 0
 Open LV 0
 Max PV 0
 Cur PV 1
 Act PV 1
 VG Size 20.60 GiB
 PE Size 4.00 MiB
 Total PE 5273
 Alloc PE / Size 0 / 0 
 Free PE / Size 5273 / 20.60 GiB
 VG UUID 9LDtLm-52Un-1QJA-yc3q-13vE-LqEc-hX0kiU

Continue reading