So last days before Debian Squeeze will be released and we are still using Debian Lenny on this host. Everything looks like this is 100% applicable for Debian Squeeze aswell. We haven’t used Apache mod_proxy on that test host but that shouldn’t be different, please do tell.
We have used the official deb archive at etherpad.org, you will get a warning about untrusted signatures when installing these packages. Just pass it (or don’t use the packages).
Add the host to /etc/apt/sources.list
# echo “deb http://apt.etherpad.org all .” >> /etc/apt/sources.lis
Update apt package cache and install etherpad and dependencies
# aptitude update; aptitude install etherpad
In the debconf questions specify the mysql credentials, it will use “etherpad” as user and database name. You can not choose that
For hostname input “localhost” if you are planning to use it with mod_proxy as we do.
# sed “s/local/share/” /etc/init.d/etherpad > /tmp/newinit
# cp /etc/init.d/etherpad /etc/init.d/etherpad.orig
# cat /tmp/newinit > /etc/init.d/etherpad
# rm /tmp/newinit
(a backup is kept as /etherpad /etc/init.d/etherpad.orig)
Start etherpad server, the setup is reachable at http://localhost:9000
# /etc/init.d/etherpad start
Install mod_proxy (and Apache2)
# aptitude install libapache2-mod-proxy-html
and then activate the relevant modules
# a2enmod proxy
# a2enmod proxy_http
Edit the domain settings part of the etherpad configuration in /etc/etherpad/etherpad.local.properties
Add the hostname(s) you will access the etherpad service at, (no spaces allowed?).
topdomains = 22.214.171.124,localhost, localhost.localdomain,pad.bthstudent.se,pad.studsam.se
And now the final magic, add your virtual host and activate it. We will host our on two addresses; http://pad.bthstudent.se and http://pad.studsam.se.
<VirtualHost *:80>ServerAdmin email@example.com
Options ExecCgi Includes MultiViews Indexes FollowSymlinks
<Proxy *>Order deny,allow
Allow from all
Save it in /etc/apache2/sites-available/pad.bthstudent.se
Activate the virtual host and reload the apache configuration.
# a2ensite pad.bthstudent.se
# /etc/init.d/apache2 reload
Things to remember; we have no modified the init script. Upon upgrade the script will most probably be broken again. This setup uses a local mysql server, this might not be what you want (read on!).
To move the database backend to an external server.
Get all information from the local mysql server.
# mysqldump -u MYSQLUSER -pMYSQLPASSWORD etherpad > /tmp/etherpad.sql
To read the dump file into a new database you need some higher privileges to be able to lock tables and create tables and stuff like that.
# mysql -u REMOTEUSER -pREMOTEPASSWORD -hREMOTEHOST etherpad < /tmp/etherpad.sql
Edit the database settings part of the etherpad configuration in /etc/etherpad/etherpad.local.properties
etherpad.SQL_JDBC_URL = jdbc:mysql://sql.bthstudent.se:3306/etherpad
etherpad.SQL_PASSWORD = MYSQLPASSWORD
etherpad.SQL_USERNAME = MYSQLUSER
Restart the etherpad service and apache, stop the local mysql service.
# /etc/init.d/apache2 stop
# /etc/init.d/mysql stop
# /etc/init.d/etherpad restart
# /etc/init.d/apache2 start
A final note!
PLEASE help us with getting this information as accurate as possible. Use the comment field below or contact us via irc.bsnet.se in #sis (or private ping brother- at oftc and freenode).
 This package has some serious dependencies!
Java and Scala just to run the etherpad service. MySQL to support it is installed completely even thought the service does not have to be local!
(This text is CC-SA, this means that anything adapted from it must be CC-SA or similar. No attribution is required.)