LiveJournal Server

来自开放百科 - 灰狐
2007年2月18日 (日) 22:39Allen (讨论 | 贡献)的版本

跳转到: 导航, 搜索

LiveJournal is an open source content management system, written mainly in Perl[o]» and utilizing MySQL as a database backend. By itself, it serves as a powerful content updating system. In other uses, it is the framework application behind many successful online communities, including LiveJournal.com and DeadJournal.com.

LiveJournal on Lighttpd

Install

LJHOME=/home/lj; export LJHOME
wget http://www.livejournal.org/download/code/
./bootstrap.pl

update httpd.conf

ServerType standalone
ServerRoot "/etc/apache-perl"
PidFile /var/run/apache-perl.pid
ScoreBoardFile /var/run/apache-perl.scoreboard
Timeout 30
KeepAlive Off
MinSpareServers 5
MaxSpareServers 40
StartServers 10
MaxClients 20
MaxRequestsPerChild 500
LoadModule mime_module        /usr/lib/apache/1.3/mod_mime.so
LoadModule autoindex_module   /usr/lib/apache/1.3/mod_autoindex.so
LoadModule dir_module         /usr/lib/apache/1.3/mod_dir.so
Port 80
User lj
Group lj
SendBufferSize 131072
ServerName   www.yoursite.com
PerlSetEnv   LJHOME /home/lj
PerlRequire  /home/lj/cgi-bin/modperl.pl
cp doc/ljconfig.pl.txt cgi-bin/ljconfig.pl

$ mysql -uroot -p
mysql> CREATE DATABASE livejournal;
mysql> GRANT ALL PRIVILEGES ON livejournal.* TO lj@'localhost' IDENTIFIED BY 'ljpass';  
mysql > flush privileges;
$LJHOME/bin/checkconfig.pl

Required Modules

DBI	libdbi-perl
DBD::mysql	libdbd-mysql-perl
Digest::MD5	libdigest-md5-perl
Digest::SHA1	libdigest-sha1-perl
Image::Size	libimage-size-perl
MIME::Lite	libmime-lite-perl
MIME::Words	libmime-perl
Compress::Zlib	libcompress-zlib-perl
MIME::Base64	libmime-base64-perl
URI::URL	liburi-perl
HTML::Tagset	libhtml-tagset-perl
HTML::Parser	libhtml-parser-perl
LWP::Simple	libwww-perl
LWP::UserAgent	libwww-perl
GD	libgd-perl
Mail::Address	libmailtools-perl
Unicode::MapUTF8	libunicode-maputf8-perl
Storable	libstorable-perl
Time::HiRes	libtime-hires-perl
IO::WrapTie	 

Use CPAN

# perl -MCPAN -e shell
cpan> install Bundle::CPAN
cpan> reload cpan
cpan> install DBI
cpan> install DBD::mysql
cpan> install Digest::MD5
cpan> install Digest::SHA1
cpan> install Image::Size
cpan> install MIME::Lite
cpan> install MIME::Words
cpan> install Compress::Zlib
cpan> install MIME::Base64
cpan> install URI::URL
cpan> install HTML::Tagset
cpan> install HTML::Parser
cpan> install LWP::Simple
cpan> install LWP::UserAgent
cpan> install GD
cpan> install Mail::Address
cpan> install Unicode::MapUTF8
cpan> install Storable
cpan> install Time::HiRes
cpan> install IO::WrapTie
cpan> install Net::SMTP
cpan> install GD::Graph
cpan> install Proc::ProcessTable
cpan> install RPC::XML
cpan> install SOAP::Lite
cpan> install XML::RSS
cpan> install String::CRC32

Debian Install

# apt-get install libdbi-perl libdbd-mysql-perl libdigest-md5-perl \
libdigest-sha1-perl libimage-size-perl libmime-lite-perl \
libmime-perl libcompress-zlib-perl libmime-base64-perl \
liburi-perl libhtml-tagset-perl libhtml-parser-perl \
libwww-perl libwww-perl libgd-perl \
libmailtools-perl libunicode-maputf8-perl libstorable-perl \
libtime-hires-perl  

# apt-get install libnet-perl libgd-graph-perl libproc-process-perl \
librpc-xml-perl libsoap-lite-perl libxml-rss-perl \
libstring-crc32-perl 

Links

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱