New answers tagged

4

So the "correct" way to set the clock (at least prior to RHEL 7) is to edit /etc/sysconfig/clock and then run tzdata-update which will then update /etc/localtime; you've just done that step manually.


6

With the introduction of RHEL 7 the timezone is managed through systemd, which provides a custom utility to change the timezone: timedatectl To list all available time zones: timedatectl list-timezones To actually change the time zone, (as root or using sudo): timedatectl set-timezone time_zone timedatectl set-timezone will not only make the modified ...


0

I poked at the image a bit more and noticed that the perl executables were both 0 kb. I have no idea how that happened, but I'm willing to blame several of my failed tests and reboots. For future reference, and for folks who want full control of packages from the ISO, this should get you up and running. This will also create a working template without ...


1

Create a custom fact that tests the presence of the file on the host and use that to conditionally include the class. generate only runs on the master, it's not invoked on each agent.


-1

It's in the old EPEL 6 repo list here. Install with: rpm -ivh https://dl.fedoraproject.org/pub/epel/6/x86_64/stress-1.0.4-4.el6.x86_64.rpm


1

I have solved my own problem. In essence, you can set variable according to os_family, but you have to do it correctly. See my fixed playbook below: --- - name: Set fact for Debian set_fact: destination: "/etc/nagios/nrpe.d/" nrpe_server: "nagios-nrpe-server" when: ansible_os_family == "Debian" - name: Set fact for RedHat set_fact: ...


3

To grow a XFS filesystem to use the space allocated to it after resizing the volume xfs_growfs /mount/point e.g. xfs_growfs /data/www


2

LVM will only show space that has been formatted for LVM by using pvcreate. Here, it doesn't seem you even have a partition. 1) First you need to create the partition (sda3 I suppose), using your favorite partitioning tool. Assign the LVM tag to the partition. Then, assuming that your 121GB partition is /dev/sda3, you need to run pvcreate /dev/sda3 to get ...


1

With SELinux the filesystem has extra "permissions" above and beyond the regular UNIX ones. If you were to run ls -Z ... (-Z is an SELinux extension to ls(1)) on files under /var/www/html across both machines I suspect you will see the following: On server A: drwxr-xr-x root root system_u:object_r:httpd_sys_content_t /var/www/html/ On server B: drwxr-xr-...


1

The previous answer should work but thought i'd mention 'Yum-utils' can make this simpler Check what kernels are installed with: rpm -q kernel install yum utils: yum install yum-utils Package cleanup where count is how many kernels you want to retain: package-cleanup --oldkernels --count=2


0

I think your plan is overly complicated. The files you're suggesting to remove in step 2 are likely all owned by the relevant kernel package anyway. On my test RHEL 6 machine: $ rpm -qf /boot/initramfs-2.6.32-573.18.1.el6.x86_64.img kernel-2.6.32-573.18.1.el6.x86_64 etc. So step 1 should remove everything. As for what to remove, rpm -qa kernel\* will ...


0

I realize this is an old question, but just last week had a similar problem with savscand after an update was performed by Rackspace on a server running Centos 6.7. When downloading XML files to the server from another server, and more so while reading the XML, savscand would spike the CPU. One particular regular daily update that previously only took 30 ...


0

Can you provide more details about the server? Is this a dedicated box, virtualized container? If it's virtualized there may be issues using kdump if the kernel is outside the container.


1

In my experience, I've had to qualify the domain of the group in /etc/sudoers So my sudoers declaration would look more like this: %adgroup@domain.local ALL = (root) ALL Since you've got spaces in the group name, something like: %it\ -\ shared\ services@domain.local ALL = (root) ALL


0

After some research, it seems the most secure and effective solution is to run Apache, limit Jenkins to listen to localhost only, and do a redirect through HTTPD.


-1

There is great flexibility in every Linux distro in general to execute scripts, code or other programs in initialization scripts, configuration files (via an include), etc..., just as long as the script, config file or whatever you use is in a security context that allows that. Depending on what your code needs to acomplish, you might need to run it after a ...


0

Adding the commands at the end of /etc/rc.local still seems to work as well. (Make sure that it is executable, though.)


0

Another idea would be to mount the drive using cifs https://access.redhat.com/solutions/448263 You can test it using this: mount -t cifs -o username=<share user>,password=<share password>,domain=example.com //WIN_PC_IP/<share name> /mnt You can add this to the /etc/fstab to make it mount on boot: //WIN_PC_IP/<share name> /<...


0

You could probably use smbclient with credentials to copy the files, redirecting commands into it. It has a lot of similar syntax to ftp. man smbclient to get a manpage (or search on your favorite search engine). Something like, maybe: echo 'cp /var/log/audit/audit* \some\windows\dir'|smbclient //host/share -A mycredentials.txt The documentation also ...


1

create repo file From RHEL Deployment Guide: The following is a bare-minimum example of the form a [repository] section takes: [repository] name=repository_name baseurl=repository_url So pick a name for your repo and replace repository_name with that. Hopefully you've configured a web server like apache or nginx to serve your repo. Replace ...


0

Turned out to be a SELinux Permission issue with the apache user under RedHat 7.2. I created another user and added a bash script to execute the git fetch and checkout. I also modified my sudoers file to allow apache to run the bash script as the newly created user.


0

Ok, the "easy" way is to implement one's own package-provider. Fortunately, one can inherit everything from the existing gem-provider overriding only the gem-command itself. Because SCL's rh-ruby22 is so retarded, you can't even invoke its ruby or gem directly -- without setting LD_LIBRARY_PATH first -- we create wrappers for them in /usr/bin. The /usr/bin/...


0

Solved my own problem... @Iain and @kamihack from the comments were right, it is not SELinux problem. As I have mentioned in my own comments before, my servers are running in a virtual environment. After I finished setting up my first server, the server is then cloned to multiple servers. I realized the provider actually typed the server name as the name ...


0

I restored the rhui-load-balancers.conf file and that resolve the issue. yum.repos.d/rhui-load-balancers.conf rhui2-cds01.us-east-1.aws.ce.redhat.com rhui2-cds02.us-east-1.aws.ce.redhat.com


0

I had some help and they found that the passwd file didn't have brackets like the main.cf file did around the smtp.gmail.com so I changed that and remapped with postmap, then it gave me a different error that mentioned no worthy mechanism available, so I did a google search and found someone else had the same error and just installed cyrus-sasl-plain and ...


6

Using reboot is safer. Using reboot your intent is clear and there is no way to mistype it for something else like shutdown -t now which could leads to a few headache if you are using on a remote server with limited control.


0

I've answered this sort of question before (hint: search my previous answers; I'm on a mobile currently), but the problem you are likely facing is that an init script will not be shutdown if a the lock file has not been created (/var/lock/subsys/mything). You can create this yourself for testing purposes, but the catch is you'll need to have this script run ...


-3

you need to change the permissions: chmod +x test.sh


0

This is happening not only for LD_LIBRARY_PATH but a few other environment variables that could temper with your build environment. In my case, sudo has become: sudo -HE env PATH=${PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} PYTHONPATH=${PYTHONPATH} my_command


0

Edge case - if you rm /var/log/audit/audit.log, auditd is not smart enough to create a new file. If you touch /var/log/audit/audit.log, auditd is not smart enough to write to the new file you just created. You have to restart the auditd service to get your logging working again.


2

Check that you have formatted /etc/postfix/sasl/passwd correctly. It should appear as: smtp.gmail.com user@gmail.com:password_or_app_password After setting this file, you need to run postmap on it, to update the hash. postmap /etc/postfix/sasl/passwd Then reload postfix. systemctl reload postfix


79

Shutdown is preferable because it allows you to specify the reason for the drastic action -- something you should always do. The message will be recorded in the log(s) for posterity. For example: shutdown -r now 'Kernel upgrade requires reboot' You can also perform a scheduled reboot -- by specifying something other than now as the reboot time: shutdown -...


14

If you take a look, in RHEL 7 both /sbin/shutdown and /sbin/reboot are actually just symlinks to systemd's systemctl command. So, use whatever you want. No functional difference as ewwhite told, not even in earlier RHEL releases which did not yet use systemd.


43

For Red Hat systems, there is no functional difference between reboot and shutdown -r now. Do whatever is easier for you.


2

It seems that you want the exit value from the remote script ( $?) and not stdout (the scripts output as per your title) The ssh man page says this ssh exits with the exit status of the remote command or with 255 if an error occurred. So if your script is working correctly it will return 100. If it's not then there are a few possibilities command ...


0

Actually i'm using tomcat 7.0.70 with jdk6 on a centos 6.8 I followed the update wrote by marplesoft about the presence on gitub of a specfile, here: https://github.com/bdwyertech/rpm-tomcat7 A small modification to the "version" field of specfile, to use tomcat 7.0.70, and then the installation went smootly. Actually tomcat is up, but there are no ...


3

/etc/environment doesn't perform variable expansion. Thus, your PATH is now literally {JAVA_HOME}/bin:{JRE_HOME}/bin:{M2}:{PATH}, which won't work of course. If you use bash only, you might want to look into setting $BASH_ENV in /etc/environment like so: BASH_ENV=/etc/non-inter-test where /etc/non-inter-test is then read and executed by non-interactive ...


0

To see a list of all "master alternative names": update-alternatives --get-selections --get-selections list master alternative names and their status. And for each of those listed, you can run --list $ALTERNATIVE_NAME, e.g. update-alternatives --list editor --list name Display all targets of the link group. If you would like to see a list of ...


0

I suggest to try the simple du command without any switches. You will eventually see which directory is slowing down the process. Might be a faulty disk, or some other reason, ...



Top 50 recent answers are included