Posts

Showing posts from February, 2016

HTML to PDF Conversion using wkhtmltopdf

Wkhtmltopdf Features ·          Open source and cross platform. ·          Convert any HTML web pages to PDF files using WebKit engine. ·          Options to add headers and footers ·          Table of Content (TOC) generation option. ·          Provides batch mode conversions. ·          Support for PHP or Python via bindings to libwkhtmltox Needed to install some fonts which are used for wkhtmltopdf # yum install -y xorg-x11-fonts-75dpi # yum install -y xorg-x11-fonts-Type1 To get the file please run the following # wget https://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.10.0_rc2-static-amd64.tar.bz2 To extract the file # tar -xvzf wkhtmltopdf-0.10.0_rc2-static-amd64.tar.bz2 -C /opt # cd /opt # mv wkhtmltopdf-amd64 wkhtmltopdf # mv wkhtmltopdf /usr/local/bin To convert any HTML web page to PDF, run the following example command. It will convert the given webpage to install-eclipse . pdf as as output to /opt di

Setup HA Load Balance with HAProxy for MySQL

HAproxy is a High Availabilty for MySQL server, It is a free opensource application. In my previous artical we used HAproxy is as a TCP/Http Load Balancer now we are using for database server in to multiple servers which improvies performance and reliablity of the server. My Demo setup I am showing how to setup HA proxy for database server MySQL The load balancer HA proxy server is 192.167.57.150 HAproxy Server details OS :   Centos 6.7 IP Address          :   192.168.57.150 MySQL Servers details Database1 OS                          :   Centos 6.7 IP Address          :   192.168.57.151 Database2 OS                          :   Centos 6.7 IP Address          :   192.168.57.152 For demo purpose we needed to install the MySQL on both the servers # yum install mysql-server* # service mysql start After server of mysql please set password to the mysql server # mysql_secure_installation NOTE: RUNNING AL

Simple Batch Script to Display System Information in proper html format

Image
This is a simple batch script to display the system information and status of the system in html format in a proper design. The script is written in the Windows 7 batch programming and in some places Power shell is used as to calculate some big digits I hope this will work for some organizations where they wanted to send the emails of there servers or systems information Code : @echo off echo ^<table width="100%%" border="0" align="center" cellpadding="0" cellspacing="0" style="border:#818181 solid 0px; font-family:Arial, Helvetica, sans-serif; font-size:16px;"^> > hname.html echo ^<tbody^>^<tr^> >> hname.html echo ^<td style="background: -webkit-gradient(linear, left top, left bottom, from(#01619b), to(#0879bd)); background: -moz-linear-gradient(top, #01619b, #0879bd); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ff5400, endC