|
@@ -6544,226 +6544,6 @@ Now visit your web site at https://mydomainname.com and you should notice that t
|
6544
|
6544
|
|
6545
|
6545
|
The following items have been deprecated until such time as a successful installation is achieved.
|
6546
|
6546
|
|
6547
|
|
-** Collaborative Document Editing
|
6548
|
|
-
|
6549
|
|
-#+BEGIN_VERSE
|
6550
|
|
-/Openness and participation are antidotes to surveillance and control./
|
6551
|
|
-
|
6552
|
|
-#+END_VERSE
|
6553
|
|
-
|
6554
|
|
-#+BEGIN_SRC: bash
|
6555
|
|
-apt-get install nodejs-legacy
|
6556
|
|
-curl https://npmjs.org/install.sh | sh
|
6557
|
|
-#+END_SRC
|
6558
|
|
-
|
6559
|
|
-Create an etherpad database.
|
6560
|
|
-
|
6561
|
|
-#+BEGIN_SRC: bash
|
6562
|
|
-mysql -p
|
6563
|
|
-CREATE DATABASE etherpad CHARACTER SET utf8 COLLATE utf8_general_ci;
|
6564
|
|
-GRANT ALL PRIVILEGES ON etherpad.* TO etherpad@localhost IDENTIFIED BY '__yourPasswd__';
|
6565
|
|
-FLUSH PRIVILEGES;
|
6566
|
|
-exit
|
6567
|
|
-#+END_SRC
|
6568
|
|
-
|
6569
|
|
-Download etherpad.
|
6570
|
|
-
|
6571
|
|
-#+BEGIN_SRC: bash
|
6572
|
|
-export HOSTNAME=mydomainname.com
|
6573
|
|
-cd /var/www/$HOSTNAME/htdocs
|
6574
|
|
-git clone git://github.com/ether/etherpad-lite.git etherpad
|
6575
|
|
-#+END_SRC
|
6576
|
|
-
|
6577
|
|
-Edit the configuration file
|
6578
|
|
-
|
6579
|
|
-#+BEGIN_SRC: bash
|
6580
|
|
-cd /var/www/$HOSTNAME/htdocs/etherpad
|
6581
|
|
-cp settings.json.template settings.json
|
6582
|
|
-emacs /var/www/$HOSTNAME/htdocs/etherpad/settings.json
|
6583
|
|
-#+END_SRC
|
6584
|
|
-
|
6585
|
|
-Change the following settings. /rAnD0m5tRIng/ should be altered to a random string 10 characters in length.
|
6586
|
|
-
|
6587
|
|
-#+BEGIN_SRC: bash
|
6588
|
|
-//IP and port which etherpad should bind at
|
6589
|
|
-"ip": "127.0.0.1",
|
6590
|
|
-// set a session key
|
6591
|
|
-"sessionKey" : "rAnD0m5tRIng",
|
6592
|
|
-//configure the connection settings
|
6593
|
|
- "dbType" : "mysql",
|
6594
|
|
- "dbSettings" : {
|
6595
|
|
- "user" : "etherpad",
|
6596
|
|
- "host" : "localhost",
|
6597
|
|
- "password": "__yourPassword__",
|
6598
|
|
- "database": "etherpad"
|
6599
|
|
- },
|
6600
|
|
-// add admin user
|
6601
|
|
-"users": {
|
6602
|
|
- "admin": {
|
6603
|
|
- "password": "__yourAdminPassword__",
|
6604
|
|
- "is_admin": true
|
6605
|
|
- }
|
6606
|
|
-},
|
6607
|
|
-#+END_SRC
|
6608
|
|
-
|
6609
|
|
-Save and exit, then create a system user.
|
6610
|
|
-
|
6611
|
|
-#+BEGIN_SRC: bash
|
6612
|
|
-adduser --system --home=/var/www/$HOSTNAME/htdocs/etherpad/ --group etherpad
|
6613
|
|
-chown -R etherpad: /var/www/$HOSTNAME/htdocs/etherpad/
|
6614
|
|
-#+END_SRC
|
6615
|
|
-
|
6616
|
|
-Create an init script using your favorite editor.
|
6617
|
|
-
|
6618
|
|
-#+BEGIN_SRC: bash
|
6619
|
|
-emacs /etc/init.d/etherpad
|
6620
|
|
-#+END_SRC
|
6621
|
|
-
|
6622
|
|
-Add the following, replacing /mydomainname.com/ with your domain name:
|
6623
|
|
-
|
6624
|
|
-#+BEGIN_SRC: bash
|
6625
|
|
-#!/bin/sh
|
6626
|
|
-
|
6627
|
|
-### BEGIN INIT INFO
|
6628
|
|
-# Provides: etherpad-lite
|
6629
|
|
-# Required-Start: $local_fs $remote_fs $network $syslog
|
6630
|
|
-# Required-Stop: $local_fs $remote_fs $network $syslog
|
6631
|
|
-# Default-Start: 2 3 4 5
|
6632
|
|
-# Default-Stop: 0 1 6
|
6633
|
|
-# Short-Description: starts etherpad lite
|
6634
|
|
-# Description: starts etherpad lite using start-stop-daemon
|
6635
|
|
-### END INIT INFO
|
6636
|
|
-
|
6637
|
|
-PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin"
|
6638
|
|
-LOGFILE="/var/www/mydomainname.com/htdocs/etherpad/etherpad-lite.log"
|
6639
|
|
-EPLITE_DIR="/var/www/mydomainname.com/htdocs/etherpad"
|
6640
|
|
-EPLITE_BIN="bin/safeRun.sh"
|
6641
|
|
-USER="etherpad"
|
6642
|
|
-GROUP="etherpad"
|
6643
|
|
-DESC="Etherpad Lite"
|
6644
|
|
-NAME="etherpad-lite"
|
6645
|
|
-
|
6646
|
|
-set -e
|
6647
|
|
-
|
6648
|
|
-. /lib/lsb/init-functions
|
6649
|
|
-
|
6650
|
|
-start() {
|
6651
|
|
- echo "Starting $DESC... "
|
6652
|
|
-
|
6653
|
|
- start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
|
6654
|
|
- echo "done"
|
6655
|
|
-}
|
6656
|
|
-
|
6657
|
|
-#We need this function to ensure the whole process tree will be killed
|
6658
|
|
-killtree() {
|
6659
|
|
- local _pid=$1
|
6660
|
|
- local _sig=${2-TERM}
|
6661
|
|
- for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
|
6662
|
|
- killtree ${_child} ${_sig}
|
6663
|
|
- done
|
6664
|
|
- kill -${_sig} ${_pid}
|
6665
|
|
-}
|
6666
|
|
-
|
6667
|
|
-stop() {
|
6668
|
|
- echo "Stopping $DESC... "
|
6669
|
|
- while test -d /proc/$(cat /var/run/$NAME.pid); do
|
6670
|
|
- killtree $(cat /var/run/$NAME.pid) 15
|
6671
|
|
- sleep 0.5
|
6672
|
|
- done
|
6673
|
|
- rm /var/run/$NAME.pid
|
6674
|
|
- echo "done"
|
6675
|
|
-}
|
6676
|
|
-
|
6677
|
|
-status() {
|
6678
|
|
- status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $?
|
6679
|
|
-}
|
6680
|
|
-
|
6681
|
|
-case "$1" in
|
6682
|
|
- start)
|
6683
|
|
- start
|
6684
|
|
- ;;
|
6685
|
|
- stop)
|
6686
|
|
- stop
|
6687
|
|
- ;;
|
6688
|
|
- restart)
|
6689
|
|
- stop
|
6690
|
|
- start
|
6691
|
|
- ;;
|
6692
|
|
- status)
|
6693
|
|
- status
|
6694
|
|
- ;;
|
6695
|
|
- *)
|
6696
|
|
- echo "Usage: $NAME {start|stop|restart|status}" >&2
|
6697
|
|
- exit 1
|
6698
|
|
- ;;
|
6699
|
|
-esac
|
6700
|
|
-
|
6701
|
|
-exit 0
|
6702
|
|
-#+END_SRC
|
6703
|
|
-
|
6704
|
|
-Save and exit, then enable the daemon.
|
6705
|
|
-
|
6706
|
|
-#+BEGIN_SRC: bash
|
6707
|
|
-chmod +x /etc/init.d/etherpad
|
6708
|
|
-update-rc.d etherpad defaults
|
6709
|
|
-service etherpad start
|
6710
|
|
-#+END_SRC
|
6711
|
|
-
|
6712
|
|
-Update your Apache configuration.
|
6713
|
|
-
|
6714
|
|
-#+BEGIN_SRC: bash
|
6715
|
|
-emacs /etc/apache2/sites-available/$HOSTNAME
|
6716
|
|
-#+END_SRC
|
6717
|
|
-
|
6718
|
|
-Within the section which begins with *<VirtualHost *:443>* add the following:
|
6719
|
|
-
|
6720
|
|
-#+BEGIN_SRC: bash
|
6721
|
|
- <Location /etherpad>
|
6722
|
|
- ProxyPass http://localhost:9001/
|
6723
|
|
- ProxyPassReverse http://localhost:9001/
|
6724
|
|
-
|
6725
|
|
- Order allow,deny
|
6726
|
|
- allow from all
|
6727
|
|
-
|
6728
|
|
- AuthName "Welcome to Etherpad"
|
6729
|
|
- AuthUserFile /home/mydomainname.com/public_html/.htpasswd
|
6730
|
|
- AuthGroupFile /home/mydomainname.com/public_html/.htgroup
|
6731
|
|
- AuthType Basic
|
6732
|
|
- Require group etherpad
|
6733
|
|
- </Location>
|
6734
|
|
-#+END_SRC
|
6735
|
|
-
|
6736
|
|
-Save and exit, then restart Apache.
|
6737
|
|
-
|
6738
|
|
-#+BEGIN_SRC: bash
|
6739
|
|
-apt-get install libapache2-mod-proxy-html
|
6740
|
|
-a2enmod proxy proxy_http headers deflate
|
6741
|
|
-service apache2 restart
|
6742
|
|
-#+END_SRC
|
6743
|
|
-
|
6744
|
|
-Create some passwords for users.
|
6745
|
|
-
|
6746
|
|
-#+BEGIN_SRC: bash
|
6747
|
|
-mkdir /home/$HOSTNAME
|
6748
|
|
-mkdir /home/$HOSTNAME/public_html
|
6749
|
|
-htpasswd -c /home/$HOSTNAME/public_html/.htpasswd myusername
|
6750
|
|
-#+END_SRC
|
6751
|
|
-
|
6752
|
|
-Create a user group.
|
6753
|
|
-
|
6754
|
|
-#+BEGIN_SRC: bash
|
6755
|
|
-emacs /home/$HOSTNAME/public_html/.htgroup
|
6756
|
|
-#+END_SRC
|
6757
|
|
-
|
6758
|
|
-Add the following:
|
6759
|
|
-
|
6760
|
|
-#+BEGIN_SRC: bash
|
6761
|
|
-etherpad: myusername
|
6762
|
|
-#+END_SRC
|
6763
|
|
-
|
6764
|
|
-Save and exit.
|
6765
|
|
-
|
6766
|
6547
|
** Install a VoIP server
|
6767
|
6548
|
|
6768
|
6549
|
#+BEGIN_VERSE
|