ItecSoftware Logo

MySQL Replication setup the easy way

mysql replication setup

The MySQL replication setup requires three basic steps, we need to setup the master, then setup the client and finally start the replication process.

1. Configure MySQL Master

We will need to modify a file called my.cnf, which is the main configuration file for mysql. On most systems it’s located in /etc/ or /etc/mysql/ and it contains all important configuration data.

First, let’s ensure that networking is enabled and mysql listens on all, or at least the client’s IP addresses. We also have to tell mysql what file to write the logs to and from which databases to keep logging, so that the ...

read more

Listed in MySQL

Tags: master, MySQL, replication, slave

Add Medibuntu Repository for Ubuntu 9.04

add medibuntu repository

Medibuntu is probably the most useful and popular non-included repository for the Linux community. It contains a lot of codecs for viewing or creating audio and video files, among a ton of other, useful utilities and drivers.

It’s a must have repository for Ubuntu for anyone wanting to listen to various music in different formats, as well as viewing videos encoded in multiple codecs.

Medibuntu contains a lot of applications, some of the most popular are:

Acrobat Reader Firmware for the ALSA sound system Google Earth DVD decryption MPlayer / MEncoder Non-free codecs and Skype

And the list is by no means exhaustive. Two simple commands get you to add ...

read more

Listed in Linux, Useful Stuff

Tags: medibuntu, repository, ubuntu

Run script on startup, shutdown or reboot on Ubuntu

startup script ubuntu

Isn’t there always a need to run some command or program at startup? It’s easy on Windows with it’s startup folder, but what about on a Linux server? What’s the proper method to run a script at startup on Ubuntu?

Linux has different run levels, each designating a different user group with certain permissions. Some are exclusive for system processes, while others are available to regular users and admins. The file ...

read more

Listed in Linux, Shell Scripting, Useful Stuff

Tags: runlevel, script, skeleton

Nginx and memcached module

nginx memcache

Memcache is traditionally used as a module inside server side scripts, such as PHP, ASP, ColdFusion and others. And it’s doing a terrific job, as long as it’s implemented correctly.

But if we look under the hood of the actual Memcache application, and I’m not talking about the PHP or ASP extension, but rather the executable that’s running as a daemon under Linux, it is a rather simple, database like application ...

read more

Listed in Linux, MySQL, SEO, Shell Scripting, Useful Stuff, Web Development

Tags: apache, memcache, nginx, php

Exchange SSH keys and avoid logins and passwords

exchange ssh keys

If you’re working on remote systems, such as cloud instances or remote servers in a Linux environment, or as a system administrator or dba, changes are you’re often using ssh. Copying files between servers and workstations, creating database backups or using rsync to keep servers in sync are all tasks familiar to you.

I personally find it very annoying to always have to type in my login credentials. Not only is ...

read more

Listed in Linux, Shell Scripting

Tags: key, key exchange, login, pasword prompt, ssh

Shell Batch Script to Loop through Files

batch script to loop through files

Another quick example of a tool belonging in an administrators toolbox. In our multi server hosting environment, we’re often in need for an automated, administrative command line task, and here is one to write a batch script to loop through files in the current directory and perform some actions on them.

Really, nothing is much simpler than that once we know how to it, it’s just that most administrators or developers don’t ...

read more

Listed in Linux, Shell Scripting

Tags: bash, scripting, shell

MySQL Insert If Not Exists

mysql insert if not exists

INSERT IGNORE is the syntax for something equivalent for MySQL INSERT IF NOT EXISTS. There is really no direct command matching the SQL Server version as outlined in this articles title, at least not in the current release of MySql.

The statement INSERT IGNORE and to some extent REPLACE INTO, do essentially the same thing, inserting a record if that given record does not exists.

MySQL insert if not exists

Let’s consider the ...

read more

Listed in Linux, MySQL, Web Development

Tags: insert if not exists, lamp, MySQL, replace into

Create ISO from CD or DVD in ubuntu

create-iso-from-cd-dvd

Newer laptops and some PC’s are now shipping without CD drives these days. And operating systems are more capable of handling ISO images and mount them as drives, creating an easy way to mimic CD drives or isolated drives.

But how do we extract data from a CD and then create ISO from CD? An ISO image that can be mounted in Ubuntu or any other Linux distro? What about extracting ...

read more

Listed in Linux, Useful Stuff

Tags: cd, dvd, extract, iso, rip

Website Tuning – Speed up your web pages

website tuning

Ever wonder why some sites take forever to load while others appear in a snap? Let alone the associated user experience. It’s just more fun browsing a site that loads fast. And since Google now rates Adsense weight by load times, it makes more sense than ever to ensure that our pages load as fast as possible.

Especially with high performance websites, page load times are of highest concern. Not only ...

read more

Listed in Web Development

Tags: adsense, firebug, page load, site tuning, yslow

How to Improve Website Traffic

improve website traffic

There are several ways to generate and improve website traffic for your site. Some of them are rather simple and easy to do, others take a bit more effort and there are a few thing you really want to avoid.

But as a general rule of thumb, create content that you would like to ready and engage with yourself, and you’re far ahead. Then go thru the list of steps to ...

read more

Listed in SEO

Tags: google, keywords, search, SEO, traffic, web site