Deprecate etherpad - it just consumes too much CPU and makes the system unstable
This commit is contained in:
parent
329ed57752
commit
c61b10115d
220
beaglebone.txt
220
beaglebone.txt
|
@ -6544,226 +6544,6 @@ Now visit your web site at https://mydomainname.com and you should notice that t
|
||||||
|
|
||||||
The following items have been deprecated until such time as a successful installation is achieved.
|
The following items have been deprecated until such time as a successful installation is achieved.
|
||||||
|
|
||||||
** Collaborative Document Editing
|
|
||||||
|
|
||||||
#+BEGIN_VERSE
|
|
||||||
/Openness and participation are antidotes to surveillance and control./
|
|
||||||
|
|
||||||
-- Howard Rheingold
|
|
||||||
#+END_VERSE
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
apt-get install nodejs-legacy
|
|
||||||
curl https://npmjs.org/install.sh | sh
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Create an etherpad database.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
mysql -p
|
|
||||||
CREATE DATABASE etherpad CHARACTER SET utf8 COLLATE utf8_general_ci;
|
|
||||||
GRANT ALL PRIVILEGES ON etherpad.* TO etherpad@localhost IDENTIFIED BY '__yourPasswd__';
|
|
||||||
FLUSH PRIVILEGES;
|
|
||||||
exit
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Download etherpad.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
export HOSTNAME=mydomainname.com
|
|
||||||
cd /var/www/$HOSTNAME/htdocs
|
|
||||||
git clone git://github.com/ether/etherpad-lite.git etherpad
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Edit the configuration file
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
cd /var/www/$HOSTNAME/htdocs/etherpad
|
|
||||||
cp settings.json.template settings.json
|
|
||||||
emacs /var/www/$HOSTNAME/htdocs/etherpad/settings.json
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Change the following settings. /rAnD0m5tRIng/ should be altered to a random string 10 characters in length.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
//IP and port which etherpad should bind at
|
|
||||||
"ip": "127.0.0.1",
|
|
||||||
// set a session key
|
|
||||||
"sessionKey" : "rAnD0m5tRIng",
|
|
||||||
//configure the connection settings
|
|
||||||
"dbType" : "mysql",
|
|
||||||
"dbSettings" : {
|
|
||||||
"user" : "etherpad",
|
|
||||||
"host" : "localhost",
|
|
||||||
"password": "__yourPassword__",
|
|
||||||
"database": "etherpad"
|
|
||||||
},
|
|
||||||
// add admin user
|
|
||||||
"users": {
|
|
||||||
"admin": {
|
|
||||||
"password": "__yourAdminPassword__",
|
|
||||||
"is_admin": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Save and exit, then create a system user.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
adduser --system --home=/var/www/$HOSTNAME/htdocs/etherpad/ --group etherpad
|
|
||||||
chown -R etherpad: /var/www/$HOSTNAME/htdocs/etherpad/
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Create an init script using your favorite editor.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
emacs /etc/init.d/etherpad
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Add the following, replacing /mydomainname.com/ with your domain name:
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: etherpad-lite
|
|
||||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
|
||||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: starts etherpad lite
|
|
||||||
# Description: starts etherpad lite using start-stop-daemon
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin"
|
|
||||||
LOGFILE="/var/www/mydomainname.com/htdocs/etherpad/etherpad-lite.log"
|
|
||||||
EPLITE_DIR="/var/www/mydomainname.com/htdocs/etherpad"
|
|
||||||
EPLITE_BIN="bin/safeRun.sh"
|
|
||||||
USER="etherpad"
|
|
||||||
GROUP="etherpad"
|
|
||||||
DESC="Etherpad Lite"
|
|
||||||
NAME="etherpad-lite"
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
. /lib/lsb/init-functions
|
|
||||||
|
|
||||||
start() {
|
|
||||||
echo "Starting $DESC... "
|
|
||||||
|
|
||||||
start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
|
|
||||||
echo "done"
|
|
||||||
}
|
|
||||||
|
|
||||||
#We need this function to ensure the whole process tree will be killed
|
|
||||||
killtree() {
|
|
||||||
local _pid=$1
|
|
||||||
local _sig=${2-TERM}
|
|
||||||
for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
|
|
||||||
killtree ${_child} ${_sig}
|
|
||||||
done
|
|
||||||
kill -${_sig} ${_pid}
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
echo "Stopping $DESC... "
|
|
||||||
while test -d /proc/$(cat /var/run/$NAME.pid); do
|
|
||||||
killtree $(cat /var/run/$NAME.pid) 15
|
|
||||||
sleep 0.5
|
|
||||||
done
|
|
||||||
rm /var/run/$NAME.pid
|
|
||||||
echo "done"
|
|
||||||
}
|
|
||||||
|
|
||||||
status() {
|
|
||||||
status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $?
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
stop
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $NAME {start|stop|restart|status}" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Save and exit, then enable the daemon.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
chmod +x /etc/init.d/etherpad
|
|
||||||
update-rc.d etherpad defaults
|
|
||||||
service etherpad start
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Update your Apache configuration.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
emacs /etc/apache2/sites-available/$HOSTNAME
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Within the section which begins with *<VirtualHost *:443>* add the following:
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
<Location /etherpad>
|
|
||||||
ProxyPass http://localhost:9001/
|
|
||||||
ProxyPassReverse http://localhost:9001/
|
|
||||||
|
|
||||||
Order allow,deny
|
|
||||||
allow from all
|
|
||||||
|
|
||||||
AuthName "Welcome to Etherpad"
|
|
||||||
AuthUserFile /home/mydomainname.com/public_html/.htpasswd
|
|
||||||
AuthGroupFile /home/mydomainname.com/public_html/.htgroup
|
|
||||||
AuthType Basic
|
|
||||||
Require group etherpad
|
|
||||||
</Location>
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Save and exit, then restart Apache.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
apt-get install libapache2-mod-proxy-html
|
|
||||||
a2enmod proxy proxy_http headers deflate
|
|
||||||
service apache2 restart
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Create some passwords for users.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
mkdir /home/$HOSTNAME
|
|
||||||
mkdir /home/$HOSTNAME/public_html
|
|
||||||
htpasswd -c /home/$HOSTNAME/public_html/.htpasswd myusername
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Create a user group.
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
emacs /home/$HOSTNAME/public_html/.htgroup
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Add the following:
|
|
||||||
|
|
||||||
#+BEGIN_SRC: bash
|
|
||||||
etherpad: myusername
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Save and exit.
|
|
||||||
|
|
||||||
** Install a VoIP server
|
** Install a VoIP server
|
||||||
|
|
||||||
#+BEGIN_VERSE
|
#+BEGIN_VERSE
|
||||||
|
|
Loading…
Reference in New Issue