LiveJournal Server

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
第31行: 第31行:
 
  libdatetime-perl libdigest-hmac-perl perlmagick libmath-bigint-gmp-perl libnet-dns-perl   
 
  libdatetime-perl libdigest-hmac-perl perlmagick libmath-bigint-gmp-perl libnet-dns-perl   
 
  libxml-atom-perl libxml-simple-perl
 
  libxml-atom-perl libxml-simple-perl
 +
 +
[Checking for Perl Modules....]
 +
Missing optional module Crypt::DH: Required for OpenID support.
 +
Missing optional module URI::Fetch: Required for OpenID support.
 +
OpenID 目前还不知道如何设置 :(
 +
 +
Problem:
 +
  * Missing perl module: Unicode::CheckUTF8
  
 
  cp doc/ljconfig.pl.txt cgi-bin/ljconfig.pl // 一定要在创建数据库前设定
 
  cp doc/ljconfig.pl.txt cgi-bin/ljconfig.pl // 一定要在创建数据库前设定
第51行: 第59行:
 
  http://docs.huihoo.com/livejournal/server/lj.install.apache_setup.example.html
 
  http://docs.huihoo.com/livejournal/server/lj.install.apache_setup.example.html
 
  #crontab -e (同下)
 
  #crontab -e (同下)
/etc/init.d/apache-perl start
 
[error] Can't locate /home/lj/cgi-bin/console.pl
 
PerlRequire  /home/lj/cgi-bin/modperl.pl  这句有错,看来 mod_perl 没安装好
 
# apt-get install apache-perl
 
 
  vi /etc/apache-perl/httpd.conf
 
  vi /etc/apache-perl/httpd.conf
  http://localhost/login.bml
+
  /etc/init.d/apache-perl start
  system/system // OK, 安装成功 :)
+
  不能启动
 +
新版本还无法安装成功 :(
 
------------------------------------------------------  
 
------------------------------------------------------  
 
老版本的安装
 
老版本的安装

2007年2月19日 (一) 19:38的版本

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

# apt-get install apache 
# apt-get install libapache-mod-perl apache-perl

新版本的安装

$ cd $LJHOME // 注意不要以 root 帐号操作
/lj$ mkdir cvs
/lj$ cd cvs/
/lj/cvs$
/lj/cvs$ svn co http://code.sixapart.com/svn/vcv/trunk vcv
/lj/cvs$ svn co http://code.sixapart.com/svn/livejournal/trunk livejournal 
$ cd $LJHOME
/lj$ cvs/vcv/bin/vcv --conf=cvs/livejournal/cvs/multicvs.conf --checkout -c -s
Then in the future, to stay updated:

$ bin/cvsreport.pl -u -c -s

(cvsreport.pl is just a front-end to vcv)

$ bin/checkconfig.pl
# apt-get install libclass-accessor-perl libclass-autouse-perl libclass-trigger-perl  
libdatetime-perl libdigest-hmac-perl perlmagick libmath-bigint-gmp-perl libnet-dns-perl  
libxml-atom-perl libxml-simple-perl

[Checking for Perl Modules....]
Missing optional module Crypt::DH: Required for OpenID support.
Missing optional module URI::Fetch: Required for OpenID support.
OpenID 目前还不知道如何设置 :(

Problem:

 * Missing perl module: Unicode::CheckUTF8
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;
$ bin/upgrading/update-db.pl --runsql --populate
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.# Done.
$ bin/upgrading/make_system.pl
$ bin/upgrading/texttool.pl load // 成功创建 livejournal 数据库
#vi cgi-bin/ljconfig.pl
$DOMAIN = "debian";
$SITEROOT = "$DOMAIN";
#update /etc/apache-perl/httpd.conf
http://docs.huihoo.com/livejournal/server/lj.install.apache_setup.example.html
#crontab -e (同下)
vi /etc/apache-perl/httpd.conf
/etc/init.d/apache-perl start 
不能启动
新版本还无法安装成功 :(

老版本的安装

LJHOME=/home/lj; export LJHOME
wget http://www.livejournal.org/download/code/ // 版本有些旧,可通过 svn 获得最新版
svn co http://code.sixapart.com/svn/livejournal/trunk/ // 参照上面新版本的安装
./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

$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 
$ mysql -uroot -p
mysql> CREATE DATABASE livejournal;
mysql> GRANT ALL PRIVILEGES ON livejournal.* TO lj@'localhost' IDENTIFIED BY 'ljpass';  
mysql > flush privileges;
$ bin/upgrading/update-db.pl --runsql --populate
$ bin/upgrading/texttool.pl load // 成功创建 livejournal 数据库

crontab -e
LJHOME=/home/lj
[email protected]
# Essential:
* */12 * * * /home/lj/bin/ljmaint.pl clean_caches >/dev/null
# Optional, if you want birthday mail, and the random user feature:
# (you can remove parts)
5 1 * * * /home/lj/bin/ljmaint.pl bdaymail build_randomuserset >/dev/null
# If you want statistics:
30 1 * * * /home/lj/bin/ljmaint.pl genstats genstatspics genstats_size >/dev/null
5 2 * * 0 /home/lj/bin/ljmaint.pl genstats_weekly > /dev/null
# Various tasks
15 1 * * * /home/lj/bin/ljmaint.pl joinmail > /dev/null
30 * * * * /home/lj/bin/ljmaint.pl synsuck > /dev/null
5 2 * * 0 /home/lj/bin/ljmaint.pl memeclean > /dev/null
# If you're running a high-load site with $LJ::BUFFER_QUERIES on,
# there's another one to install:
*/5 * * * * /home/lj/bin/qbufferd.pl >/dev/null
apachectl restart
$LJHOME/bin/upgrading/make_system.pl

http://localhost/login.bml
system/system // OK, 安装成功 :)

Links

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

变换
操作
导航
工具箱