MySQL Replication setup the easy way
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 MasterWe 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 ...
Add Medibuntu Repository for Ubuntu 9.04
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 SkypeAnd the list is by no means exhaustive. Two simple commands get you to add ...
Run script on startup, shutdown or reboot on 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 ...
Nginx and memcached module
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 ...
Exchange SSH keys and avoid logins and passwords
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 ...
Shell 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 ...
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 existsLet’s consider the ...
Create ISO from CD or DVD in ubuntu
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 ...
Website Tuning – Speed up your web pages
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 ...
How to 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 ...