Hot answers tagged

4

When you connect to a remote by ssh -X this automatically sets up a reverse channel, over the same connection, to your originating display. It uses the first free port starting from 6010 and initialises DISPLAY to this minus 6000. If you are getting localhost:11.0 then probably someone else has already connected and taken that port, so you get the next one. ...


3

You mention RHEL in your tags, so I assume this is what you're using. With RHEL 6 and earlier, when you upgrade the tzdata package then it triggers tzdata-update. This reads /etc/sysconfig/clock for the ZONE variable, and will update /etc/localtime as necessary. What this means is that if you change what /etc/localtime is then you must change /etc/...


2

You're only using around 7.4GB on / and have 79GB free in LVM so, yes, you can create a new LV for / (and another one for /var) and copy the files from / and /var to them. I recommend using rsync for the copies. e.g. with the new / and /var mounted as /target and /target/var: rsync --archive --sparse --one-file-system --delete-during --delete-excluded \ ...


2

A "temporary" label change is done via the chcon command: bash-4.2# touch freetds.conf.new bash-4.2# ls -lZ freetds.conf.new -rw-r--r--. root root unconfined_u:object_r:etc_t:s0 freetds.conf.new bash-4.2# chcon -t etc_t -u system_u freetds.conf.new bash-4.2# ls -lZ freetds.conf.new -rw-r--r--. root root system_u:object_r:etc_t:s0 freetds.conf.new ...


2

This depends if you are using RHN Classic or the newer Red Hat Customer Portal Subscription Management/RHSM. RHN Classic utilized a plugin for YUM, there was a /etc/yum.repos.d/redhat.repo file but it was auto-generated. The newer Subscription Management/RHSM does use the file /etc/yum.repos.d/redhat.repo and it populated similar to normal YUM repos, an ...


2

I haven't used RHEL in quite some time, so I can't answer how it's done these days. But if I recall correctly, on RHEL 6, when you subscribed to a channel, no file was created in /etc/yum.repos.d/. Instead, there was a plugin for yum to connect to RHN, and that plugin knew which channels you had subscribed to, and told Yum how to use those channels as ...


2

To resolve the error message, you may need to install sudo using the steps below. Alternatively, you could run the command after logging in with the root account using su -. To install sudo: Log in with the root account using su -. Then, yum install sudo. After that is installed, add the user's account to the /etc/sudoers file. After the following ...


1

You should expand the Linux LVM partition /dev/sda2 for example with gparted and the resize the physical volume with "pvresize /dev/sda2". After that you should be able to use the additional space. Alternatively (this is more safer IMHO) you can create another Linux LVM partition on the free disk space, then create an additional Physical Volume and add it to ...


1

According to an article in RHEL knowlegde base, /var/log/boot.log was populated from v5.0 to 5.2 only. Later versions stopped doing that (for a reason unknown to my common sense...). The article contains an rc-bootlog.txt patch to apply to /etc/rc.d/rc with command patch -bp0 <rc-bootlog.txt I applied that patch and boot.log now contains the expected ...


1

You can do something like, 0 0 * * 5 /usr/bin/python /var/scripts/PLW.pl && /bin/bash /path/to/run_once.bash Note : && /bin/bash /path/to/run_once.bash will only run if previous command run successfully. So instead of using exit code, you can use &&'s inbuilt functionality.


1

[root@SERVER6B ~]# umount /var/FOODump [root@SERVER6B ~]# nfsidmap -c [root@SERVER6B ~]# mount /var/FOODump solved the issue..


1

The rules in /etc/sysconfig/iptables are loaded when the iptables service is started. Since your firewall chains appear empty, there's probably nothing in there. Do not that there could rules set like the nat and raw tables. If you change the rules directly in /etc/sysconfig/iptables, you need to restart the iptables service and inversely if you add rules ...


1

kernel core file are created upon a kernel panic. That is some code in kernel goes wrong (common faults are a division by 0 and index out of bound in an array). User space program will generate core on same condition. However, not all reboot will generate core. If you can afford to reboot your host, you might try echo b > /proc/sysrq-trigger this ...


1

try rename -n 's/Centrum.text.(.*)/Centrum.$1.text/' Cen* for a preview s/Centrum.text.(.*)/Centrum.$1.text/ instruct to replace (moving en pattern inside) then rename 's/Centrum.text.(.*)/Centrum.$1.text/' Cen* Edit: if you don't have rename, and from directory containing files ls -1 | awk -F. '/Centrum/ {printf "mv %s.%s.%s %s.%s.%s\n",$1,$2,$...


1

Just run your whole install script under setarch $ setarch $(uname -m) --uname-2.6 /path/to/install/script.sh Everything called in that script onwards will think you're running a 2.6 kernel.


1

The error you see is not caused by applying samba_share_t context on /common directory. You can still try restorecon -R /common, and check selinux context is indeed changed. I believe the error originates from previous configurations.


1

Not really. In theory you could add a program to the %pre pre-install section. If this returns a non-zero exit code then install fails. However a user could always do an install with --no-script. And even if such enforcement was possible, an rpm is really a wrappered cpio file; a user could do rpm2cpio to convert it and then extract the files directly. ...


1

There is a migration guide in the CentOs wiki https://wiki.centos.org/HowTos/MigrationGuide it has a section on Migrate an existing system from RHEL6 or SL6 to CentOS 6 I hope this helps



Only top voted, non community-wiki answers of a minimum length are eligible