Questions tagged [redhat]
For issues relating to Red Hat platforms, products, and/or services.
3,900
questions
424
votes
12
answers
438k
views
Start ssh-agent on login [closed]
I have a site as a remote Git repo pulling from Bitbucket.com using an SSH alias. I can manually start the ssh-agent on my server but I have to do this every time I login via SSH.
I manually start ...
226
votes
6
answers
386k
views
How can I permanently export a variable in Linux?
I am running RHEL 6, and I have exported an environment variable like this:
export DISPLAY=:0
That variable is lost when the terminal is closed. How do I permanently add this so that this variable ...
188
votes
3
answers
159k
views
Determining the path that a yum package installed to [closed]
I've installed ffmpeg using yum under Redhat, and I'm having difficulty figuring out where (what path) it installed the package to. Is there an easy way of determining this without resorting to ...
113
votes
11
answers
83k
views
How can I randomize the lines in a file using standard tools on Red Hat Linux?
How can I randomize the lines in a file using standard tools on Red Hat Linux?
I don't have the shuf command, so I am looking for something like a perl or awk one-liner that accomplishes the same ...
98
votes
7
answers
126k
views
Yum crashed with Keyboard Interrupt error
I installed the newer version of python (3.2.3) than the one available in Fedora16 (python2.7)
And now yum stops working. It shows the following error.
[root@localhost yum-3.4.3]# yum
File "/usr/...
93
votes
5
answers
130k
views
How to get only the process ID for a specified process name on Linux?
How to get only the process ID for a specified process name on Linux?
ps -ef|grep java
test 31372 31265 0 13:41 pts/1 00:00:00 grep java
Based on the process id I will write some logic. So how do ...
83
votes
4
answers
202k
views
How to fix: fatal error: openssl/opensslv.h: No such file or directory in RedHat 7
I have RedHat Enterprise Linux Server 7, and I downloaded the linux kernel version 4.12.10 which I am trying to compile but when I execute the following command:
make modules
I get the following ...
79
votes
11
answers
133k
views
How to schedule to run first Sunday of every month
I am using Bash on RedHat. I need to schedule a cron job to run at at 9:00 AM on first Sunday of every month. How can I do this?
72
votes
15
answers
223k
views
Specify the from user when sending email using the mail command
Does anyone know how to change the from user when sending email using the mail command? I have looked through the man page and can not see how to do this.
We are running Redhat Linux 5.
65
votes
3
answers
82k
views
Linux free shows high memory usage but top does not
On RedHat Linux 6.2 I'm running free -m and it shows nearly all 8GB used
total used free shared buffers cached
Mem: 7989 7734 254 0 ...
65
votes
2
answers
60k
views
Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment
I downloaded Quokka Python/Flask CMS to a CentOS7 server. Everything works fine with command
sudo python3 manage.py runserver --host 0.0.0.0 --port 80
Then I create a file /etc/init.d/quokkacms. The ...
63
votes
3
answers
91k
views
docker compose: Error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted
After installing docker and docker-compose on:
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
When executing:
sudo docker-compose -version
It returns:
Error while loading shared ...
63
votes
2
answers
80k
views
CentOS through a VM - no URLs in mirrorlist [closed]
I am trying to run a CentOS 8 server through VirtualBox (6.1.30) (Vagrant), which worked just fine yesterday for me, but today I tried running a sudo yum update. I keep getting this error for some ...
56
votes
8
answers
52k
views
PIL /JPEG Library: "decoder jpeg not available"
I tried to use PIL to do some JPEG work in my django app with PIL but I'm getting this IOError.. not sure what to do.
""decoder jpeg not available""
Am I missing the JPEG decoder from my server? If ...
54
votes
7
answers
123k
views
How to install maven on redhat linux
Note: When originally posted I was trying to install maven2. Since the main answer is for maven3 I have updated the title. The rest of the question remains as it was originally posted.
I'm trying to ...
52
votes
5
answers
60k
views
Docker load and save: "archive/tar: invalid tar header"
I'm trying to import a Docker image into Docker on AWS Red Hat Linux (3.10.0-514.el7.x86_64) and am having problems with the error;
Error processing tar file(exit status 1): archive/tar: invalid tar ...
50
votes
8
answers
99k
views
install Docker CE 17.03 on RHEL7
Is it possible to install DockerCE in the specific version 17.03 on RHEL7 ?
There is information here:
https://docs.docker.com/engine/installation/linux/rhel/#install-using-the-repository about the ...
44
votes
8
answers
218k
views
MySQL config file location - redhat linux server [closed]
What is the default location for the MySQL configuration file on a redhat linux box?
42
votes
6
answers
96k
views
How do I clone an OpenLDAP database
I know this is more like a serverfault question than a stackoverflow question, but since serverfault isn't up yet, here I go:
I'm supposed to move an application from one redhat server to another, ...
41
votes
3
answers
15k
views
Cannot overwrite Symbolic Link RedHat Linux
I have created a symbolic link:
sudo ln -s /some/dir new_dir
Now I want to overwrite the symbolic link to point to a new location and it will not overwrite. I have tried:
sudo ln -f -s /other/dir ...
39
votes
11
answers
88k
views
Logrotate files with date in the file name
I am trying to configure logrotate in RHEL for tomcat6 logs. Currently, logrotate works fine for catalina.out log, it is rotated and compressed properly.
The problem is with the files with date in ...
38
votes
2
answers
2k
views
Segfault on declaring a variable of type vector<shared_ptr<int>>
Code
Here is the program that gives the segfault.
#include <iostream>
#include <vector>
#include <memory>
int main()
{
std::cout << "Hello World" << std::endl;
...
35
votes
2
answers
76k
views
python sys.exit not working in try [duplicate]
Python 2.7.5 (default, Feb 26 2014, 13:43:17)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>&...
33
votes
4
answers
189k
views
How to confirm RedHat Enterprise Linux version? [closed]
I am a bit confused by the fact that although I installed RHEL 5.1 from DVD (RedHat/5.1.x86_64), when I issue command:
cat /etc/redhat-release
I got:
Red Hat Enterprise Linux Server release 5.5 (...
32
votes
2
answers
30k
views
How to install ps in redhat ubi8/ubi-minimal
For registry.access.redhat.com/ubi8/ubi-minimal this image, i need ps utility to be installed. There is no yum package manager available in the image. Instead , we have microdnf.
microdnf install ...
31
votes
2
answers
42k
views
How to reduce the size of RHEL/Centos/Fedora Docker image
The base image from Red Hat is quite small, on the order of 196M for RHEL 7.4. However it tends to be missing a lot of the bits and pieces that are required by the products I want to build new images ...
31
votes
4
answers
81k
views
import self signed certificate in redhat
How can I import a self-signed certificate in Red-Hat Linux.
I'm not an expert with respect to certificates and find it difficult to find the right answer through googling, since I don't know the ...
30
votes
12
answers
94k
views
jps not working
I have installed java-1.6.0-openjdk-devel.
$java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (rhel-1.48.1.11.3.el6_2-x86_64)
OpenJDK 64-Bit Server VM (build 20....
30
votes
9
answers
95k
views
Change JENKINS_HOME on Red Hat Linux?
I used this procedure to install Jenkins:
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+RedHat+distributions
After it was up and running I discovered the /var/lib/jenkins ...
30
votes
2
answers
145k
views
TCP: Server sends [RST, ACK] immediately after receiving [SYN] from Client
Host_A tries to send some data to Host_B over TCP. Host_B is listening on port 8181. Both Host_A & Host_B are Linux boxes (Red Hat Enterprise). The TCP layer is implemented using Java NIO API.
...
29
votes
10
answers
98k
views
How to change the mysql root password
I have installed MySQL server 5 on redhat linux. I can't login as root so I can't change the root password.
mysql -u root -p
Enter password: <blank>
ERROR 1045 (28000): Access denied for ...
26
votes
6
answers
39k
views
Symfony is linked to the wrong PHP version
I'm trying to move my Project to a linux redhat server that uses Apache but the problem I'm facing there is that this Server has 2 different PHP versions installed.
Symfony (2.5.12) seems to look for ...
26
votes
1
answer
113k
views
No implicit conversion of String into Integer (TypeError)?
I'm trying to write a script that will get a system ID from Red Hat Satellite/Spacewalk, which uses XMLRPC. I'm trying to get the ID which is the first value when using the XMLRPC client using the ...
26
votes
5
answers
26k
views
Building OpenLDAP from sources and missing BerkelyDB [closed]
I'm building OpenLDAP on a RHEL 5; I used instructions found at http://www.linux.com/archive/feature/113607.
All went well, until running './configure' for OpenLDAP - the following error was recorded:...
26
votes
5
answers
19k
views
PHP is_writable() function always returns false for a writable directory
I'm trying to install a PHP-based software package in a Red Hat 7 Amazon EC2 instance (ami-8cff51fb) that has had Apache 2.4.6 and PHP 5.4.16 installed on it using yum. The installation fails because ...
25
votes
4
answers
35k
views
How to fix ModuleNotFoundError: No module named 'pip._internal' with python source code installation [duplicate]
I have installed python3.7 on redhat machine by compiling source code but I have a problem when dealing with pip3. I have made this steps after installation:
sudo ln /usr/local/bin/python3.7 /usr/bin/...
25
votes
2
answers
25k
views
What's the difference between rpm and yum? [closed]
Is there any difference between rpm and yum? I know the recent system prefer yum, but want to know if there is need for rpm also.
25
votes
1
answer
22k
views
What is the Difference between ConditionPathExists= and ConditionPathExists=| in systemd?
I need check a file not exist before i start my service in Systemd. I see two case in [Unit]:
ConditionPathExists=!/tmp/abc
and
ConditionPathExists=|!/tmp/abc
are they the same? Can anybody help ...
24
votes
5
answers
19k
views
How to set the rpmbuild destination folder
I noticed rpmbuild (-bb and --buildroot options) creates the .rpm in different locations depending of what OS are you using:
GNU/Linux Ubuntu <= 9.04: /usr/src/rpm/...
GNU/Linux Ubuntu >= 9.10: /...
24
votes
2
answers
23k
views
Have you ever got this message when moving a file? mv: will not overwrite just-created
I have a bourne shell script which performs several tasks. One of these tasks is to move some files to certain directory. Today, when I ran the script I got the following message:
mv: will not ...
24
votes
1
answer
10k
views
How to configure Django on OpenShift? [closed]
I recently tried to export a Django project on OpenShift, but fruitlessly. The only solutions I found were "prebuilt" ones (such as https://github.com/openshift/django-example).
I spent some hours ...
23
votes
3
answers
23k
views
LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav
When I tried to Scan the /home directory I got this error.
[root@ip-172-31-34-67 ~]# clamscan /home
LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav
ERROR: Can't ...
23
votes
6
answers
110k
views
How to find whether MySQL is installed in Red Hat?
I am currently using Red Hat linux. I just want to find out whether MySQL is installed in that system. If yes where is it located? can anyone help please...
22
votes
5
answers
19k
views
How to compile python3 on RHEL with SSL? SSL cannot be imported
I'm trying to compile python on RHEL because my current python is using an old 1.0.2k ssl version.
(test_env) [brad@reason tlscheck]$ python3 --version
Python 3.9.3
(test_env) [brad@reason tlscheck]$ ...
22
votes
4
answers
51k
views
Export all users from KeyCloak
I have a specific use case in which we want to ask Keycloak for all the users and the groups and roles for each user, on a daily basis. For reconciliation purposes with other internal systems.
...
22
votes
3
answers
15k
views
Permanently enable RHEL scl
Is there a way to permanently enable custom Software Collections for RedHat?
I have installed an scl to provide python27 in RHEL6 and don't want to have to enable the custom scl every time.
22
votes
5
answers
2k
views
JTextField Issues with Numpad
I've recently run into a strange issue with the Java JTextField. When I run the following code (see below), typing a "0" into the text field first sends a paste action, then types "0". For example, ...
21
votes
2
answers
49k
views
On Linux - set maximum open files to unlimited. Possible?
Is it possible to set the maximum number of open files to some "infinite" value or must it be a number?
I had a requirement to set the descriptor limit for a daemon user to be "unlimited" and I'm ...
21
votes
3
answers
40k
views
rpmbuild Installed (but unpackaged) files source
I'm trying to build an RPM from binaries on a REDHAT 6 system. I have all the files included in the %files section (find /path/to/fake/install -type f >> specfile)
When I run rpmbuild -bb ...
21
votes
2
answers
19k
views
Systemd: Using both After and Requires
I have a service foo.service which depends on service bar.service. I need to make sure that bar.service is started before foo.service and that bar.service launched successfully.
From this source it ...