Newest centos Questions

Q&A for system and network administrators

Cent OS 6 restarts immediately after booting

I have a server with CentOs 6 which restarts in loop. It loads all modules correctly, then login prompt appears and then it immediately starts umount ing drives and goes to restart. Does anyone ...

DocumentRoot for subdomain not recognized in DirectAdmin

I have created a subdomain for my api. This points by default to domain.tld/api Which is fine. But I want the documentroot to point to /home/user/domains/domain.tld/public_html/api/public I ...

NGINX redirect non-existent domains

Lets say I have the following domain: example.com with these subdomains: test.example.com prod.example.com All only accessable through HTTPS. When someone enters https://test2.example.com or any ...

I am not getting what is wrong I am doing in malloc. it's giving me following error. “prog: malloc.c:2372: sysmalloc: Assertion `(old_top =…” [closed]

include include include include include include include int main(){ int Q; scanf("%d",&Q); long *L; long *R; L = (long *)malloc(sizeof(long)); R = (long *)malloc(sizeof(...

Server not accessible on eth1 (additional network interface) CentOS 7 on AWS EC2

I have created a CentOS 7 instance on EC2, installed my required application-ware, assigned 1 Elastic IP to default network interface (eth0) and it is all accessible. Now I created another Network ...

Can't paste or type Japanese (or non-Latin characters) on Putty

I work with Japanese characters on Putty, and whenever I see question marks on Putty, I change the locale by typing export LANG="en_US.UTF8" Once I have done that the characters are shown on Putty ...

libncurses.so.6()(64bit) is needed by mysql-community-client

I have been trying to install mysql-community-client-5.7.17-1.fc25.x86_64.rpm on CentOS Linux release 7.3.1611 and the RPM complain about libncurses.so.6()(64bit) rpm -Uvh mysql-community-client-5.7....

Enable symlink for nginx config files [migrated]

I have NGINX running on CentOS7. And I would like to share the /etc/nginx directory between Linux and Windows. The reason is that, I don't want to access the file every time I need to change/add ...

Centos 6 - Multiple ISCSI Initiator Nodes

We recently purchased a second iscsi target, and I am trying to have them both mounted on one of our hosts. Each would be mounted to different directories. Is it possible to do something like this: /...

CentOS - Welcome to emergency mode - stuck here

When booting CentOS 7 on Virtualbox, I seem to be stuck here: Welcome to emergency mode! After logging in, type “journalctl -xb” to view system logs, “systemctl reboot” to reboot, “systemctl default” ...

How do I create a SSL certificate with LetsEncrypt with CertBot? “Could not install OS dependencies. Aborting bootstrap!” [duplicate]

LetsEncrypt says to use CertBot. I'm following the instructions here https://certbot.eff.org/#centos6-apache but it gives an error. [root@ip ~]# ./certbot-auto Bootstrapping dependencies for RedHat-...

enabling mysqli extension on centos server

I want to enable mysqli extension on Centos server where PHP 5 is installed. After searching online, I saw many people talking about uncommenting mysqli related line in the php.ini and I couldn't ...

CA certificate trouble with Squid on CentOS7

I'm administrating a corporate web proxy running Squid 3.5.10 on CentOS 7 (a Diladele appliance), doing SSL bumping, and I'm having some trouble with adding new CA certificates to the system trust ...

Failed to get D-Bus connection: connection refused

I'm having a hard issue on a server, and I get no clue of what is happening nor where to search to debug it. Here is my problem : When I run any command such as : systemctl start httpd.service or ...

Systemd PHP start script Centos 7

I have a PHP script I'm trying to create a service for. I've created the service however I can't get it to start. The weird thing is, the exact same service UNIT works on my other server of the same ...

How do I create a bridge between two virtualbox VMs? CentOS and Ubuntu [closed]

My main OS upon which virtualbox is installed is a *nix laptop. On virtualbox,I have two virtual machines, one is CentOS, the other is a Ubuntu box. I have created with brctl a bridge on CentOS called ...

Should I be concerned that swap is being used on a host with nearly 40GB of free memory?

I have a production host, below: The system is using 1GB of swap, while maintaining nearly 40GB of free, unused memory space. Should I be concerned about this, or is it mostly normal?

apache patch suphp issue on centos 7.2

I am follwomg a guide to install ISPconfig on my VPS centos 7.2 server. I am having issues at step 10 https://www.host1plus.com/tutorials/hosting-services/vps-hosting-services/how-to-install-ispconfig-...

systemctl - Failed to get D-Bus connection: Operation not permitted

I'm trying to list services on my CentOS image running in Docker using systemctl list-units but I get this error message: Failed to get D-Bus connection: Operation not permitted Any suggestions ...

How do I modify SELinux to allow OpenDKIM to write to /var/tmp?

I tried this answer (http://en.server.aiseen.org/a/744756/123651) but it still gives an error. Jan 7 23:56:33 ip-172-31-15-65 opendkim[24223]: AF15521407: dkim_eoh(): resource unavailable: can't create ...

centos postfix email from multiple servers to one single domain

We are upgrading one of our applications and going over the discovery we are planing to adding 2 additional servers to our 2 server setup. Currently: 1 Centos 6.8 nginx, postfix example.com rename ...

How to determine which mail program is running on my server

I am fairly new to server administration and completely new to mail server administration. Someone else installed my mail server and I need to a) determine which program it is and b) check mail ...

How to optimize memory usage of a server with many domain aliases (parked domains) [closed]

Configuration and environment: I have a Centos 6 x64 (Openvz) VPS server with 4096MB memory and 4cpu cores. The server has Apache, Zend Opcache and Memcache installed and running. The server hosts a ...

Postfix Relay Based on Sender Recepient

What is the best practice when one has to implement this sort of ruleset in postfix: Email sent from local domain1.com, domain2.com to example.com, example1.com ought to be relayed to smtp.external....

I have two versions of PHP installed; how do I clean it up / control what references which?

Running CentOS + Apache + PHP + MySQL running yum list installed *php* gives me this: newrelic-php5-common.noarch 4.23.4.113-1 ...

Apache 2.4 IP-based virtual host not working

I have apache 2.4 installed in Centos 7 the normal virtual host working fine with all server IPs <VirtualHost *:80> but when I assign a specific ip address for my virtual host and I change ...

Centos to Sonicwall Openswan VPN Tunnel UP but can't access Subnet behind Sonicwall

I'm trying to establish a VPN site-ti-site connection between a couple networks behind a Sonicwall 5600 and my Centos 6 Linux server. Using Openswan I have successfully created a VPN (ie there is a ...

Is it possible to limit the number of previous users on login screen in centos?

I'd like to customize the login screen on Centos to limit the number of users displayed. I know how to disable the user's list by cutomizing the dconf gdm db but I wonder if I can set a limit value... ...

How to undo after copying a file in centos

I wanted to copy contents of one file to another but by mistake i copied the new file to file having contents. So now file which had data is overwritten and is empty. Is there a way to revert this ...

Error submit E-mail from Outlook 450 4.7.1

it works correctly from webemail, but when using a mail client like Outlook, it already stops working, the Rdns I have configured correctly, I would like to know what it may be, I have a VPS with ...

Haproxy / Nginx headers

having an issue with haproxy / nginx. If i set the domain straight to nginx i can use sites such as gtmetrix.com however if i go via haproxy sites such as gtmetrix are no longer able to find the ...

LVM created in CentOS 7 now cant view free space?

Created an LVM when installing CentOS 7. I have a 1TB drive. I still had about 800 GB free. I cant see those 800GB anywhere. [root@mimir user]# df -h Filesystem Size Used ...

Restrict Files from sudo User

(Developer here - relative novice in the sysadmin world). Does anyone know of a way that files can be restricted (no read, write, or execute access) from the sudo user? A little background on the ...

How conservative should I be when considering current cache use on a system?

Periodically, as with any large online service, we evaluate the current load on our hardware, and make attempts at "right-sizing" so that we're not paying for severely underutilized hardware. How ...

timeout in locking authority file /root/.xauth

When I am trying to start vncserver in CentOS 6 I am getting below error [root@localhost ~]# /etc/init.d/vncserver start Starting VNC server: 1:root xauth: timeout in locking authority file /root/....

Website loads slowly and without graphics from outside network

I'm one of the tech guys for my local school district. Please don't throw knives just yet. We host a few different web-sites for our district, two of which are "moodle" sites. Each moodle site has its ...

HaProxy does not redirect http to https

In my centOS 7 LAMP server configuration seems that my HaProxy (v 1.7) load balancer is not able to redirect http request to https binding port 80. Here is my haproxy.cfg: global maxconn 32000 ...

nginx weird php issue

I just finished setting up a centos 7 server. I have installed PHP 7 with both nginx and apache. I am switching between them on demand for testing. When I use apache, everything runs ok. When I use ...

Installing CentOS packages on fedora from repository

Is there a way to install CentOS packages on Fedora through yum (dnf) repository? I'm trying to install freeswitch, but their own repository only provides builds for RHEL and CentOS. I assume CentOS ...

ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) error on Ubuntu but works on Centos

I am running Openldap as a docker container on Ubuntu Server 16.04 LTS. I get the following error when I do ldapsearch. The same command works fine on Centos OS. Could you please provide any ...

Cannot do “lvcreate” : "not found: device not cleared” on Centos

I have created volume group, but when I tried to lvcreate, it failed: [root@c7v232 ~]# vgdisplay --- Volume group --- VG Name vg_1afe5376c50bb27bdc8a0342a0bfb50b System ID ...

How to set the sudoers in centos desktop?

In centos6.8, even set the default desktop background need the root password, then I use sudo function in my company 500 laptops. james01 ALL=(ALL) NOPASSWD: sbin/route, /sbin/ifconfig, /bin/...

What are the PHP-fpm pool settings in WHM for high load server, children and request values? [duplicate]

I need your suggestions for php-fpm settings. We had a portal with 100k users but our script was very simple, and we didn’t need so much resources, it was running on windows box. Now we turned whole ...

Re-building new LDAP from old one?

OS is CentOS7. LDAP is OpenLDAP. I have a situation concerning old LDAP. Is it possible to bring it up, as there are some files I need to get to. So, lets summarize, I have backup of whole old ...

Saltstack rpm package install fails

So i got these errors while run salt -G 'os:centos' state.apply ---------- ID: filebeat Function: pkg.installed Result: False Comment: An exception occurred in this state: Traceback (most ...

QoS - MySQL Bandwidth Priority on CentOS / rhel

I have a highly loaded server and nginx is consuming all the available bandwidth, and i cannot connect to the mysql server (located on another machine) as i'm getting errors like Lost connection ...

389 Directory server sudo ldap Integration?

I could see, there is in-built sudo functionality available in 389-DS. So I tried to integrate sudo ldap in 389-DS in order for client sudo access permissions. But unable to get it done. Also, I ...

Cannot install Perl GD module on CentOS

# cpan install GD ... GD-2.56/lib/GD/Polyline.pm CPAN: YAML loaded ok (v0.90) CPAN: CPAN::Meta::Requirements loaded ok (v2.131) CPAN: Parse::CPAN::Meta loaded ok (v1.4414) CPAN: CPAN::Meta loaded ok (...

How do I remove a SELinux module in CentOS?

I tried but it gave an error. # ls -l opendkim.pp -rw-r--r--. 1 root root 1569 Jan 8 01:20 opendkim.pp # ls -l /etc/selinux/targeted/modules/active/modules/opendkim.pp -rw-r--r--. 1 root root 344 ...

Cannot see mounted CIFS directory from FTP client

I've mounted the directory from windows server into my linux home directory using mount CIFS mount -t cifs -o user=user,gid=1001,uid=1001,rw //ipaddress/dir /home/user/target-dir/ Now I want to ...
Translating... 0%