Install Java Oracle


yum install --enablerepo=rhel-6-server-thirdparty-oracle-java-rpms java-1.7.0-oracle

yum install --enablerepo=rhel-6-server-thirdparty-oracle-java-rpms java-1.8.0-oracle


yum install --enablerepo=rhel-7-server-thirdparty-oracle-java-rpms java-1.7.0-oracle

yum install --enablerepo=rhel-7-server-thirdparty-oracle-java-rpms java-1.8.0-oracle

Enable repo for php-* packages on RHEL 6

subscription-manager repos --enable=rhel-6-server-optional-rpms

Increasing nofile without restarting the process

  1. Check the maximum number of open file descriptors for the user: su - <username> -s /bin/bash -c 'ulimit -n'
  2. Get the number of open files for the process: ls -l /proc/2956/fd | wc -l
  3. Increase the limit: echo -n "Max open files=8192:8192" >/proc/2956/limits
  4. Check the new limit: grep "Max open files" /proc/2956/limits

Install EPEL repository on RHEL 6

rpm -ivh

Enable .htaccess on Centos / RHEL 5-7

Change the AllowOverride directive from None to All

vi /etc/httpd/conf/httpd.conf

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

/etc/init.d/httpd restart

Generating a coredump from a running process

yum install crash-gcore-command

gcore -o /tmp/gcore_crond $(pidof -s crond)

  • Find out what program generated the core file: file /tmp/gcore_crond.1990
  • View the core file: gdb /usr/sbin/crond /tmp/gcore_crond.1990

Converting ext3 Filesystem to ext4 Filesystem

umount /dev/sda1
tune2fs -0 extents,uninit_bg,dir_index /dev/sda1
e2fsck -pf /dev/sda1
mount /dev/sda1 /home