@
archives

yongitz

yongitz has written 25 posts for yonG's kôrNəR

How to setup yum repository using locally mounted DVD

Environment CentOS/RHEL 6 Background If you find yourself needing to install/update packages on your CentOS 6 system with no internet then the setup below can be used. You just need to download a DVD/ISO of your current system and copied over to the server. In this example, will present how to setup mysql-server package using … Continue reading

Setup HaProxy HTTP Load Balancer on CentOS

Load Balancing per wikipedia, improves the distribution of workloads across multiple computing resources, such as computers, a computer cluster, network links, central processing units, or disk drives. Load balancing aims to optimize resource use, maximize throughput, minimize response time, and avoid overload of any single resource. Using multiple components with load balancing instead of a single … Continue reading

Delete emails on Zimbra based on Subject

This is just a modification of what I have found from this link. Have added ability to loop through a mailbox when it finds multiple messages matching the subject defined. #!/bin/bash EMAIL_ADDRESSES=temp_email SUBJECT=”Employee Compensation Letter” echo “Subject is: $SUBJECT” echo “” cat $EMAIL_ADDRESSES|while read mailid; do #echo $mailid #getting the mboxstore id to search for … Continue reading

Redirect HTTP traffic to HTTPS

You will find the need to implement a redirection of HTTP request to HTTPS. With this all you need to use is Apache’s mod_rewrite module. Below is the sample configuration for both the entire site or just a sub section. To redirect ALL traffic to HTTPS: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] … Continue reading

Monitoring Script to Keep IPsec Tunnel Active

This script is used in our environment wherein it monitors certain tunnel. This is just a workaround though as we only encounter this when the other side of the tunnel is using Fortigate Firewall.  This can be handy as well when you want to monitor any connection as it can do some  automation like restarting … Continue reading

VMPlayer CLI Tips

As I have posted earlier, you can run VMs from a command line using VMWare VXI API. In addition to that, you can also view your running VMs as well as get their IP addresses and a lot more. For this topic, will be covering two things that I consider most important. That is, getting … Continue reading

Running Headless(NoGUI) VMPlayer VMs

Environment: VMs under Linux Host Sometimes, you will find the need to run or start VMs from the command line especially when you are working remotely. This can be done using VMware VIX API. If not yet done, download the VMware VIX API for Linux from VMware Website and install it on the same host where … Continue reading

Setup AWStats on CentOS 6 to analyze Apache Logs

Environment: CentOS 6 64bit with Apache already installed AWStats is an opensource software that generates statistics graphically. For more info, visit awstats office website here. 1. Install Epel Repo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 2. Install awstats package. yum install awstats 3. Setup apache for stats By default AWStats creates an Apache configuration file /etc/httpd/conf.d/awstats.conf. If you … Continue reading

Upgrade RHEV(Red Hat Enterprise Virtualization) from 3.0 to 3.2

We have upgraded our RHEV Environment recently to 3.2. 3.3 is the latest but are not moving to that yet as there might still be bugs since this was just released earlier this year. The purpose of this documentation is just to keep my sanity. I will be posting as well the official Documentation of … Continue reading

Correcting Linux Clock on a Virtualized System

We have had issues on some of our VMs under RHEV. Setting up NTP won’t help as the time always gets off. To correct the time, modify the kernel boot options as below then reboot the machine for changes to take effect. For x64 systems: divider=10 clocksource=acpi_pm For x86 systems: notsc divider=10 See complete parameters … Continue reading