Archive for November, 2009
How To Install Snow Leopard From USB
Ever been without a DVD/CDROM or installation disk? Especially MacBook Air users undoubtedly come across this situation. This article will explain how to install Snow Leopard from an external device such as USB or disk drive.
You will need an appropriately sized external drive or USB Flash Drive, as the Snow Leopard install DVD’s size is about 6.2 gigabytes. An 8GB USB stick like the SanDisk Cruzer 8GB is the perfect choice.
Now let’s plug in that USB stick and get started.
1. Start up Disk Utility and select your Flash Drive from the left side pane.
2. Select the Erase tab and set Format to Mac OS Extended (Journaled). It should be the first choice in the list. Set Name to Snow Leopard or OS X Install so you can easily keep track of it. Before you the Erase button, be sure that you copied any files or folders from the Flash Drive that you want to keep, as everything will get erased. You’ve been warned! Hit Erase. (more…)
How To Add PHP Mcrypt Module On Snow Leopard 10.6
These instructions assume that you have a working Apache 2.2 / PHP 5.3 in place and want to add the php mcrypt module. It will work as a fresh install, but keep in mind that additional configuration steps after these instructions are necessary to get your webserver working properly. Those additional steps are omitted here, as there are countless resources available on the Internet.
1. If you don’t already have the mcrypt module (in /usr/lib), download the libmcrypt source code from sourceforge here. Then extract the downloaded file in a Terminal and move inside the created directory. (cd libmcrypt-2.5.8 in my case)
2. Execute the following lines in one command in your Terminal, if you have a 64bit version of Apache/PHP:
CFLAGS=”-arch x86_64″ \
CXXFLAGS=”-arch x86_64″ \
./configure –disable-posix-threads
(for 32 bit versions: ./configure –disable-posix-threads)
MySQL – How To Analyze, Repair and Optimize all Tables
Ever come across a situation, where you’d like to check all tables in a database and have them all repaired and optimized? My guess is yes.
In case you didn’t know, there is a helpful MySQL utility called mysqlcheck, available as of version 3.23.38. It does exactly what we need.
To check all tables in all databases for corruption and errors and also fix them in one go, this is your command:
mysqlcheck -u username -p password –check –optimize –auto-repair –all-databases
mysqlcheck executes statements like CHECK TABLE, REPAIR TABLE, ANALYZE TABLE, and OPTIMIZE TABLE and chooses the best statements for any given operation and storage engine.
Note that the operations complete a lot faster if you can afford to to disable any external services, especially if your database is large.