CentOS is a Linux distribution standing for "Community ENTerprise Operating System" and is a rebuild of "Red Hat Enterprise Linux" (RHEL), belonging to the same company that distributes RHEL (Red Hat, Inc.). The "CentOS7" tag refers to versions 7.x-xxxx of CentOS, working only on 64-bit hardware. Maintenance updates for CentOS/RHEL 7 will stop on June 30, 2024, with full updates ceasing in winter of 2019.
Questions tagged [centos7]
2960 questions
9
votes
2 answers
Wait for systemd oneshot service to finish
I am doing some server provisioning and I need to run a script AFTER installation as it requires the system to be fully functional, include services. So I cannot put it inside the %post section of my kickstart file.
Instead I have created a systemd…

Christoffer Reijer
- 417
- 1
- 4
- 16
9
votes
5 answers
Where does the bash PATH on CentOS 7 get /usr/local/bin from?
I've just spun up a brand new CentOS 7 VM (bash version 4.2.46) with Vagrant using the centos/7 box, and when I'm logged in as the vagrant user, this is my…

Iain Hallam
- 447
- 2
- 6
- 22
9
votes
1 answer
Digital Ocean CentOS7 server, unable to --skip-grant-tables or restart mysql
I set up a Digital Ocean droplet (server) a few days ago and need to access mysql. No password for root is working amongst what I've tried. However this command:
service mysql[d] stop
Doesn't work. Apparently I am supposed to issue this…

Oliver Williams
- 286
- 1
- 3
- 13
9
votes
0 answers
Recovering from a rm -rf /
Edit: This is a hoax.
I run a small hosting provider with more or less 1535 customers and I use Ansible to automate some operations to be run on all servers. Last night I accidentally ran, on all servers, a Bash script with a rm -rf {foo}/{bar} with…

Marco Marsala
- 471
- 3
- 7
- 14
9
votes
1 answer
Tomcat service does not see $JAVA_HOME
I'm trying to setup a Tomcat service with Systemd on CentOS 7.
I've installed Oracle Java 1.8u74 to /usr/java/jdk1.8.0_74 and set the environment variable $JAVA_HOME at boot like so:
# echo "export JAVA_HOME=/usr/java/jdk1.8.0_74" >…

isapir
- 233
- 1
- 2
- 9
9
votes
4 answers
Centos 7/1503 -- Getting Error setting up base repository during installation
I've created bootable USB flash drive using recommended LiveUSB Creator using CentOS-7-x86_64-Everything-1503-01.iso.
Now being at Installation Summary screen I'm getting Error setting up base repository. When I click on Verify at Installation…

daneel
- 95
- 1
- 1
- 5
9
votes
5 answers
Disable THP and THP defrag on CentOS 7 EC2 instance
I want to disable transparent_hugepage (THP) on a CentOS 7 EC2 instance, which is enabled by default:
# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never
# cat /sys/kernel/mm/transparent_hugepage/defrag
[always] madvise…

vcarel
- 434
- 4
- 13
9
votes
1 answer
Change apache mpm to mpm-itk for CentOS7
I'm trying to run the mpm-itk module on CentOS.
Unfortunately, that requires apache 2.4.7 while the current version on centos is 2.4.6, so compiling the module is out of the picture.
Alternatively, centos now offers the httpd-itk package which…

sdragnev
- 211
- 2
- 3
- 6
9
votes
1 answer
selinux is preventing from execute access on the file centos
I want to launch the Tomcat service on CentOS with the cmdlet :
systemctl start tomcat.service
but i get the error
Failed to start Apache ExecStart=/opt/tomcat/bin/startup.sh
(code=exited, status=203/EXEC).
and the log through the command …

welwelwel
- 99
- 1
- 1
- 7
8
votes
5 answers
How can I get latest version of nano (4.5) on CentOS 7?
The latest version of the nano editor is 4.5 (https://www.nano-editor.org/)... I'm running 2.3.1 on my CentOS 7 server and want to upgrade. But no repos (EPEL, Remi, etc.) seem to have anything newer than 2.3.
How can I get the latest nano? Do I…

Eric
- 1,127
- 3
- 13
- 24
8
votes
1 answer
Linux self recovering DHCP after really long downtime?
I have a few CentOS 6/7 systems (non-production, experimental purposes) that have been configured to use DHCP for their IP address. Last week there was a big network disruption and I found that those systems had lost their IP address and the DHCP…

Niels Basjes
- 2,196
- 3
- 19
- 26
8
votes
6 answers
How can I watch a terminal window remotely?
I left the office earlier with an active terminal window running a script on a Centos 7 server. Now I've SSHing in from home and I want to see where it's got to. Is this possible? Can I rejoin the same terminal window from here?

it's a hire car baby
- 249
- 2
- 7
8
votes
1 answer
Creating multiple Apache instances on CentOS 7 SystemD
I am trying to create a duplicate httpd service in systemd on CentOS 7 (why? see bottom)
This is what I have done so far:
#Copy all the files
cp -pr /etc/httpd /etc/httpd-bobby
cp /usr/lib/systemd/system/httpd.service…

Richard of Essex
- 91
- 2
- 5
8
votes
2 answers
CentOS 7 Generic Cloud login?
I have an OpenStack cloud and added the CentOS-7-x86_64-GenericCloud-1503 image and it boots just fine, but I do not know how to login. What is the root password? How can I set it? Is there some other account I need to use?
Thanks

Red Cricket
- 470
- 2
- 8
- 21
8
votes
1 answer
"Netconsole Module Not Loaded" When Trying To Check All Services
I have a fairly new server build and I'm trying to list all the services. Checking the status of any one works fine, but running service --status-all gives the error:
netconsole module not loaded
Configured devices:
lo eno16777736
Currently…

Gary
- 267
- 2
- 4
- 10