Questions tagged [centos7]

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.

Filter by
Sorted by
Tagged with
75
votes
2answers
173k views

How to open port for a specific IP address with firewall-cmd on CentOS? [duplicate]

I would like to open port 4567 for the IP address 1.2.3.4 with the firewall-cmd command on a CentOS 7.1 server. How can I achieve this, as the documentation I could find was too specific on this?
69
votes
6answers
227k views

Centos 7 save iptables settings

Problem: iptables resets to default settings after server reboot. I'm trying to set rule like this: iptables -I INPUT -p tcp --dport 3000 -j ACCEPT after that I do: service iptables save and it ...
52
votes
2answers
36k views

Create a directory under /var/run at boot

I had a daemon that needed its own dir in /var/run for its PID file with write permission granted to the daemon's user. I found I could create this dir with these commands: # mkdir /var/run/mydaemon ...
42
votes
4answers
19k views

I updated my CentOS 7 system. Why is Meltdown/Spectre only partially mitigated?

Like many of us, I spent yesterday updating a whole lot of systems to mitigate the Meltdown and Spectre attacks. As I understand it, it is necessary to install two packages and reboot: kernel-3.10.0-...
37
votes
5answers
73k views

How to shrink /home and add more space on CentOS7

CentOS 7 file system is XFS, And resize2fs doesn't work. I need to shrink /home to 400G and add 100G space to /. What should I do? # df -h Filesystem Size Used Avail Use% Mounted on /...
31
votes
6answers
56k views

Install a newer version of Git on CentOS 7

I like to enable Git "Push to Deploy" on my CentOS 7 server. Currently I only can get Git 1.8.3.1 via yum. I need a newer version. Do I have to build it from source or is there any repo I can use? I ...
29
votes
3answers
103k views

Authentication is required to manage system services or units.

I have a strange issue whenever trying to stop/start a daemon as a regular user, it asks to authenticate with the credentials of another regular user - for example: [bob@server ~]$ systemctl stop ...
26
votes
4answers
125k views

Centos 7 Extend partition with unallocated space

I have centos 7 server (CentOS Linux release 7.3.1611 (Core)) When I was updated my server I saw error you need extra space. But I had 20GB disk on server when I check disk spaces I saw only 4.5GB ...
23
votes
3answers
53k views

How to manage DNS in NetworkManager via console (nmcli)?

I have CentOS 7.2 (guest in VirtualBox, vagrant box centos/7, no GUI). I see there is a nameserver in file: $ cat /etc/resolv.conf # Generated by NetworkManager nameserver 10.0.2.3 But how to add ...
21
votes
2answers
81k views

Proper way to deal with corrupt XFS filesystems

I recently had an XFS filesystem become corrupt due to a powerfail. (CentOS 7 system). The system wouldn't boot properly. I booted from a rescue cd and tried xfs_repair, it told me to mount the ...
20
votes
1answer
22k views

php script can't access /tmp folder

I have no open_basedir, php can access /etc /usr /proc /home etc… but not /tmp. tmpfs is mount on /tmp (/tmp type tmpfs (rw)) That's also the reason I want to use the /tmp folder. My files are owned ...
18
votes
1answer
3k views

Getting Squid and TPROXY with IPv6 working on CentOS 7

I'm having trouble getting TPROXY working with Squid and IPv6 on a CentOS 7 server. I was previously using a generic intercept setup with NAT, but it was limited to IPv4 only. I'm now expanding the ...
17
votes
2answers
23k views

long delay when logging in with CentOS7

I have a CentOS 7 system and when I login with putty or ssh there is a long delay before I get the password prompt. I ran ssh -v and I found that it gets up to this: debug1: ssh_ecdsa_verify: ...
17
votes
1answer
44k views

Confused about DFOREGROUND with Apache

So I just installed Apache on a new CentOS 7 server, using Yum. I've installed Apache many times before, but never have I seen this: When I run ps aux now, it always shows /usr/sbin/httpd -...
17
votes
3answers
13k views

How do I update a system from CentOS 7 to CentOS 8?

Assuming that reinstalling from zero is not practical, how do I perform an update from CentOS 7 to CentOS 8? I tried to do a yum install http://mirror.bytemark.co.uk/centos/8/BaseOS/x86_64/os/...
16
votes
4answers
6k views

Low-end hardware RAID vs Software RAID [closed]

I want to build a low-end 6TB RAID 1 archive, on an old pc. MB: Intel d2500hn 64bit CPU: Intel Atom D2500 RAM: 4GB DDR3 533 MHz PSU: Chinese 500W NO GPU 1x Ethernet 1Gbps 2x SATA2 ports 1x PCI port ...
16
votes
2answers
142k views

Could not resolve host: mirrorlist.centos.org Centos 7

I have a fresh install of latest centos 7 [root@localhost ~]# cat /etc/centos-release CentOS Linux release 7.4.1708 (Core) [root@localhost ~]# I wanted to install something and wget was not ...
15
votes
3answers
104k views

How to remove access to a port using firewall on Centos7?

Had a port opened up to for public use using firewall-cmd, I wanted to limit this port to a specific IP which I found the answer for on this SITE. I used the following to open it: $ firewall-cmd --...
15
votes
3answers
2k views

How did installing this RPM create a file?

Running yum install https://extras.getpagespeed.com/redhat/7/noarch/RPMS/getpagespeed-extras-release-7-1.el7.gps.noarch.rpm creates /etc/cron.d/sysstat2 but RPM disavows the file: # rpm -ql ...
15
votes
1answer
25k views

Disable SSL check rpm

When trying to run any rpm command I get the follow error. I am not sure why i am getting a curl error but i have tried many different options which have all failed. Running CentOS7 and behind a ...
14
votes
3answers
64k views

How can I permanently set ulimit -n 8192 in Centos 7?

I would like to permanently set the open file limit for all users in Centos 7, but there seems to be a lot of conflicting information out there on the googles.
14
votes
4answers
6k views

Cannot conect MySQL (error 2026) after upgrade to Ubuntu 20.04

I cannot connect to MySQL 5.7.27 running on CentOS 7 server after upgrade of my workstation to Ubuntu 20.04 LTS. I am connecting using command mysql -h <server_ip> -u <user_name> -p and ...
13
votes
3answers
22k views

Permanently enable a SCL

Is there a way that I can permanently enable a SCL? I've installed rh-php56, and I would like to make sure that it is loaded every time I ssh into my machine. I am currently running CentOS 7.
13
votes
2answers
29k views

Why isn't systemctl starting redis-server on CentOS 7?

I've installed redis on a new CentOS 7 box but can't start it using systemctl. It was installed like this: rpm -i http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm yum ...
13
votes
3answers
30k views

ZFS Datasets dissappear on reboot

I have installed ZFS(0.6.5) in my Centos 7 and I have also created a zpool, everything works fine apart from the fact that my datasets disappear on reboot. I have been trying to debug this issue with ...
12
votes
3answers
16k views

SELinux preventing Apache from writing to a file

SELinux is preventing the apache user from writing to a log file which it owns. When I do setenforce 0 it works. Otherwise it shows this error IOError: [Errno 13] Permission denied: '/var/www/webapp/...
12
votes
1answer
6k views

Accidentally deleted python and yum is not working in centos7 [closed]

I am new to linux and was trying to delete python so I can install it from scratch. Instead of deleting only the python files in /usr/local/bin/ I also deleted these: /usr/bin/python /usr/bin/python2....
11
votes
3answers
10k views

What is the meaning of the IPv6 config options in CentOS 7?

What exactly are the meanings of the following settings when manually configuring network interfaces on CentOS (I'm trying to configure an IPv6 only host)? I can guess what some of them mean by their ...
11
votes
3answers
7k views

Apache's PidFile directory is removed every boot

Every time the server is rebooted, the directory /run/httpd is removed. /run is a tmpfs filesystem, therefore, mounted in RAM. /run/httpd is created only during installation. When I start httpd after ...
10
votes
5answers
4k views

Disadvantages of running an AWS worker server at 100% CPU

On a machine (AWS m5.large) that only runs nice'd background processing jobs (i.e. no web/DB/etc servers present), are there disadvantages to consistently running the CPU at 100%? I understand that ...
10
votes
8answers
48k views

Vgextend : “device excluded by a filter”

I am at a new internship and I am asked to extend a volume group, seemed fine : vgextend [my_group] /dev/sdb But now I get an error message telling me : Device /dev/sdb excluded by a filter` ...
10
votes
10answers
12k views

certbot for letsencrypt missing pyopenssl module

I need help setting up the CertBot for LetsEncrypt I am running on CentOS 7 with Python 2.7 When I run certbot I get the following error: [root@li86-193 frappe-bench]#certbot certonly --manual ...
10
votes
4answers
44k views

How to move disk space from centos-home to centos-root

I have a VM with 1 280GB disk. For some reason my layout is: $ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 50G 21G 30G 41% / devtmpfs ...
10
votes
2answers
30k views

sysctl: cannot stat /proc/sys/net/ipv4/netfilter/ip_conntrack_max: No such file or directory

I try to change net.ipv4.netfilter.ip_conntrack_max by editing /etc/sysctl.conf net.ipv4.netfilter.ip_conntrack_max = 65535 and sysctl -p But i receive error: sysctl: cannot stat /proc/sys/net/...
10
votes
3answers
37k views

php-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream

I am stacked with following errors on my site when I test 200 hits per second. First I received 499 errors 2017-04-09 03:22:45 Error 162.158.79.219 499 GET / HTTP/1.1 0 nginx access ...
10
votes
2answers
13k views

From vSphere 5.5 - Deploying Centos 7 from template ignores customizations

I've been having troubles when deploying CentOS7 from template in that the customizations do not take effect. For the VM OS setting - I have selected RHEL7 as the OS rather than CentOS (previously ...
10
votes
1answer
551 views

Configuring 1:1 Nat using Firewalld for VM's

I've setup 2 vm's within my server and I'm trying to setup a 1:1 NAT for them with firewalld on CentOS 7. Currently both vm's are behind a virtual bridge (virbr0, vnet0, vnet1) and I've made copies of ...
10
votes
3answers
9k views

Confirming that yum-cron is configured properly on a CentOS 7 server

Is there any way to test whether yum-cron is configured properly? I need to confirm that it will automatically install security patches and that it will email me when it does so. I have a CentOS 7 ...
9
votes
3answers
39k views

safely upgrade glibc on CentOS 7

I've tried a python application on my CentOS machine and it gives me the following error: ImportError: /usr/lib64/libc.so.6: version `GLIBC_2.18' not found (required by /tmp/_MEI2BYIr4/libstdc++.so.6)...
9
votes
4answers
35k views

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 ...
9
votes
5answers
8k views

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/...
9
votes
1answer
15k views

Is there a simple way to export/import firewalld settings?

Is there a simple way to export/import firewalld settings? I'd like to set firewalld on one server an then use the same for a lot of others. Including adding custom zones, direct rules etc.
9
votes
1answer
1k views

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....
9
votes
3answers
33k views

Firewalld CentOS 7 Masquerading

I'm trying to do the equivalent of this iptables rule in firewalld iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE How can I do this?
9
votes
3answers
12k views

How to `Graceful Restart Apache` in centos 7?

My system is centos 7.4, with apache 2.4 Based on apache manual,apachectl -k graceful should be the way to graceful restart apache, but I got notice as below: [root@localhost root]# apachectl -k ...
9
votes
1answer
12k views

Systemctl: find out which commands are applicable for a service

How do I find out which commands are applicable for a service with systemctl? # systemctl reload nagios.service failed to reload nagios.service: Job type reload is not applicable for unit nagios....
9
votes
7answers
57k views

Access denied trying to enable or unmask firewalld

My firewall is currently inactive. systemctl status firewalld firewalld.service Loaded: masked (/dev/null) Active: inactive (dead) I used the following command to enable the firewall # systemctl ...
9
votes
1answer
9k views

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, ...
9
votes
0answers
192k views

Recovering from a rm -rf / [duplicate]

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 ...
8
votes
6answers
4k views

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 ...

1
2 3 4 5
55