April 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Categories

April 2025
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Centos7 Apache HTTP SERVER

Centos7 Apache HTTP SERVER

yum -y install httpd

rpm -qi httpd

systemctl enable httpd.service

ln -s ‘/usr/lib/systemd/system/httpd.service’ ‘/etc/systemd/system/multi-user.target.wants/httpd.service’

chkconfig httpd on

systemctl enable httpd

mkdir /wwwroot/www echo “www.rmohan.com” > /wwwroot/www/index.html

mkdir /wwwroot/crm echo “rmohan.com” > /wwwroot/crm/index.html

cd /etc/httpd/ mkdir vhost-conf.d echo “Include vhost-conf.d/*.conf” >> conf/httpd.conf

ServerName www.rmohan.com DocumentRoot /wwwroot/www/ Requireall granted

[…]

POODLE = Padding Oracle On Downgraded Legacy Encryption

POODLE = Padding Oracle On Downgraded Legacy Encryption

B.E.A.S.T (Browser Exploit Against SSL TLS) Affected systems: Netscape 3.0 ssl tls Netscape affected system: tls Netscape 1.2 Netscape 1.1 tls tls Netscape 1.0 Description: CVE (CAN) ID: CVE-2014-3566

SSL3.0 is obsolete and no security protocol, has been TLS 1.0, TLS 1.1, TLS 1.2 substitution, for compatibility […]

Logical Volume Manager

Server: Centos Logical Volume diskserver.rmohan.com (Centos 6.5) = 192.168.1.6

Disk to use: Disk /dev/sdb: 50GB DISK A Disk /dev/sdc: 50GB DISK B Disk /dev/sdd: 50GB DISK C

 

 

 

Disk /dev/sdb: 53.7 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size […]

Disk usage 100% even after deleting files

Reducing Disk Usage When Linux complains that the disk is full, you will naturally try to delete some files or move them away from the filled-up partition. So you delete some large files, and check to see that the disk usage is much lower. $ sudo du -shx / 7.8G / But df tells you […]

RHEL 6 Security Guide

1. GRUB password

September 25th, 2014 | Category: Centos, RHCE | Leave a comment

RHEL 7 minimal install

1. during installation prompt, insert net.ifnames=0 to disable consistent network device naming

2. after first reboot of installation:

3. enable normal ethx interface name and disable ipv6 vi /etc/default/grub add net.ifnames=0,ipv6.disable=1 to GRUB_CMDLINE_LINUX line

grub2-mkconfig -o /boot/grub2/grub.cfg

4. disable UTC vi /etc/adjtime change UTC to LOCAl

5. disable selinux vi /etc/sysconfig/selinux SELINUX=disabled

[…]

RHEL 7 RESCUE MODE

To list all currently loaded service units: systemctl list-units –type service

To list all installed service units: systemctl list-unit-files –type service

Lists currently loaded target units: systemctl list-units –type target

Changes the current target: systemctl isolate name.target

systemctl get-default

systemctl set-default name.target

systemctl rescue (single user mode)

resetting root password: edit boot kernel line, insert […]

NIC Bonding on CentOS 6/7

Make sure not to use NetworkManager, using normal network

vi /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 BOOTPROTO=none ONBOOT=yes IPADDR=192.168.1.27 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=8.8.8.8 USERCTL=no BONDING_OPTS=”mode=1 miimon=100″

vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 MASTER=bond0 SLAVE=yes USERCTL=no BOOTPROTO=none ONBOOT=yes sed “s/eth0/eth1/g” ifcfg-eth0 > ifcfg-eth1

Install KVM on CentOS 7

yum -y install qemu-kvm qemu-img libvirt virt-install bridge-utils

lsmod | grep kvm

systemctl start libvirtd systemctl enable libvirtd

RHEL 7 notes To list all currently loaded service units: systemctl list-units –type service

To list all installed service units: systemctl list-unit-files –type service

Lists currently loaded target units: systemctl list-units –type target

Changes the current target: […]

CENTOS 7 LNMP (Nginx -PHP -MySQL)

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

systemctl start nginx.service

systemctl stop httpd.service yum remove httpd systemctl disable httpd.service root@centos71 ~]# systemctl start nginx.service [root@centos71 ~]# systemctl restart nginx.service [root@centos71 ~]# systemctl status nginx.service nginx.service – nginx – high performance web server Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled) Active: active (running) since Thu 2014-09-11 14:32:02 SGT; 8s ago Docs: http://nginx.org/en/docs/ Process: […]