Posts

Showing posts from 2017

How to Increase the size of a Linux LVM by adding a new disk

Image
How to Increase the size of a Linux LVM by adding a new disk   This post will cover how to increase the disk space for a VMware virtual machine running Linux that is using logical volume manager (LVM). Firstly we will add a new disk to the virtual machine and then extend the original LVM over this additional space. Basically we will have two physical disks but just one volume group and one logical group that is using the space on both disks together. With this method there is no down time for the virtual machine. As there are a number of different ways to increase disk space I have also posted some different methods here: How to Increase the size of a Linux LVM by expanding the virtual machine disk – In this article the virtual disk that is using LVM is expanded, whereas in this current article we are instead increasing the virtual disk and expanding the Linux native partition. Use GParted to increase disk size of a Linux native partition – In this article the v

Fail2ban block 404 scan and invalid method in request on Apache server

Fail2ban block 404 scan and invalid method in request on Apache server 1. Create filter /etc/fail2ban/filter.d/apache-404.conf [Definition] failregex = [[]client <HOST>[]] File does not exist: *                    [[]client <HOST>[]] Invalid method in request *   ignoreregex = 2. Add new jail /etc/fail2ban/jail.conf [apache-404] enabled = true port = http,https filter = apache-404 action  = iptables-multiport[name=apache-404,port="80,443"] logpath = /var/log/httpd/error_log #you can add email notification as well action  = iptables-multiport[name=apache-404, port="http,https", protocol=tcp]           sendmail-whois[name=apache-404, [email protected], [email protected], sendername="Server-Fail2Ban"] bantime = 172800 maxretry = 2 findtime = 86400   ; 1 day 3. If everything is ok, you can test it with command:  fail2ban-regex /var/log/httpd/error_log /etc/fail2ban/filter.d/apache-404.conf

How To Find Out Dell Service Tag on Centos

How To Find Out Dell Service Tag on Centos The following command will only display service tag: dmidecode -s system-serial-number a little bit more information dmidecode -t 1 if dmidecode is missing just install it yum -y install dmidecode

How to install KVM Synergy on Raspberry Pi 2

How to install KVM Synergy on Raspberry Pi 2 At first install all missing libraries:   apt-get install gcc cmake libx11-dev libxtst-dev curl libcurl3 libcurl4-gnutls-dev qt4-qmake libssl-dev download the newest version from https://github.com/symless/synergy wget https://github.com/symless/synergy/archive/master.zip Now tricky part which is true for version Synergy 1.8.8 1. extract files and go inside synergy/ext 2.  unpack files unzip ./gmock-1.6.0.zip -d ./gmock-1.6.0 unzip ./gtest-1.6.0.zip -d ./gtest-1.6.0 tar - xzf openssl-1.0.2.tar.gz 3. make new dir inside synergy root folder mkdir /home/pi/synergy/openssl 4. Copy folder openssl from /home/pi/ synergy/ext/openssl-1.0.2/include/openssl to root folder of synergy cp - a /home/pi/ synergy/ext/openssl-1.0.2/include/openssl /. /home/pi/ synergy/openssl 5. If you want to play and fix symlinks - go ahead, the easiest way is to copy crypto folder to folder above synergy cp - a /home/pi/ synerg

How to clean DB from old logs in Magento 1.x

How to clean DB from old logs in Magento 1.x Using MySQL truncate log_customer ; truncate log_quote ; truncate log_summary ; truncate log_summary_type ; truncate log_url ; truncate log_url_info ; truncate log_visitor ; truncate log_visitor_info ; truncate log_visitor_online ;     login to shell(SSH)  go with root/shell folder. execute the below command inside the shell folder   php - f log . php clean   enter this command to view the log data's size php -f log.php status This method will help you to clean the log data's very easy way.  

Dell web Drac - how to install centos

Dell web Drac - how to install centos wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash yum -y install srvadmin-all edit to adjust settings: mcedit /opt/dell/srvadmin/sbin/srvadmin-services.sh to S TART: /opt/dell/srvadmin/sbin/srvadmin-services.sh start check if console is running on port 1311 netstat -tulpn | grep 1311 access v ia https:// <ip address> :1311/OMSALogin?msgStatus=null to STOP: /opt/dell/srvadmin/sbin/srvadmin-services.sh stop

How to restart network interfaces in Raspberry Pi 'service networking restart'

How to restart network interfaces in Raspberry Pi If you use command service networking restart there will be warn message and sometimes eth0 interface will not come. To fix it please add auto eth0 into /etc/network/interfaces root@pi:~# service networking restart  [warn] Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning). [ ok ] Reconfiguring network interfaces...done.

How to force time sync on Raspberry Pi

How to force time sync on Raspberry Pi sudo /etc/init.d/ntp stop sudo ntpd -q -g sudo /etc/init.d/ntp start

Fake screen saver on Raspberry PI

Fake screen saver on Raspberry PI If you want to make fake screen saver to cover display you can use "feh" to do it. setup root cron: 17 16 * * * su - pi -c '/usr/bin/export DISPLAY=:0 && /usr/bin/timeout 120 /usr/bin/feh -Y -x -q -D 5 -B black -F -Z -z -r /media/pic/' so It will activate screen saver for 120 minutes, displaying pictures from/media/pic folder starting at 16:17 everyday