FAQ Database Discussion Community


Data destroy using shred agains ext4 filesystem [closed]

linux,rhel,ext4,journal,shred
I'm running shred against blockdevice with couple of etx4 filesystems on it. The blockdevices are virtual drives - RAID-1 and RAID-5. Controller is PERC H710P. command shred -v /dev/sda; shred -v /dev/sdc ... I can understand from shred man(info) page that shred might be no effective on journal filesystems but...

Can I have a RPM depend on a directory?

linux,dependency-management,rpm,rhel,rpmbuild
I'm creating an RPM file (with rpmbuild) whose post-install script will create a file in /etc/X11/xinit/xinitrc.d/. To make sure that the directory already exists, I'd like to specify a dependency on a package which creates it. Is it correct in this case to add a Requires: /etc/X11/xinit/xinitrc.d line to the...

'pecl install ibm_db2' can't find library

linux,db2,rhel,pecl
I'm trying to install ibm_db2 through pecl: pecl install ibm_db2 Then when it asks for an install dir, I have tried various places only to have the same result. It goes through a bunch of checks etc., then tries to 'make' and gets an error: /usr/bin/ld: skipping incompatible /home/db2inst1/sqllib/lib32//libdb2.so when...

Will application built on RHEL6.4 be able to run on Centos 6.4 unupdatedly

centos,rhel
I learn that RHEL and Centos has the exact same source code. So my question here is if one application built for RHEL 6.4, could we just install and make it running on Centos 6.4 without any update? And another question is RHEL and Centos will always use the same...

RHEL - can't sudo from script

linux,rhel
I have a script where I'm trying to change user (from root) on boot. In /etc/rc.d/rc.local, I've changed it to cd into the script dir and execute it. It all works except for when it tries to execute: sudo -u newuser ./myscript.sh I get an error message: sorry, you must...

python socket.recv hangs, however I see the frame in tcpdump

python,sockets,rhel
I have below code to send command, but python script never exits. it hangs. i am using RHEL 6.4 x86_64. scapy srp1 also hangs. from socket import * from scapy.all import * from myproto import * def sendeth(REQUEST, interface = "eth0"): """Send raw Ethernet packet on interface.""" s = socket.socket(socket.AF_PACKET,...

How to prevent parallel installation of multiple version of an RPM?

linux,centos,rpm,rhel,rpmbuild
I'm creating an RPM file (with rpmbuild). Currently it is possible to install several versions of the RPM in parallel (apparently RPM doesn't prevent this), but this causes problems because my %pre and %post scripts create and delete some files, so multiple parallel installations will conflict with each other. Is...

RHEL Java application - specific name instead of generic java process

java,linux,process,rhel
I have a custom Java application running on my RHEL machine. I am running this Java application from a bash exec script with all the parameters and options appended. As a result, my Java application gets a generic name "java" in the system processes which is not useful for me...

Use `grub-md5-crypt` in a script where user is prompted for password to encrypt

scripting,rhel,grub
As you already know from title, I want to configure an encrypted password for grub in /etc/grub.conf. I want to use a single script, where I will use grub-md5-crypt, enter my password that I want to encrypt, and sed that encrypted output in /etc/grub.conf. Second part is fine for me....

How to use mock with epel-7

fedora,rhel,chroot,epel
I have been trying to create a chroot for epel-7 using mock. Following this link: http://miroslav.suchy.cz/blog/archives/2015/05/20/why_mock_does_not_work_on_el_6_and_el7_and_how_to_fix_it/index.html I changed my .cfg file. Now when I tr to create chroot, I get the following error: sudo ./create_chroot.sh epel-7 INFO: mock.py version 1.2.8 starting (python version = 2.7.8)... Start: init plugins INFO: selinux...

removing part of the file names

linux,bash,perl,redhat,rhel
I have a bunch of files like this: file123.txt.452 file456.txt.098 file789.txt.078 How can I remove the second dot and the numbers at the end from the file names? I tried using rename but I don't think my regex is correct: rename 's/txt.*/txt/' * ...

Unable to start postgresql service in Redhat linux 7

postgresql,rhel
I have installed postgresql 9.4 on Redhat 7 server.It was installed through postgresql-9.4.3-1-linux-x64.run. It displayed a clear message"postgres is installed your machine". Now when I login as su - postgres It doesn't ask for password and goes to bash prompt. If I type psql displays "command not found". When I...

Moved Oracle 11.2 XE Database Directory, Connected to Idle Instance

database,oracle,oracle11g,listener,rhel
So I will start off by stating I have moved the regular install location of Oracle 11.2 XE to a logical volume (/oracle) I had created on my RHEL 6.6 server. After shutting down both the database and the Oracle listener, I performed... $ cp -R /u01/app/* /oracle $ rm...

IF statement not working in RHEL 6 (workd in RHEL 5)

regex,bash,if-statement,rhel
I have a simple if statement that works fine in RHEL 5, but for some inexplicable reason, fails in RHEL 6: if [[ ! $1 =~ "(one|two|three)" ]] ; then echo -e "\n***Invalid number" usage exit 1 else action=$1 fi I can use a case statement which works fine or...

puppet detect if a file changed but don't change it

jenkins,puppet,rhel
I want to manage the config.xml file of the jenkins-service with puppet. The problem is that if Puppet changes the config.xml file and than restarts the jenkins service, the config.xml file gets overwritten by the currently loaded configuration of jenkins and the changes made by puppet are lost. That's what...

RHEL + Codeception: invalid mit-magic-cookie-1 keyerror cannot open display :2.0

linux,firefox,selenium,rhel,codeception
So I'm trying to run Codeception acceptance tests on a Linux server (with Selenium). I enter the command: ./codecept run acceptance (with flags such as --env firefox-linux) Codeception starts, pauses for a bit and then Firefox throws this error: Invalid MIT-MAGIC-COOKIE-1 keyError: cannot open display: :2.0 I read that this...

While loop in bash using variable from txt file

linux,bash,rhel
I am new to bash and writing a script to read variables that is stored on each line of a text file (there are thousands of these variables). So I tried to write a script that would read the lines and automatically output the solution to the screen and save...