?

Log in

No account? Create an account
IBNeko's Journal-Nyo~!
ibneko
ibneko
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.

II. MySQL
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 '[]'.
---------
CPAN::Config options from /System/Library/Perl/5.8.6/CPAN/Config.pm:
commit Commit changes to disk
defaults Reload defaults from disk
init Interactive setting of all options

build_cache 100
build_dir /Users/benjamin/.cpan/build
cache_metadata 1
cpan_home /Users/benjamin/.cpan
dontload_hash
ftp /usr/bin/ftp
ftp_proxy
getcwd cwd
gpg
gzip /usr/bin/gzip
histfile /Users/benjamin/.cpan/histfile
histsize 100
http_proxy
inactivity_timeout 0
index_expire 1
inhibit_startup_message 0
keep_source_where /Users/benjamin/.cpan/sources
lynx /sw/bin/lynx
make /usr/bin/make
make_arg
make_install_arg
makepl_arg
ncftp
ncftpget
no_proxy
pager /usr/bin/less
prerequisites_policy follow
scan_cache atstart
shell /bin/tcsh
tar /usr/bin/tar
term_is_latin 1
unzip /usr/bin/unzip
urllist
http://ftp.cpanel.net/pub/CPAN/
http://cpan.teleglobe.net/
http://cpan.calvin.edu/pub/CPAN/
http://cpan.mirrors.hoobly.com/
ftp://ftp.dc.aleron.net/pub/CPAN/
ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/
http://cpan.thepirtgroup.com/
http://mirrors.jtlnet.com/CPAN/
http://www.ibiblio.org/pub/mirrors/CPAN/
http://cpan-du.viaverio.com/
http://mirrors.rcn.net/pub/lang/CPAN/
http://cpan.wanadoo.nl/
http://cpan.mirror.solnet.ch/
http://cpan.mirror.fr/
wget /sw/bin/wget



Install the following perl modules (most from the livejournal docs page, but some I added):
DBI - installed without problems
DBD::mysql - NOTE: MySQL NEEDS TO BE RUNNING FOR THIS TO INSTALL W/O ERRORS!
-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:
http://www.paginar.net/matias/articles/gd_x_howto.html#sct09

What I did to install GD - Probably not recommended unless you hit problems
Installed libpng 1.2.8 via fink**. (including shlibs)
Installed libjpeg 6b via fink. (including bin/shlibs)
Installed FreeType 2.1.9 via fink. (including shlibs)
Zlib ignored: It's already part of MacOS X. 10.4.2 includes version 1.2.2
(located@/usr/include/zlib.h)
[edit] I ended up doing ./configure --with-freetype=/sw/lib/freetype219 to get freetype to work. Fontconfig didn't work, dunno why, don't really care... X11 SDK is installed, but... o.O
[edit 2] JPEG's craping out on me. Installing manually:
Had to do setenv MACOSX_DEPLOYMENT_TARGET 10.4 to kill off glibtool problem. Ok, looks good.
[edit 3] Manually installing LibPNG as well. Ok, looks good.
Yes, gd compiles now. Running make install. All's good. Returning to cpan.

** --> fink = http://fink.sourceforge.net/ (actual app) + http://finkcommander.sourceforge.net/ (GUI)


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:
http://www.livejournal.com/doc/server/lj.install.install_files.html
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
http://www.livejournal.com/doc/server/lj.install.ljconfig.html
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
done.
Making usable...
done.


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
http://www.livejournal.com/doc/server/lj.install.finishing.html
7 happy kittens | Leave catnip
Comments
da_j_go From: da_j_go Date: July 22nd, 2005 03:52 pm (UTC) (Link)
Can't get XML::Parser to work... It can't find Expat no matter where I try to put it.
ibneko From: ibneko Date: July 22nd, 2005 05:17 pm (UTC) (Link)
Mmmm. It'd help if you gave me exact output from install XML::Parser.

http://darwin.servehttp.com/Parser.zip - There's my Parser folder - it goes under /Library/Perl/5.8.6/XML.
da_j_go From: da_j_go Date: July 23rd, 2005 02:17 am (UTC) (Link)
CPAN.pm: Going to build M/MS/MSERGEANT/XML-Parser-2.34.tar.gz

Note (probably harmless): No library found for -lexpat

Expat must be installed prior to building XML::Parser and I can't find
it in the standard library directories. You can download expat from:

http://sourceforge.net/projects/expat/

If expat is installed, but in a non-standard directory, then use the
following options to Makefile.PL:

EXPATLIBPATH=... To set the directory in which to find libexpat

EXPATINCPATH=... To set the directory in which to find expat.h

For example:

perl Makefile.PL EXPATLIBPATH=/home/me/lib EXPATINCPATH=/home/me/include

Note that if you build against a shareable library in a non-standard location
you may (on some platforms) also have to set your LD_LIBRARY_PATH environment
variable at run time for perl to find the library.

Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install


I downloaded expat, and in terminal ran ./Desktop/expat-1.95.8/configure , and it put it in the default directory. So I'm not sure what is going on wrong.
ibneko From: ibneko Date: July 23rd, 2005 02:35 am (UTC) (Link)
Go to your .cpan directory where all of the cpan stuff is kept - this is probably in your home folder, called .cpan. (open a new terminal window, and cd .cpan should do the trick.) If you specifed a different directory when you set up cpan, go there instead.
Then cd into builds, then XML-Parser-2.34.

From here, you can do what they suggest and run
perl Makefile.PL EXPATLIBPATH=/usr/local/lib EXPATINCPATH=/usr/local/include
/usr/local/lib and /usr/local/include being the default directory


Oh, I know what you did wrong ^^;; Ignore the above for now - it's just there for future reference.

Yes, you ran configure. That creates the makefile that the command "make" follows in order to _compile_ expat. Once you compile it (by running make inside the expat-1.95.8 folder), you'll need to do sudo make install to actually _install_ the files.

Just so you know, I'm leaving for Taiwan come sunday night-ish, so if we reach that date, and you still have problems, you'll have to find someone else, or start doing some reading.
da_j_go From: da_j_go Date: July 23rd, 2005 03:03 am (UTC) (Link)
UNIX for Dummies doesn't even start to cover this. Thank you again for all your help, even if ultimately the only thing I get is a little friendlier with UNIX.

iceBook:~/Desktop/expat-1.95.8 Jgo$ sudo make install
/bin/sh ./conftools/mkinstalldirs /usr/local/lib /usr/local/include
mkdir /usr/local/include
mkdir: /usr/local/include: File exists
make: *** [installlib] Error 1
iceBook:~/Desktop/expat-1.95.8 Jgo$

Same error as before for running cpan> install XML::Parser
ibneko From: ibneko Date: July 23rd, 2005 03:16 am (UTC) (Link)
And yes, you'd get the same error, 'cause it still hasn't installed it yet. If the installation processes sucessfully, you should see "Libraries have been installed in:
/usr/local/lib" somewhere along the line, and probably "/usr/bin/install -c -m 644 ./doc/xmlwf.1 /usr/local/man/man1" as the last line of output.

Oh, wow, now that's new. Heh. For some odd reason, make is trying to do mkdir (make new directory command) for /usr/local/include, even though you already have it there. I'm hazarding a guess that there's something funny going on inside your makefile. There's two things we can do: a) send me the makefile and I'll compare it to mine and see what's going on. b) try ./configure (to rewrite that makefile), then sudo make install again.

My e-mail address is ben.juang@comcast.net. I'd suggest trying a and b at the same time ^^ saves time in case b fails.
ibneko From: ibneko Date: July 23rd, 2005 03:24 am (UTC) (Link)
Hmm, and as for learning, I think, actually, most of it was a lot of installing of things that I didn't really need (like qmail, aspell, fink (before they made a nice MacOS X package), ROM2.4 - a MUD, postfix, lynx (before fink came along), pine, and a whole host of random UNIX apps). But that takes time ^^;;. Oh, yeah, and a lot of google searching and skimming pages for instructions on how to install things. After a while, you'll have seen most of the possible error codes (I'm not really there yet), and know the general steps to installing and making stuff work.[/end ramble]

And don't worry 'bout thanking me~ Just help the next UNIX newbie you come across... It's always nice to be able to get help, and hopefully someone will do the same for me in the future when I need it. The world would be a much nicer place if we all helped each other, ne?
7 happy kittens | Leave catnip