Tag Archives: centos

Upgrading mysql server on Centos from 5.5 to 5.6

before upgrading make sure to backup the my.cnf file if you wish to use your former settings

cp /etc/my.cnf /etc/my.cnf_bak_`date +%F`

better also to dump the current mysql data to somewhere else for backup.

remove the current mysql:

yum remove mysql55-server mysql55-libs mysql55-devel mysql55-bench mysql55

take note of the other applications this command removes – we would like to reinstall them later.

add the repository for the relvant mysql – 56 in our case:

cd /root/

wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
yum localinstall mysql-community-release-el6-5.noarch.rpm
yum install mysql-community-server
yum install crontabs mysqltuner yum-cron sysstat postfix

set the service to start on boot:

chkconfig --list mysqld
chkconfig  mysqld on
chkconfig --list mysqld

start the service and upgrade:

service mysqld start

at this point i like to clear the log and restart the mysql to check for errors after the upgrade:

service mysqld stop
echo :> /var/log/mysqld.log
service mysqld start

now you can read the log and check for errors from this fresh upgrade.

if you have a tomcat working with the mysql server, 
better stop the tomcat , clear its logs temp and work folders and restart to have it start clean.



Technorati Tags: , , ,

wkhtmltopdf install on Centos 6

htlp to pdf

from Google code site – what is wkhtmltopdf :

Simple shell utility to convert html to pdf using the webkit rendering engine, and qt.

All the tutorials I found on the net are how to install it via aptitude, 
but I needed to install from source a specific older version , so this is what i did:


install all the needed packages  – these are going to be a big bunch:

yum -y install openssl xorg-x11-server-Xorg openssl-devel qt qt-devel gcc-c++ qtwebkit qtwebkit-devel xorg-x11-server-Xvfb 

Get the code

you can download the source code from https://code.google.com/p/wkhtmltopdf/
I need the 0.9.9 version so I took that one

cd /root
wget "https://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9.tar.bz2"
bunzip2 wkhtmltopdf-0.9.9.tar.bz2
tar xvf wkhtmltopdf-0.9.9.tar
cd wkhtmltopdf-0.9.9


fix error in code 

there was a problem to compile the code due to a link to a non existing module:

cp wkhtmltopdf.pro wkhtmltopdf.pro_bak
vim wkhtmltopdf.pro 
change line 19 from:
PRL  = $$[QT_INSTALL_LIBS] QtGui.framework/QtGui.prl
PRL  = $$[QT_INSTALL_LIBS] libQtGui.prl
save and exit 

compile !

make install

test !

we need to run the wkhtmltopdf in a virtual screen so the test line would look like:

xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltopdf http://www.google.com google.pdf

Technorati Tags: , ,