現在流行的架站方式已經開始朝weblog方式了,於是我花了點時間安裝並整理了roller的自動安裝步驟,可以copy & paste方式完成一部份,剩下來的修改就得自己動手了。
底下整段copy下來,貼到root的shell
SETUP_DIR=/home/yoursite/download
INSTALL_DIR=/home/yoursite/www
CATALINA_HOME=/var/tomcat5
cd $SETUP_DIR
wget
http://people.apache.org/dist/incubator/roller/apache-roller-3.0-incubating.tar.gz
tar zxvf apache-roller-3.0-incubating.tar.gz
export ROLLER=$SETUP_DIR/apache-roller-3.0-incubating/webapp/roller
wget
https://roller.dev.java.net/files/documents/190/40575/required-jars-roller-3.0-incubating.tar.gz
tar zxvf required-jars-roller-3.0-incubating.tar.gz
cd $CATALINA_HOME/common/lib
wget
http://jdbc.postgresql.org/download/postgresql-8.2-504.jdbc3.jar
mkdir -p $ROLLER/roller_data/uploads
mkdir -p $ROLLER/roller_data/search-index
echo 'uploads.dir='$INSTALL_DIR'/roller/roller_data/uploads
search.index.dir='$INSTALL_DIR'/roller/roller_data/search-index' > $ROLLER/WEB-INF/classes/roller-custom.properties
su postgres
psql -c "create user scott createdb;" template1
psql -c "create database roller with encoding 'unicode';" -U scott template1
psql -c "alter user scott nocreatedb;" template1
psql -c "alter user scott with encrypted password 'tiger';" template1
psql roller scott -f $ROLLER/WEB-INF/dbscripts/postgresql/createdb.sql
exit
cp -rf $ROLLER $INSTALL_DIR/roller
chown -R yoursite:tomcat $INSTALL_DIR/roller
chmod g+w $INSTALL_DIR/roller
chmod -R g+w $INSTALL_DIR/roller/roller_data
修改server.xml中的Connector,加上
URIEncoding="UTF-8"
編輯/var/robust/worker1/conf/Catalina/www.yoursite.com/roller.xml
<Context path="/roller" docBase="roller" debug="0" reloadable="true">
<Resource name="jdbc/rollerdb" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/roller"
username="scott"
password="tiger"
maxActive="20"
maxIdle="3"
removeAbandoned="true"
maxWait="3000" />
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session" mail.smtp.host="smtp.yoursite.com" />
</Context>
修改/home/yoursite/www/roller/WEB-INF/classes/hibernate.cfg.xml
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
修改/etc/httpd/conf.d/mod_jk.conf,加上
JkMount /roller/* loadbalancer
重新啟動Tomcat和Apache