October, 2012

How to install Percona Server 5.5 on Centos 6.3

2012-10-22 Bertas Linux

Add Percona repository to your yum repository list, like it’s written in http://www.percona.com/doc/percona-server/5.5/installation/yum_repo.html

Next try to install Percona Server

yum install Percona-Server-shared-55.x86_64 Percona-Server-server-55.x86_64 \
Percona-Server-client-55.x86_64

And probably you will get error:

(more…)

0

Creating requests per time graph from nginx or apache access log

2012-10-20 Bertas Linux

To create script that calculates values was simple part, but to create graph was a little bit tricky. But lets start from beginning…

Log file this script analyze look like this:

xx.xxx.xxx.xxx - - [20/Oct/2012:06:25:22 +0300] "GET ... HTTP/1.1" 200 80638 "..." "Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0"
xx.xx.xxx.xxx - - [20/Oct/2012:06:25:24 +0300] "GET ... HTTP/1.1" 200 80638 "..." "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)"
xxx.xx.x.xx - - [20/Oct/2012:06:25:25 +0300] "GET ... HTTP/1.1" 200 81302 "..." "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; InfoPath.1)"
xx.xx.xx.xx - - [20/Oct/2012:06:25:25 +0300] "GET ... HTTP/1.1" 200 102001 "..." "Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20100101 Firefox/16.0"

In order to calculate requests per time frame we need to have those time intervals. So we take first date from log file and change it to seconds since 1970-01-01 00:00:00 UTC and add 300s (5 mins).

(more…)

0

Finding used themes in wordpress mu

2012-10-15 Bertas Wordpress

I’m responsible for one blog farm, which are running on wordpress mu, and we needed to find what themes are used in order to remove not used.

In our setup there is one database and a lot of tables. Theme name, used for blog is stored in options table. It’s simple to find theme used in one blog:

SELECT option_value FROM wp_20_options WHERE option_name='current_theme';

If we need to find themes used in couple blogs it is quite easy too:

(SELECT option_value FROM wp_20_options WHERE option_name='current_theme') UNION 
(SELECT option_value FROM wp_21_options WHERE option_name='current_theme') UNION 
(SELECT option_value FROM wp_26_options WHERE option_name='current_theme');

But we have 1500 options tables….

(more…)

0

Add Products From Amazon To Your Magento Shop

2012-10-14 Bertas Magento

I wanted to add product links from Amazon to my Magento shop and earn up to 10% from Amazon Affiliate program. I have searched for complete solution, but was unable to find. There is some of them, but no one was exactly as I wanted. So I have spent couple days and made one. There is some pictures how it looks.

If you want something similar, please read this article.
(more…)

0

Powered by WordPress. Designed by elogi.