Bob Mottram 11 年之前
父節點
當前提交
86705525ad
共有 1 個文件被更改,包括 245 次插入2 次删除
  1. 245
    2
      beaglebone.txt

+ 245
- 2
beaglebone.txt 查看文件

@@ -831,7 +831,7 @@ su
831 831
 emacs /etc/apache2/apache2.conf
832 832
 #+END_SRC
833 833
 
834
-Search for MaxClients and replace the value with 20 then save and exit.
834
+Search for MaxClients and replace the value with 10 then save and exit.
835 835
 
836 836
 In the examples below replace mydomainname.com with your own domain.
837 837
 
@@ -2016,6 +2016,20 @@ CREATE INDEX `created_contact-id` ON item(`created`, `contact-id`);
2016 2016
 quit
2017 2017
 #+END_SRC
2018 2018
 
2019
+Make sure that Friendica doesn't use too much memory.
2020
+
2021
+#+BEGIN_SRC: bash
2022
+emacs /var/www/$HOSTNAME/htdocs/.htaccess
2023
+#+END_SRC
2024
+
2025
+Append the following:
2026
+
2027
+#+BEGIN_SRC: bash
2028
+php_value memory_limit 32M
2029
+#+END_SRC
2030
+
2031
+The save ane exit.
2032
+
2019 2033
 **** Backups
2020 2034
 
2021 2035
 Make sure that the database gets backed up.  By using cron if anything goes wrong then you should be able to recover the database either from the previous day or the previous week.
@@ -2921,7 +2935,7 @@ Set the following.
2921 2935
 #+BEGIN_SRC: bash
2922 2936
 php_value upload_max_filesize 512M
2923 2937
 php_value post_max_size 512M
2924
-php_value memory_limit 128M
2938
+php_value memory_limit 32M
2925 2939
 #+END_SRC
2926 2940
 
2927 2941
 Save and exit.
@@ -3111,6 +3125,235 @@ make install
3111 3125
 pybitmessage
3112 3126
 #+END_SRC
3113 3127
 
3128
+** Collaborative Document Editing
3129
+
3130
+#+BEGIN_SRC: bash
3131
+apt-get install gzip git-core curl python libssl-dev pkg-config build-essential python g++ make checkinstall apache2 mysql-server
3132
+#+END_SRC
3133
+
3134
+Download nodejs.
3135
+
3136
+#+BEGIN_SRC: bash
3137
+cd /usr/src/
3138
+wget http://freedombone.uk.to/node.tar.gz
3139
+#+END_SRC
3140
+
3141
+Verify it.
3142
+
3143
+#+BEGIN_SRC: bash
3144
+md5sum node.tar.gz
3145
+153bdbf77b4473df2600b8ce123ef331
3146
+#+END_SRC
3147
+
3148
+Install it.
3149
+
3150
+#+BEGIN_SRC: bash
3151
+tar xzvf node.tar.gz
3152
+cd node-v*
3153
+./configure && checkinstall
3154
+#+END_SRC
3155
+
3156
+When the menu appears, select option 3 and remove the “v” in front of the version number, then press Enter to continue. Note that the previous step can take a considerable amount of time.
3157
+
3158
+Install nodejs with the following command:
3159
+
3160
+#+BEGIN_SRC: bash
3161
+dpkg -i node_*
3162
+#+END_SRC
3163
+
3164
+Create an etherpad database.
3165
+
3166
+#+BEGIN_SRC: bash
3167
+mysql -p
3168
+CREATE DATABASE etherpad CHARACTER SET utf8 COLLATE utf8_general_ci;
3169
+GRANT ALL PRIVILEGES ON etherpad.* TO etherpad@localhost IDENTIFIED BY '__yourPasswd__';
3170
+FLUSH PRIVILEGES;
3171
+exit
3172
+#+END_SRC
3173
+
3174
+Download etherpad.
3175
+
3176
+#+BEGIN_SRC: bash
3177
+export HOSTNAME=mydomainname.com
3178
+cd /var/www/$HOSTNAME/htdocs
3179
+git clone git://github.com/ether/etherpad-lite.git etherpad
3180
+#+END_SRC
3181
+
3182
+Edit the configuration file
3183
+
3184
+#+BEGIN_SRC: bash
3185
+cd etherpad
3186
+cp settings.json.template settings.json
3187
+emacs settings.json
3188
+#+END_SRC
3189
+
3190
+Change the following settings.  /rAnD0m5tRIng/ should be altered to a random string 10 characters in length.
3191
+
3192
+#+BEGIN_SRC: bash
3193
+//IP and port which etherpad should bind at
3194
+"ip": "127.0.0.1",
3195
+// set a session key
3196
+"sessionKey" : "rAnD0m5tRIng",
3197
+//configure the connection settings
3198
+ "dbType" : "mysql",
3199
+ "dbSettings" : {
3200
+   "user"    : "etherpad",
3201
+   "host"    : "localhost",
3202
+   "password": "__yourPassword__",
3203
+   "database": "etherpad"
3204
+ },
3205
+// add admin user
3206
+"users": {
3207
+ "admin": {
3208
+ "password": "__yourAdminPassword__",
3209
+ "is_admin": true
3210
+ }
3211
+},
3212
+#+END_SRC
3213
+
3214
+Save and exit, then create a system user.
3215
+
3216
+#+BEGIN_SRC: bash
3217
+adduser --system --home=/var/www/$HOSTNAME/htdocs/etherpad/ --group etherpad
3218
+chown -R etherpad: /var/www/$HOSTNAME/htdocs/etherpad/
3219
+#+END_SRC
3220
+
3221
+Create an init script using your favorite editor, changing /mydomainname.com/ to your domain name.
3222
+
3223
+#+BEGIN_SRC: bash
3224
+emacs /etc/init.d/etherpad
3225
+#+END_SRC
3226
+
3227
+Add the following:
3228
+
3229
+#+BEGIN_SRC: bash
3230
+#!/bin/sh
3231
+
3232
+### BEGIN INIT INFO
3233
+# Provides:          etherpad-lite
3234
+# Required-Start:    $local_fs $remote_fs $network $syslog
3235
+# Required-Stop:     $local_fs $remote_fs $network $syslog
3236
+# Default-Start:     2 3 4 5
3237
+# Default-Stop:      0 1 6
3238
+# Short-Description: starts etherpad lite
3239
+# Description:       starts etherpad lite using start-stop-daemon
3240
+### END INIT INFO
3241
+
3242
+PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin"
3243
+LOGFILE="/var/www/mydomainname.com/htdocs/etherpad/etherpad-lite.log"
3244
+EPLITE_DIR="/var/www/mydomainname.com/htdocs/etherpad"
3245
+EPLITE_BIN="bin/safeRun.sh"
3246
+USER="etherpad"
3247
+GROUP="etherpad"
3248
+DESC="Etherpad Lite"
3249
+NAME="etherpad-lite"
3250
+
3251
+set -e
3252
+
3253
+. /lib/lsb/init-functions
3254
+
3255
+start() {
3256
+  echo "Starting $DESC... "
3257
+
3258
+    start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
3259
+  echo "done"
3260
+}
3261
+
3262
+#We need this function to ensure the whole process tree will be killed
3263
+killtree() {
3264
+    local _pid=$1
3265
+    local _sig=${2-TERM}
3266
+    for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
3267
+        killtree ${_child} ${_sig}
3268
+    done
3269
+    kill -${_sig} ${_pid}
3270
+}
3271
+
3272
+stop() {
3273
+  echo "Stopping $DESC... "
3274
+   while test -d /proc/$(cat /var/run/$NAME.pid); do
3275
+    killtree $(cat /var/run/$NAME.pid) 15
3276
+    sleep 0.5
3277
+  done
3278
+  rm /var/run/$NAME.pid
3279
+  echo "done"
3280
+}
3281
+
3282
+status() {
3283
+  status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $?
3284
+}
3285
+
3286
+case "$1" in
3287
+  start)
3288
+      start
3289
+      ;;
3290
+  stop)
3291
+    stop
3292
+      ;;
3293
+  restart)
3294
+      stop
3295
+      start
3296
+      ;;
3297
+  status)
3298
+      status
3299
+      ;;
3300
+  *)
3301
+      echo "Usage: $NAME {start|stop|restart|status}" >&2
3302
+      exit 1
3303
+      ;;
3304
+esac
3305
+
3306
+exit 0
3307
+#+END_SRC
3308
+
3309
+Save and exit, then enable the daemon.
3310
+
3311
+#+BEGIN_SRC: bash
3312
+chmod +x /etc/init.d/etherpad
3313
+update-rc.d etherpad defaults
3314
+service etherpad start
3315
+#+END_SRC
3316
+
3317
+Update your Apache configuration.
3318
+
3319
+#+BEGIN_SRC: bash
3320
+emacs /etc/apache2/sites-available/$HOSTNAME
3321
+#+END_SRC
3322
+
3323
+Within the 443 section add the following:
3324
+
3325
+#+BEGIN_SRC: bash
3326
+    <Location /var/www/mydomainname.com/htdocs/etherpad/>
3327
+        AuthType Basic
3328
+        AuthName "Welcome to Etherpad"
3329
+        AuthUserFile /path/to/svn.passwd
3330
+        AuthGroupFile /path/to/svn.group
3331
+        Require group etherpad
3332
+    </Location>
3333
+
3334
+    <IfModule mod_proxy.c>
3335
+        ProxyVia On
3336
+        ProxyRequests Off
3337
+        ProxyPass / http://127.0.0.1:9001/
3338
+        ProxyPassReverse / http://127.0.0.1:9001/
3339
+        ProxyPreserveHost on
3340
+        <Proxy *>
3341
+            Options FollowSymLinks MultiViews
3342
+            AllowOverride All
3343
+            Order allow,deny
3344
+            allow from all
3345
+        </Proxy>
3346
+    </IfModule>
3347
+#+END_SRC
3348
+
3349
+Save and exit, then restart Apache.
3350
+
3351
+#+BEGIN_SRC: bash
3352
+apt-get install libapache2-mod-proxy-html
3353
+a2enmod proxy proxy_http headers deflate
3354
+service apache2 restart
3355
+#+END_SRC
3356
+
3114 3357
 ** Install Tripwire
3115 3358
 
3116 3359
 #+BEGIN_VERSE