Category: Linux

Centos7 cleaning boot partition

Naveen Nayak March 20, 2018 No Comments Linux

Boot partition might be full as it stores old kernels etc. To clean it up and store only the latest 2 kernels do the below Take a backup of your /boot partition somewhere first edit /etc/yum.conf and set installonly_limit=2  # install yum utilities  yum install yum-utils # cleanup old kernels  package-cleanup –oldkernels –count=2

Rsync and details on what has changed

Naveen Nayak January 13, 2017 No Comments Linux

Setup  # create a directoy and a couple of files  mkdir /tmp/mydir1; mkdir /tmp/mydir1/data; echo “hello” > /tmp/mydir1/hello.txt; echo “name is john” > /tmp/mydir1/name.txt; mkdir -p /tmp/mydir1/dir1/dir2/dir3/dir4/dir5; # copy the directory with all permissions etc to a new directory  # -a : copy exactly with owner, group, permissions etc # -r : recursive cp -ar /tmp/mydir1 […]

Installing VirtualBox Guest Addition on CentOS 7 server – no GUI

Naveen Nayak January 19, 2016 3 Comments Linux , ,

I am doing this on VirtualBox 5.0.12 Windows 8.1 64 bit Host CentOS 7 server 64 bit guest up to date Steps Start CentOS 7 guest From the Devices Menu,go to Optical Drives and remove previous CD/DVD using the Remove Disk from VirtualDrive Then click on Devices and select Insert Guest AdditionsCD Image. This will […]

Disabling SELinux on CentOS 7

Naveen Nayak January 14, 2016 No Comments Linux

Security-Enhanced Linux (SE Linux) is a Linux kernel security module that provides a mechanism for supporting access control security policies. It controls which applications can access what directories in the system For example, the default rules for apache is to only be allowed to access /var/www and /var/logs/httpd and some other configuration directories. If apache […]

Adding a Self Signed Certificate to Trusted Certificate on Linux

Naveen Nayak January 14, 2016 No Comments Linux, Web Development , ,

Some times, when we generate self signed certificates, some libraries need it to be a part of the operating systems trusted certificates I am doing this on CentOS 7 and for openSSL This will only work for apps/libraries that use OpenSSLs trusted certificate list I already have my self signed certificate in /etc/pki/tls/certs/my-self-signed-cert.crt cp /etc/pki/tls/certs/devinviteright.crt […]

Increasing File Descriptors and Open Files Limit CentOS 7

Naveen Nayak September 17, 2015 4 Comments Linux, MySQL , ,

PS: See Andy Dyrcz answer in the comments for a better way to do this Some programs like Apache and MySQL require a higher number of file descriptors. This is how you can increase that limit for all users in CentOS 7 Commands require root access # Find the default limit – check the open files […]

Page 1 of 4