Author: rpaco

  • Running Java without installing in Linux

    Copy jre-8u211-linux-x64.tar.gz to /usr/java tar -zxvf jre-8u211-linux-x64.tar.gz export JAVA_HOME=/usr/java/jre1.8.0_211/binexport PATH=$JAVA_HOME:$PATH

  • Reinstall broken packages in Linux

    yum reinstall \*

  • Windows Pre migration checklist script

    @echo off echo. > %computername%.txt echo. >> %computername%.txt echo ======IP Configuration============================================================== >> %computername%.txt ipconfig /all >> %computername%.txt echo. >> %computername%.txt echo. >> %computername%.txt echo ======Net Start===================================================================== >> %computername%.txt echo. >> %computername%.txt echo. >> %computername%.txt net start >> %computername%.txt echo. >> %computername%.txt echo. >> %computername%.txt echo =====Netstat Output================================================================= >> %computername%.txt echo. >> %computername%.txt echo. >> %computername%.txt…

  • How to create CentOS Local Repository Server

    mkdir /mnt/iso mount /dev/cdrom /mnt/iso mkdir /home/repos/LocalRepo/CentOS/7.0/ -p cp -ar /mnt/iso/Packages/* /home/repos/LocalRepo/CentOS/7.0/ umount /dev/cdrom /mnt/iso cd /home/repos/LocalRepo/CentOS/7.0/ rpm -i deltarpm-3.6-3.el7.x86_64.rpm rpm -i libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm rpm -i python-deltarpm-3.6-3.el7.x86_64.rpm rpm -i createrepo-0.9.9-28.el7.noarch.rpm vi /etc/yum.conf file:///home/repos/LocalRepo/CentOS/7.0 yum install apr-1.4.8-3.el7.x86_64.rpm apr-util-1.5.2-6.el7.x86_64.rpm httpd-tools-2.4.6-67.el7.centos.x86_64.rpm mailcap-2.1.41-2.el7.noarch.rpm httpd-2.4.6-67.el7.centos.x86_64.rpm systemctl start httpd systemctl status httpd systemctl enable httpd ln -s /home/repos/LocalRepo/CentOS/7.0/ /var/www/html/CentOS7.0 vi localrepo.repo [localrepo]…

  • Key Management Service client information

    Execute the command below via command prompt. Slmgr.vbs /dli

  • Finding Lost Windows Product Key Using Command Prompt or PowerShell

    Command Prompt wmic path softwarelicensingservice get OA3xOriginalProductKey Powershell powershell “(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey”

  • Enable IP Forwarding in Linux

    1) Edit/Add the following line below in sysctl.conf #vim /etc/sysctl.conf net.ipv4.ip_forward = 1 #sysctl -p /etc/sysctl.conf

  • Disable FirewallD and enable/import IPTables rules

    1) Clear the default firewall rules in FirewallD. #iptables -F #iptables -t nat -F 2) Disable firewalld. #systemctl stop firewalld #systemctl disable firewalld #systemctl mask firewalld 3) Install iptables-services. #yum install iptables-services #systemctl start iptables #systemctl enable iptables 4)Clear again the iptables rules. #iptables -F #iptables -t nat -F 5) Import iptable rules and saved…

  • How to Allow SNMP ports in Redhat/CentOS 7

    firewall-cmd –zone=public –add-port=161/udp –permanent firewall-cmd –zone=public –add-port=161/tcp –permanent firewall-cmd –zone=public –add-port=162/udp –permanent firewall-cmd –zone=public –add-port=162/tcp –permanent firewall-cmd –reload

  • Remove Special Characters in a file using sed

    sed “s/[!@#\$%^’&* ()]//g”