Bob Mottram преди 11 години
родител
ревизия
994036194f
променени са 1 файла, в които са добавени 33 реда и са изтрити 32 реда
  1. 33
    32
      beaglebone.txt

+ 33
- 32
beaglebone.txt Целия файл

260
 apt-get install emacs
260
 apt-get install emacs
261
 #+END_SRC
261
 #+END_SRC
262
 
262
 
263
+** Create a swap file
264
+
265
+Without a swap file the system may occasionally run out of memory and crash, since the Beaglebone only has 512MB of RAM.  The following commands will create a 1 GB file:
266
+
267
+#+BEGIN_SRC: bash
268
+mkdir -p /var/cache/swap/
269
+dd if=/dev/zero of=/var/cache/swap/swapfile bs=1M count=1024
270
+chmod 600 /var/cache/swap/swapfile
271
+mkswap /var/cache/swap/swapfile
272
+swapon /var/cache/swap/swapfile
273
+#+END_SRC
274
+
275
+To tell the OS to load this swapfile on each start up.
276
+
277
+#+BEGIN_SRC: bash
278
+emacs /etc/fstab
279
+#+END_SRC
280
+
281
+Append the following line:
282
+
283
+#+BEGIN_SRC: bash
284
+/var/cache/swap/swapfile    none    swap    sw    0   0
285
+#+END_SRC
286
+
287
+Then save and exit.
288
+
289
+To verify that the swapfile is accessilble type /top/ and look for the line which begins with "KiB Swap".  Probably there will be zero bytes used, but this might be non-zero when the system is under some load (for example getting a lot of web views or being crawled by a search engine).  CTRL-C exits from the /top/ command.
290
+
263
 ** Random number generation
291
 ** Random number generation
264
 
292
 
265
 #+BEGIN_VERSE
293
 #+BEGIN_VERSE
3128
 ** Collaborative Document Editing
3156
 ** Collaborative Document Editing
3129
 
3157
 
3130
 #+BEGIN_SRC: bash
3158
 #+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_*
3159
+echo "deb http://ftp.us.debian.org/debian wheezy-backports main" >> /etc/apt/sources.list
3160
+apt-get update
3161
+apt-get install nodejs-legacy
3162
+curl https://npmjs.org/install.sh | sh
3162
 #+END_SRC
3163
 #+END_SRC
3163
 
3164
 
3164
 Create an etherpad database.
3165
 Create an etherpad database.
3224
 su -c "/var/www/$HOSTNAME/htdocs/etherpad/bin/run.sh" -s /bin/bash etherpad
3225
 su -c "/var/www/$HOSTNAME/htdocs/etherpad/bin/run.sh" -s /bin/bash etherpad
3225
 #+END_SRC
3226
 #+END_SRC
3226
 
3227
 
3227
-If it ran without exiting abnormally then kill the process.
3228
+If it ran without exiting abnormally or complaining about node.js being missing then kill the process.
3228
 
3229
 
3229
 #+BEGIN_SRC: bash
3230
 #+BEGIN_SRC: bash
3230
 pkill -u etherpad
3231
 pkill -u etherpad