Showing entries 71 to 80 of 131
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: centos (reset)
MySQL HA with DRDB and Heartbeat on CentOS 5.5

This is one of a few MySQL High Availability strategies.  I have used this for years and found it work great.  If you don’t know about DRBD and MySQL you should read Peter’s comments.

These are step by step instructions for Redhat 5 or CentOS.

If you need more details please refer to:
http://www.drbd.org/users-guide/

Configuring MySQL for DRBD
http://dev.mysql.com/doc/refman/5.1/en/ha-drbd-install-mysql.html

Getting started:

The OS in this example is CentOS 5.5.  I added a new disk (/dev/sde) to the four disk RAID-5 and RAID-1 I was already using.   I’m only creating an 8 …

[Read more]
Sphinx As MySQL Storage Engine (SphinxSE)

Sphinx As MySQL Storage Engine (SphinxSE)

SphinX is a great full-text search engine for MySQL. Installing the Sphinx daemon was straightforward as you can compile it from the source or use a .DEB/.RPM package but SphinxSE was a little bit tricky since it needed to be installed as a plugin on a running MySQL server. So if you use Debian or Centos and install your MySQL from a .deb or .rpm package this is how you do it.

How to install MongoDB on CentOS 5.4 / RHEL5 and interface with PHP 5

If you’ve been reading up on the various NoSQL offerings and have wanted to try out one but don’t know how to get started, this is one of the easiest ways. I chose MongoDB for this example because I’m going to start using it for a project that needs features that MySQL isn’t as fast at: namely denormalized data with billions of rows. MongoDB has plenty of drivers for other scripting and high-level languages but I’ll focus on the PHP driver today. If there is interest I can do a write up on Python usage later. This example is limited to CentOS, Fedora, and Redhat 5 servers that use the yum package management system. For more information you can reference their download page: http://www.mongodb.org/display/DOCS/Downloads

First install the prerequisites:

  • sudo yum install gcc php php-pear

Then install the mogo php extension via …

[Read more]
Install MariaDB on RedHat 5.4

Tweet

Is MariaDB really a drop in replacement for MySQL?   I’m running CentOS 5.4.  What happens if…

  1. Use “mysqldump –all-databases > FullBackup.sql” to make a full backup. (Better safe then sorry)
  2. Go to http://askmonty.org/wiki/MariaDB:Download and download the CentOS 5 packages.
  3. Stop msql “service mysqld stop”
  4. Pull MySQL out by the roots with “rpm -e mysql-server mysql –nodeps”
  5. Install Maria with “rpm -i Maria-*”

And the install start mysql up again.  Wow.  That’s “Drop in”.

If your reading this, you’re seeing it works.

[Read more]
How do you print number of files for each folder in a directory [Linux]

I have been annoyed by the fact that I couldn’t easily print file count for all of the folders in certain directory.  Most of the time I just want to see what space each folder is using (du -hs *) but there are times when I need to know how many files are in each folder (checking cache folder, session folders etc).   So I whipped together a command line which does just that for me:

for i in `find -maxdepth 1 -type d`; do  echo -n $i " ";find $i|wc -l; done

I am sure there are many different ways to show file count for each folder in a directory and I am curious to see what people do so please do post comments with what you do.

Above command is pretty simple and can be expanded to do whatever you need.  For example, you can throw it into a bash script and be able to pass parameters.  For example:  count_files /home/  In this case your command line would …

[Read more]
How To Set Up MySQL Database Replication With SSL Encryption On CentOS 5.4

How To Set Up MySQL Database Replication With SSL Encryption On CentOS 5.4

This tutorial describes how to set up database replication in MySQL using an SSL connection for encryption (to make it impossible for hackers to sniff out passwords and data transferred between the master and slave). MySQL replication allows you to have an exact copy of a database from a master server on another server (slave), and all updates to the database on the master server are immediately replicated to the database on the slave server so that both databases are in sync. This is not a backup policy because an accidentally issued DELETE command will also be carried out on the slave; but replication can help protect against hardware failures though.

Installing Lighttpd With PHP5 And MySQL Support On CentOS 5.4

Installing Lighttpd With PHP5 And MySQL Support On CentOS 5.4

Lighttpd is a secure, fast, standards-compliant web server designed for speed-critical environments. This tutorial shows how you can install Lighttpd on a CentOS 5.4 server with PHP5 support (through FastCGI) and MySQL support.

PHP: Curl being slow from php call on CentOS 5.4

I ran into an issue where curl request run within few ms from command line but same url fetch was taking over 10 secs. After doing some debugging and research it turned out that call to check (getaddr ipv6 was timing out. Obviously you can do multiple things to fix this (including enabling ipv6 support) but since I did not have a need for ipv6 (it is disabled in my network configuration), I decided to recompile curl and disable ipv6. Here is the command for recompiling curl and installing into /usr/local/curl directory with ipv6 disabled.

./configure –prefix=/usr/local/curl –disable-ipv6

————————————-
DISCLAIMER: Please be smart and use code found on internet carefully. Make backups often. And yeah.. last but not least.. I am not responsible for any damage caused by this posting. Use at your own risk.

451 CAOS Links 2009.12.01

Banking on open source. Open source as a business model. And more.

Follow 451 CAOS Links live @caostheory on Twitter and Identi.ca
“Tracking the open source news wires, so you don’t have to.”

For the latest on Oracle’s acquisition of MySQL via Sun, see Everything you always wanted to know about MySQL but were afraid to ask

Banking on open source
# CIOL.com reported on the benefits of Standard Chartered Bank’s open source-based core banking system.

Open source as a business model
The “open source has failed as a …

[Read more]
MariaDB 5.1.39 for Debian, Ubuntu, RHEL/CentOS

You can now yum (RPM) or apt-get (DEB) MariaDB 5.1.39, courtesy of OurDelta and in close cooperation with Monty Program Ab. Simply follow the info on the CentOS, Debian or Ubuntu pages.

(note: give the mirrors some hours to sync up)

Quick overview

[Read more]
Showing entries 71 to 80 of 131
« 10 Newer Entries | 10 Older Entries »