July 21st, 2005

Neko (lofulah)

Random coupon. 10% off at Targets

Target.com: 10% off iPods, Sony PSP, kitchen, everything else
Matched on subscription to category "store events"

Once again, Target.com slices 10% off with no minimum
required via coupon code "TCSAVETENJUL". It works on iPods
and iPod accessories, Roomba robot vacuum cleaners, Sony PSP
handhelds (pictured), digital photo frames, kitchen gadgets,
furniture, apparel, and other items at Target.com, including
its 9,000-item free shipping section. (Bose and personalized
items are the lone exclusions.) Coupon ends July 23.

-via dealmac. Or something related.
Neko (lofulah)

Installing LiveJournal onto MacOS X 10.4.2

LiveJournal Installation onto 10.4.2

OS: MacOS X 10.4.2, all updates installed as of July 21, 2005

I. XCode (and related developer tools)
Install them. If you're running a relatively new system, it should be under /Applications/Installers. If you want to save space, you can customize and not install the documentation. That takes up the most space.

Download MySQL: http://dev.mysql.com/downloads/mysql/4.1.html
(binary MacOS X packages available.)
Install. I chose the Max version. Why not standard? I don't know.

III. Perl Modules
Open terminal, run cpan:
% sudo cpan
It'll ask for a Password, enter your admin/user password.
If this is the first time you're running cpan, it'll walk you through a configuration session. Defaults will be marked in square brackets '[]'.
Collapse )

Install the following perl modules (most from the livejournal docs page, but some I added):
DBI - installed without problems
-Installed OK.
Digest::MD5 - installed without problems
Digest::SHA1 - installed without problems
Image::Size - installed without problems
MIME::Lite - installed without problems
MIME::Words - installed without problems
Compress::Zlib - installed without problems
MIME::Base64 - installed without problems
URI::URL - installed without problems
HTML::Tagset - installed without problems
HTML::Parser - installed without problems
LWP::Simple - installed without problems [all defaults]
LWP::UserAgent - installed without problems [all defaults]
GD - Note: libgd must be installed first! -> *
- Tests fail. Force installed.
Mail::Address - installed without problems
Unicode::MapUTF8 - installed without problems
Storable - installed without problems
Time::HiRes - installed without problems
XML::Parser - NOTE: reqires http://sourceforge.net/projects/expat/
XML::Simple - installed without problems
Net::DNS - installed without problems

Optional Modules:
Net::SMTP - installed without problems
GD::Graph - Tests fail. Force installed.
Proc::ProcessTable - Tests died. Force installed.
SOAP::Lite - installed with errors (Net::Jabber - optional)
XML::RSS - Tests fail. Force installed.
String::CRC32 - installed without problems

* -> libgd installing process:
Follow the instructions at:

Collapse )

IV. LiveJournal, The Files
First, set the environment variable: LJHOME to where ever you will want to put your livejournal files. To do this, refer to the documentation here. If you're a tcsh user like me, you'll want to do 'setenv LJHOME /home/lj', and edit .tcshrc as required.

For my installation, I've placed my files at /Library/WebServer/LiveJournal/.

And now, grab livejournal via CVS. Should be painless.
Follow the instructions found at:
Copy and pasting those instructions should work.

V. Apache modifications
Open /etc/httpd/httpd.conf with your favorite text editor (BBEdit is suggested). You'll want to turn on (aka, remove '#' from the front of) "LoadModule perl_module ..." and "AddModule mod_perl.c". Then you'll want to add the two important lines:
PerlSetEnv LJHOME /home/lj
PerlRequire /home/lj/cgi-bin/modperl.pl

You can reference the example httpd.conf provided by the livejournal documentation here.

VI. Configuring your LiveJournal setup
That's all you need, really. There's no major MacOS X peculiarities that I can think of.

VII. MySQL setup
Directions here.
The difference is, if you installed the binary copy, most likely, typing 'mysql ...' will get you a "huh?" reply. The installer probably placed it in '/usr/local/mysql'. To get to the actual mysql "client" binary, you'll need to go to the 'bin' folder of mysql. Thus, "cd /usr/local/mysql/bin/" and execute the mysql command there by typing "./mysql -uroot -p". Chance are, you don't have a password for your root user yet, so just hit enter at the password prompt. We'll set that up later.

Oh, yeah, MySQL does have to be running for the mysql client to connect to it. Go install the nice preference pane included with the binary and use that to start up MySQL.

Follow through with the instructions provided by the livejournal server documentation, then come back here.

Now, to set a password so others can't log into the database as root, do:
% ./mysqladmin -uroot -p password [new password]
(curious as to what the various switches do? Try "./mysqladmin --help")

Continue onto the next page of the server documentation and follow those instructions. You should see a long list of stuff, ending with:
The system user was created with a random password.
Run $LJHOME/bin/upgrading/make_system.pl to change its password and grant the necessary privileges.
Remember to also run:
bin/upgrading/texttool.pl load

# Done.

Note those lines, and go run "texttool.pl load". It should show another long list of stuff, ending with:
inserting crumb.advcustomize
Making usable...

Now you can run the make_system.pl to set a password and privs.

VIII. Crontab (periodic task manager)
Follow the instructions. No major changes here, 'cept you'll need to know how to use vi. Hit google, to type ':help' to reach help. If you'd rather not learn, just copy all of the stuff on the documentation page, then hit 'i' (to switch to inserting mode), followed by command-v to paste it all in. Then hit ":", type "wq", and hit enter. This will write and quit.

IX. Finishing up