Main

Tutorials Archives

May 16, 2006

Installing Movable Type on Mac OSX 10.4 - Part 1

So you want to start blogging like yours truly but don't wanna fork out the cash for MacOSX Server? Well compadre, you don't have to shell out a dime because Mac OSX has almost everything you need to get started.

The instructions below are my notes from an actual install onto a MacMini G4 with OSX 10.4.6 installed. Things vary from system to system but overall this should get you up and running. I won't get into how to use Movable Type or how to configure it for all intents and purposes as this is out of the scope of this article. You could probably also take portions of this and use it to install other blogging software such as WordPress. We'll be installing Movable Type 3.2 and MySQL5 and using the terminal a bit so hang tight!

Skill Level: 4 out of 5. You will need to understand how to download and install software on your mac, use the terminal and understand how a web server operates to do this tutorial.

Continue reading "Installing Movable Type on Mac OSX 10.4 - Part 1" »

May 24, 2006

Installing Movable Type on Mac OSX 10.4 - Part 2

Note: If you are just joining us, part one of this tutorial is located here.

Now that you've completed downloading Movable Type 3.2, MySQL and ImageMagick, it's time to install them. Installing most of these is a breeze but there will be times you will have to use the Terminal application in order to complete a few things. Fear not. All steps in using the Terminal are documented here.

Continue reading "Installing Movable Type on Mac OSX 10.4 - Part 2" »

September 3, 2006

How to Install DBD::mysql on Mac OSX Server 10.4.7 Universal

Okay after 3 days and very little sleep and trying all sorts of variations I finally got DBD::mysql to work.

For those that are interested I'll post how I figured this out at the end of this post but for now here are the steps I used:

Configuration: Mac Pro 2 x 2.66 Core2Duo/ OSX 10.4.7 Server Universal

NOTE: This may or may not work for those attempting to install on a different version of the server. For those who are attempting this with an older version of OSX please see my tip here.

1. install OSX Server 10.4.7 Universal Binary

(I always install everything as root. I don't want to hear anyone tell me i'm wrong for doing this. I do it this way.. you can do sudo if thats what you like!)

2. install X Code (at this writing its v. 2.4)

3. install MySQL 5x (I didn't want to use the one that Apple supplied since I wanted v.5)
*also note that you might need to have a database called test installed for this to work.

4. turn mysql on

5. open terminal and attempt to install DBD::mysql from CPAN. Type this:

sudo perl -MCPAN -e 'install Bundle::DBD::mysql'

NOTE: this install will fail but it will get you to the point you need to get to.

6. Let's fix the config now!

cd to your .cpan in the terminal:

cd ~/.cpan/build/DBD-mysql-[version]

sudo perl Makefile.PL \
--cflags="-I/usr/local/mysql/include" \
--libs="-L/usr/local/mysql/lib -lmysqlclient -lz -lm -lcrypt -lnsl"

make

make test

make install

7. Test to make sure that it works!

If you're interested in how I figured this out:

This morning I decided to try installing DBD::mysql on the non-server version of OSX that came with my MacPro just to see if it would work. I did the same procedure above, except: 1. It was standard MacOSX 10.4.7 not the Server version, 2. I only had to do up to step 5. Yep you read that right, DBD::mysql installed correctly the first time straight from CPAN!

Seeing that it installed without a hitch I decided to go ahead and see if the configs for DBD::mysql were any different and sure enough they were:

On the 10.4.7 SERVER this was the configuration that DBD::mysql would use:


cflags (mysql_config) = -I/usr/include/mysql -fno-omit-frame-pointer -arch ppc64 -arch x86_64 -pipe
embedded (mysql_config) =
libs (mysql_config) = -arch ppc64 -arch x86_64 -pipe -L/usr/lib/mysql -lmysqlclient -lz -lm
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (default ) =

On 10.4.7 Standard edition this is what the config looked like:


cflags (User's choice) = -I/usr/local/mysql/include
embedded (mysql_config ) =
libs (User's choice) = -L/usr/local/mysql/lib -lmysqlclient -lz -lm -lcrypt -lnsl
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (default ) =


So what I did was go back in and let CPAN install DBD::mysql, then go back and change its Makefile.PL settings to the the standard 10.4.7 settings. And now I've got movable type, mysql5, PHP5, apache2 all running nicely together on my Mac Pro. Thank God!

I'm no perl programmer or anything but something in MacOSX Server 10.4.7 universal is telling DBD::mysql to use those cflags and libs settings instead of the "correct" ones.

Hopefully this helps someone out there. It might not work on all installs but it worked for me and this version of the OSX Server.

UPDATE: Heres a followup report on this article.

September 5, 2006

How to Install DBD::mysql on Mac OSX Server 10.4.7 Universal part 2

NOTE: See previous entry about this here here

Interesting discovery which makes sense now:

I ran

mysql_config --cflags
and got:
-I/usr/include/mysql -fno-omit-frame-pointer -arch ppc64 -arch x86_64 -pipe

then ran:
mysql_config --libs
-arch ppc64 -arch x86_64 -pipe -L/usr/lib/mysql -lmysqlclient -lz -lm


Hmmm.... then I realized that mysql_config might be grabbing the wrong information since I'm NOT using Apples installed mysql version but rather a downloaded MySQL version 5 install.

When I changed to the correct install of mysql, the paths are now correct!

/usr/local/mysql/bin/mysql_config --cflags
-I/usr/local/mysql/include -Os -arch i386 -fno-common

/usr/local/mysql/bin/mysql_config --libs
-L/usr/local/mysql/lib -lmysqlclient -lz -lm

So I'm thinking the reason it installed fine with the standard non-Server version of OSX 10.4.7 is because there is no PREVIOUS install of MySQL on that version. The OSX Server version comes with mysql pre-installed but not running and it lives in /usr/bin/mysql. The download that I installed from mysql.com places it in /usr/local/mysql/ which is where it should be looking for --cflags and --libs but it isn't.

What to do?
I haven't tried this myself, but perhaps deleting the pre-installed version of mysql would help. I'm not sure where OSX keeps tabs of where all it's binaries are so I'm not sure how to update that part. If not you can always do it by hand in the previous post.

UPDATE: Read about how I updated DBD::MySQL to the latest version here.

September 26, 2006

Getting GD installed on OSX is a PAIN!

So theres this new Captcha plugin for Movable Type 3.3 but you need to install GD and a few other PERL modules (Authen::Captcha and GD) before you can use it. Should be an easy task but it's really not!

Before I started I did my usual "googling" for information on doing the install before I actually did it. I found a few things, but they seemed rather lengthy so I threw caution to the wind and went along my merry way attempting to install it all using CPAN. NO CAN DO. Things failed left and right when attempting to install.

I went back to google and found this helpful page:
Compiling GD on Mac OSX

Pretty good instructions and they are all step by step although, because I am on an Intel Mac Pro there were a few things I did differently.

For instance, to configure libpng, instead of following his advice to use the makefile.darwin script (which didn't work anyway) I chose to just run ./configure and let the Makefile figure things out on its own.

Also you'll want to do the following commands for installing GD after running ./configure:

rm ./libtool
ln -s `which glibtool` ./libtool.

then do make and make install.

Figuring it all out so that it compiled nicely took the longest! After GD was installed, installing the perl modules was pretty simple. Thank God there was documentation out there for doing this install. If not I'd have given up (and I actually was about to give up because of the constant error messages).

Sadly I couldn't get Captcha to work because the plugin stored the images in the CGI directory. The author of the plugin claims he's working on a fix though!

October 20, 2006

How to Upgrade DBD::MySQL for MacOSX 10.4.7 (Universal)

So I decided to upgrade DBD::MySQL to the latest version, 3.0008 as of this writing. So imagine my surprise when the install didn't work even after following my own instructions here on MacNewsBlog.com!

Well after a few minutes of panic, fearing I had broken my working Movable Type system, I calmed down, realized that I had a backup of the system (please remember to backup everything before doing any sort of updates! I use SuperDuper religiously!) and proceeded to troubleshoot it all.

I had to concentrate on this one because it's kinda complicated... but after a few minutes I figured it out. DBD::MySQL does a series of tests against a database called test when you run MakeFile.pl. I had forgotten that I dumped the test database after installing MySQL5 and running mysql_secure_installation. So all I had to do was create a new test database for DBD::MySQL to run its tests against and give MakeFile.pl the right flags.

Step by Step:
Make your database in MySQL. I usually do the following via the terminal:

mysql -u root -p
then enter your password

type the following commands:

create database blog;
grant all on blog.* to username@localhost identified by “password”;

change username@localhost to whatever your mysql username will be and change password to your password. Then type:
quit

then all you have to do is download the new DBD::Mysql and install using the instructions posted previously here and here and these additional flags:

sudo perl Makefile.PL \
--cflags="-I/usr/local/mysql/include" \
--libs="-L/usr/local/mysql/lib -lmysqlclient -lz -lm" \
--testuser="username" \
--testpassword="password" \
--mysql_config="/usr/local/mysql/bin/mysql_config"

Just replace username and password with whatever your username and password is for your database. Then run make, then make test and if everything checks out okay, run make install.

And that's it!

November 2, 2006

Getting secure.log to Log authentication info

If you've ever left the Console application open on your Mac OSX Server you've probably seen that you can view many different logs that the system runs pretty much real time. I usually leave the Console open with three windows: one for system log, one for console log and one for secure.log.If you've ever left the Console application open on your Mac OSX Server you've probably seen that you can view many different logs that the system runs pretty much real time. I usually leave the Console open with three windows: one for system log, one for console log and one for secure.log.

The problem that I had was that secure log would tell me that there was something screwy going on but wouldn't tell me who was doing it. In other words the system doesn't append IP addresses to the secure.log by default. This is something you must do via the terminal.

Today I'll show you the steps I used to get secure.log to show me who's trying to force their way into my servers, and believe me, there are lots of crazies out there doing this stuff.

Continue reading "Getting secure.log to Log authentication info" »

January 16, 2007

MacFUSE Tutorial: How to get up and running with MacFUSE

Jay Savage over at the Dowload Squad wrote up a tutorial on how to set up and use MacFUSE. MacFUSE allows you to view other file systems on your mac such as NTFS.

Read the tutorial here. This is not for you if you don't like the terminal!!!

October 15, 2007

Leopard Coming...

We're all eagerly anticipating Leopard as well as enjoying AppleInsider's Road to Leopard Series.

Today they talk about Apple Mail 3.0 and even dive into the history of where Apple's Mail client came from. To see what new features await us in Apple Mail 3.0, check this out!

Also check out their past articles:
Road to Mac OS X Leopard: Time Machine
Road to Mac OS X Leopard: Spaces
Road to Mac OS X Leopard: Dock 1.6
Road to Mac OS X Leopard: Finder 10.5

November 6, 2007

How to Detect and remove the Mac Trojan or 'Codec' Trojan

A reader has requested some information on how to remove the 'Codec' Trojan if you already have it installed. The easiest way is to install Intego's VirusBarrier, and be sure your virus definitions are up to date. You can however do it yourself using the terminal.

This info is from MacWorld and fully tested:
1. In the Finder, navigate to /Library -> Internet Plug-Ins, and delete the file named plugins.settings. Empty the trash. This deletes the tool that sets the rogue DNS Server information.
2. In Terminal, type sudo crontab -r and provide your admin password when asked. This deletes the root cron job that checks the DNS Server settings. You can prove it worked by typing sudo crontab -l; you should see the message “crontab: no crontab for root.”
3. Open your Network System Preferences panel, go to the DNS Server box, and copy the entries you can see to a Stickies note, TextEdit document, or memorize them. Now retype those same values in the box, then click Apply.
4. Reboot your Mac.

After you reboot, you can confirm you’re free of the trojan horse (in OS X 10.5) by opening the Advanced pane of the Network System Preferences panel and looking at the DNS tab—you shouldn’t see any gray entries. In Tiger, to really prove that you’re free of the infestation, use the scutil command detailed above, as that’s the only way to see all the DNS Servers your machine knows about.

As a footnote, Mac OS X security works just fine. This Trojan actually asks you to install it using your own username and password. This doesn't mean that Mac OS X security doesn't work, it proves that it does. Be careful of what you install and be sure your software comes from trusted sources, not porn sites :-)

About Tutorials

This page contains an archive of all entries posted to MacNewsBlog in the Tutorials category. They are listed from oldest to newest.

Tips is the previous category.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 4.1