How to Mount ISO image Using NFS share in RHVM

Set up NFS shares that will serve as a data domain and an export domain on a Red Hat Enterprise Linux 6 server.
1: Install nfs-utils, the package that provides NFS tools:
# yum install nfs-utils

2:Configure the boot scripts to make shares available every time the system boots:
# chkconfig –add rpcbind
# chkconfig –add nfs
# chkconfig rpcbind on
# chkconfig nfs on

3:Start the rpcbind service and the nfs service:
# service rpcbind start
# service nfs start
4:Create the data directory and the export directory:
# mkdir -p /exports/iso

5:Add the newly created directories to the /etc/exports file. Add the following to /etc/exports:
/exports/iso *(rw)

6:Export the storage domains:
# exportfs -r

7:Reload the NFS service:
# service nfs reload
8:Create the group kvm:
# groupadd kvm -g 36
9:Create the user vdsm in the group kvm:
# useradd vdsm -u 36 -g 36

10: Set the ownership of your exported directories to 36:36, which gives vdsm:kvm ownership. This makes it possible for the Manager to store data in the storage domains represented by these exported directories:
# chown -R 36:36 /exports/iso
11: Change the mode of the directories so that read and write access is granted to the owner, and so that read and execute access is granted to the group and other users:
# chmod 0755 /exports/iso

Attaching NFS Storage

Attach an NFS storage domain to the data center in your Red Hat Enterprise Virtualization environment. This storage domain provides storage for virtualized guest images and ISO boot media.

1: In the Red Hat Enterprise Virtualization Manager Administration Portal, click the Storage resource tab.
2:Click New Domain.

3:Enter a Name for the storage domain
4:Accept the default values for the Data Center, Domain Function / Storage Type, Format, and Use Host lists.
5:Enter the Export Path to be used for the storage domain.
The export path should be in the format of 192.168.0.10:/data or domain.example.com:/data.
6:Click OK.

The new NFS data domain is displayed in the Storage tab with a status of Locked until the disk is prepared. The data domain is then automatically attached to the data center.

# engine-iso-uploader list
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort):
ISO Storage Domain Name | ISO Domain Status
ISO_Domain | ok

# engine-iso-uploader –iso-domain=ISO_Domain upload /iso-image-path/rhel-server-7.5-x86_64-dvd.iso
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort):
Uploading, please wait…
INFO: Start uploading /iso-image-path/rhel-server-7.5-x86_64-dvd.iso
Uploading: [########################################] 100%
INFO: /iso-image-path/rhel-server-7.5-x86_64-dvd.iso uploaded successfully

 

Now the iso image is ready in the attach cd drop-down as in the pic.

Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization

After changing the mother board in one of our Server. Network interface started to show the error as given below.

# service network restart
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.
[FAILED]

Fix applied.
++++++++++++
#vi /etc/udev/rules.d/70-persistent-net.rules

——————————
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x14e4:0x164c (bnx2)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:2c:87:29:dd:63″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

# PCI device 0x14e4:0x164c (bnx2)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:2b:68:22:dd:47″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″

# PCI device 0x14e4:0x164c (bnx2)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:32:3d:d4:0d:42″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

# PCI device 0x14e4:0x164c (bnx2)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:43:6d:d7:0d:1e”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″
——————————

1 :commented the first two devices NAME=”eth0″ and NAME=”eth1″ and edited the NAME=”eth2″ as NAME=”eth0″ and NAME=”eth2″ as NAME=”eth1″
2: Then copied the MAC of current eth0 (that is MAC of eth2) and replace the MAC in /etc/sysconfig/network-scripts/ifcfg-eth0
3: Restarted the server
Now the eth0 is up and server IP is back in network 🙂

How to Reset Joomla Admin Password from Linux Terminal -CLI

We should have access to Joomla database via Linux terminal to reset Administrator password using the below steps.

Joomla 1.x uses md5 to hash its passwords. Hence generate a md5hash from a new password.

Example NewPassword: @dmin123
1: Generate md5hash using following command in your terminal
.
# echo -n “@dmin123” | md5sum
3dcf34a6023633a0d92521ec9c8d5ae4
.
2: Log in to MySQL prompt
.
#mysql -p -u username
mysql> use joomla_database_name;
.
(You will get the joomla database details from configuration.php file.
var $secret = ‘df3F4UAi’;
var $user = ‘Jdbuser’;
var $db = ‘sitedb’;
)
.
The default ID of an Joomla admin user is 62. You can verify it by
.
mysql> select username, id from jos_users where name=’Administrator’;
+———-+—-+
| username | id |
+———-+—-+
| JuAdmin | 62 |
+———-+—-+
1 row in set (0.00 sec)
.
Here Joomla admin username is JuAdmin and id is 62 (default id)
.
Next rset joomla Administrator password to the new password using md5hash
.
mysql> update jos_users set password=’3dcf34a6023633a0d92521ec9c8d5ae4′ where id=’62’;
OR
mysql> update jos_users set password=’3dcf34a6023633a0d92521ec9c8d5ae4′ where name=’Administrator’;

Now navigate to joomla admin page in your browser login using the new password.
Username : JuAdmin
Password : @dmin123

sendmail returned error code 111

Last day a customer got error “sendmail returned error code 111” while sending mail via Horde Webamil.

The same also loged in the horde log “/var/log/psa-horde/psa-horde.log”
———-
“HORDE [error] [imp] sendmail returned error code 111”
———-

Commonly the error occurs when there is incorrect permission on any of the qmail folders.

Other Webmail (Like Atmail) was working fine in the server, the issue was Horde specific.

In this case we can correct the permission by the following:
—————-
chmod 755 /var/qmail/bin
chmod 755 /usr/local/psa/handlers
chmod 755 /usr/local/psa/handlers/hooks
—————-
But in our case other Webmail (Like Atmail) was working fine in the server, the issue was Horde specific.

Further checking I could find that the Selinux was enabled in the server. That was the issue !!!

Resolution:

Disable Selinux  (change in to Permissive)
#setenforce 0

How to reinstall Horde in a Plesk server

As a safety measure take the backup of current Horde:
++++++++++
1. Take backup of horde database in ‘/root’.
# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` horde > hordebackup.sql
2. Take a backup of the directory ‘/etc/psa-webmail/horde/’
# cp -pr /etc/psa-webmail/horde ~/

3. Remove all horde related packages.

rpm -qa |egrep “psa-turba|psa-ingo|psa-mnemo|psa-mimp|psa-kronolith|psa-passwd|psa-horde” |xargs rpm -e

4. Reinstall horde webmail using Plesk autoinstaller.
5. Copy back the password of the horde user.
# cat horde/.horde.shadow > /etc/psa-webmail/horde/.horde.shadow
++++++++++++

In order to prevent conflicts, Tweak Settings may not be altered while a cPanel & WHM update is in progress

I’ve experienced an error while accessing Tweak Settings through WHM as “In order to prevent conflicts, Tweak Settings may not be altered while a cPanel & WHM update is in progress”in WHM ‘

In this case first we need to confirm whether  the upcp is running really or not :

 ps axfwwwu | grep cPanel\ Update

If there is any process let it be completed, otherwise the issue is caused due to the file /usr/local/cpanel/upgrade_in_progress.txt created by failed/incomplete upcp process.

Just move or delete this file to access the Tweak settings.

A message with the following attributes was not delivered because it contains an object which cannot be checked by antivirus. Relaying such messages is blocked by administrator.

Getting the below bounce message while trying to send emails to Plesk server with drweb enabled.

++++++++++++++++++
A message with the following attributes was not delivered because it contains an object which cannot be checked by antivirus. Relaying such messages is blocked by administrator. ++++++++++++++++++

Solution:

Restart the drweb                                                                                                                                    # /etc/init.d/drwebd restart

Also you can try  :

pgrep drwebd | xargs kill -9

/etc/init.d/drwebd restart

chrootkit installation

1. Login to your server as root. (SSH)

2. Down load the chkrootkit.

Type: wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz

3. Unpack the chkrootkit you just downloaded.

Type: tar xvzf chkrootkit.tar.gz

4. Change to new directory

Type: cd chkrootkit*

5. Compile chkrootkit

Type: make sense

6. Run chkrootkit

Type: ./chkrootkit

If it says “Checking `bindshell’… INFECTED (PORTS: 465)”

This is normal and it is NOT really a virus.

syslog failed to start

Issue: /etc/init.d/syslog not starting. (No error message while trying to start).
Fix: Just check the permission of ‘/sbin/syslogd’. It should be 755.
————————————————————————-
# chmod 755 /sbin/syslogd
# /etc/init.d/syslog start
Starting system logger:                                    [  OK  ]
Starting kernel logger:                                    [PASSED]
————————————————————————-

PHP ‘ioncube’ error – cannot restore segment prot after reloc: Permission denied

# php -v
Failed loading /usr/lib/php/ioncube/ioncube_loader_lin_5.3.so:  /usr/lib/php/ioncube/ioncube_loader_lin_5.3.so: cannot restore segment prot after reloc: Permission denied
PHP 5.3.17 (cli) (built: Sep 18 2012 13:05:41)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

Solution
—————–
Jest check the SELinux status.

#getenforce
Enforcing

If it is ‘Enforcing’ make it ‘Permissive’ by:

# setenforce 0

It will fix the ‘ioncube_loader’ error.

Note:
To permanently disable Selinux change “enforcing” to “disabled” in ”/etc/selinux/config” and reboot.

Create your own website, free on WordPress.com.Create your own website.
Start free