Explorar el Código

Graduating pump.io to working status

Bob Mottram hace 11 años
padre
commit
5f400b088d
Se han modificado 1 ficheros con 127 adiciones y 105 borrados
  1. 127
    105
      beaglebone.txt

+ 127
- 105
beaglebone.txt Ver fichero

5390
 
5390
 
5391
 When following other GNU Social users enter the URL of your profile.  For example, https://mygnusocialdomain/myusername
5391
 When following other GNU Social users enter the URL of your profile.  For example, https://mygnusocialdomain/myusername
5392
 
5392
 
5393
+*** pump.io
5394
+
5395
+For a pump.io site you will need a separate domain/subdomain, so see [[Setting up a web site]] for details of how to create an Apache configuration for your site.  If you're using freedns then you will need to create a new subdomain.
5396
+
5397
+#+BEGIN_SRC: bash
5398
+apt-get update && apt-get install redis-server nodejs-legacy graphicsmagick git-core screen
5399
+cd /opt
5400
+git clone https://github.com/e14n/pump.io.git
5401
+cd /opt/pump.io
5402
+npm install
5403
+npm install databank-redis
5404
+#+END_SRC
5405
+
5406
+Edit the configuration file.
5407
+
5408
+#+BEGIN_SRC: bash
5409
+emacs /etc/pump.io.json
5410
+#+END_SRC
5411
+
5412
+Add the following, replacing /mypumpiodomainname.com/ with your domain name.
5413
+
5414
+#+BEGIN_SRC: bash
5415
+{
5416
+    "driver": "redis",
5417
+    "params": {"host":"localhost","port":6379},
5418
+    "secret":  "A long random string",
5419
+    "noweb":  false,
5420
+    "site":  "Name of my pump.io site",
5421
+    "owner":  "My name or organisation",
5422
+    "ownerURL":  "https://mypumpiodomainname.com/",
5423
+    "port":  7270,
5424
+    "urlPort": 443,
5425
+    "hostname":  "mypumpiodomainname.com",
5426
+    "address":  "localhost",
5427
+    "nologger":  false,
5428
+    "serverUser":  "pumpio",
5429
+    "key":  "/var/local/pump.io/keys/mypumpiodomainname.com.key",
5430
+    "cert":  "/var/local/pump.io/keys/mypumpiodomainname.com.crt",
5431
+    "uploaddir": "/var/local/pump.io/uploads",
5432
+    "debugClient": false,
5433
+    "firehose": "ofirehose.example",
5434
+	"logfile": "/var/local/pump.io/pump.io.log",
5435
+    "disableRegistration": false
5436
+}
5437
+#+END_SRC
5438
+
5439
+Save and exit.
5440
+
5441
+#+BEGIN_SRC: bash
5442
+export HOSTNAME=mypumpiodomainname.com
5443
+mkdir /var/local/pump.io
5444
+mkdir /var/local/pump.io/uploads
5445
+mkdir /var/local/pump.io/keys
5446
+cp /etc/ssl/private/$HOSTNAME.key /var/local/pump.io/keys
5447
+cp /etc/ssl/certs/$HOSTNAME.crt /var/local/pump.io/keys
5448
+useradd -s /bin/bash -d /var/local/pump.io pumpio
5449
+chown -R pumpio:pumpio /var/local/pump.io
5450
+chmod 400 /var/local/pump.io/keys/*
5451
+mkdir /tmp/apache2
5452
+cd /tmp/apache2
5453
+apt-get build-dep apache2
5454
+apt-get install autoconf
5455
+apt-get source apache2
5456
+cd apache2-*
5457
+wget http://freedombone.uk.to/apache-2.2-wstunnel.patch
5458
+sha256sum apache-2.2-wstunnel.patch
5459
+cfc4866da2688a8eb76e0300cf16b52539ef4e525053a3851d4b6bba9a77e439
5460
+
5461
+patch -p1 -i apache-2.2-wstunnel.patch
5462
+autoconf
5463
+./configure --enable-so --enable-proxy=shared --enable-proxy-wstunnel=shared
5464
+make
5465
+cp modules/proxy/.libs/mod_proxy_wstunnel.so  /usr/lib/apache2/modules/
5466
+cd /etc/apache2/mods-enabled
5467
+ln -s /usr/lib/apache2/modules/mod_proxy_wstunnel.so ../mods-available/proxy_wstunnel.load
5468
+#+END_SRC
5469
+
5470
+Within the section of your Apache site configuration:
5471
+
5472
+#+BEGIN_SRC: bash
5473
+emacs /etc/apache2/sites-available/mypumpiodomainname.com
5474
+#+END_SRC
5475
+
5476
+Add the following in the section which begins with *<VirtualHost *:443>*.
5477
+
5478
+#+BEGIN_SRC: bash
5479
+    LoadModule proxy_wstunnel_module /usr/lib/apache2/modules/mod_proxy_wstunnel.so
5480
+
5481
+    <Location /main/realtime/sockjs>
5482
+        ProxyPass wss://localhost/main/realtime/sockjs
5483
+        ProxyPassReverse wss://localhost/main/realtime/sockjs
5484
+    </Location>
5485
+
5486
+#    <LocationMatch ".*\.(jpg|png|gif)$">
5487
+#        CacheEnable disk
5488
+#    </LocationMatch>
5489
+
5490
+    ProxyVia On
5491
+    ProxyPreserveHost On
5492
+    SSLProxyEngine On
5493
+
5494
+    ProxyPass / https://localhost:7270/
5495
+    ProxyPassReverse / https://localhost:7270/
5496
+#+END_SRC
5497
+
5498
+Save and exit.
5499
+
5500
+#+BEGIN_SRC: bash
5501
+a2enmod cache
5502
+a2enmod disk_cache
5503
+apachectl configtest
5504
+service apache2 restart
5505
+#+END_SRC
5506
+
5507
+Now you can run the pump.io server:
5508
+
5509
+#+BEGIN_SRC: bash
5510
+npm install forever -g
5511
+su - pumpio -c 'cd /opt/pump.io && forever ./bin/pump &'
5512
+#+END_SRC
5513
+
5514
+Now visit your pump.io site by navigating to:
5515
+
5516
+https://mypumpiodomainname.com
5517
+
5518
+and adding a new user.  If you wish this to be a single user node not open to the general public (including spammers and sockpuppets) then edit */etc/pump.io.json* and set *disableRegistration* to *true*.  After making that change reboot the BBB by typing "reboot".
5519
+
5393
 ** Install Tripwire
5520
 ** Install Tripwire
5394
 
5521
 
5395
 #+BEGIN_VERSE
5522
 #+BEGIN_VERSE
6098
 
6225
 
6099
 See documentation in /usr/share/doc/kune/INSTALL.gz
6226
 See documentation in /usr/share/doc/kune/INSTALL.gz
6100
 
6227
 
6101
-** pump.io
6102
-
6103
-For a pump.io site you will need a separate domain/subdomain, so see [[Setting up a web site]] for details of how to create an Apache configuration for your site.  If you're using freedns then you will need to create a new subdomain.
6104
-
6105
-#+BEGIN_SRC: bash
6106
-apt-get update && apt-get install redis-server nodejs-legacy graphicsmagick git-core screen
6107
-cd /opt
6108
-git clone https://github.com/e14n/pump.io.git
6109
-cd /opt/pump.io
6110
-npm install
6111
-#+END_SRC
6112
-
6113
-Edit the configuration file.
6114
-
6115
-#+BEGIN_SRC: bash
6116
-emacs /etc/pump.io.json
6117
-#+END_SRC
6118
-
6119
-Add the following, replacing /mypumpiodomainname.com/ with your domain name.
6120
-
6121
-#+BEGIN_SRC: bash
6122
-{
6123
-    "driver": "redis",
6124
-    "params": {"host":"localhost","port":6379},
6125
-    "secret":  "A long random string",
6126
-    "noweb":  false,
6127
-    "site":  "Name of my pump.io site",
6128
-    "owner":  "My name or organisation",
6129
-    "ownerURL":  "https://mypumpiodomainname.com/",
6130
-    "port":  443,
6131
-    "hostname":  "mypumpiodomainname.com",
6132
-    "address":  "localhost",
6133
-    "nologger":  false,
6134
-    "serverUser":  "pumpio",
6135
-    "key":  "/etc/ssl/private/mypumpiodomainname.com.key",
6136
-    "cert":  "/etc/ssl/certs/mypumpiodomainname.com.crt",
6137
-    "uploaddir": "/var/local/pump.io/uploads",
6138
-    "debugClient": false,
6139
-    "firehose": "ofirehose.example",
6140
-	"logfile": "/var/log/pump.io.log",
6141
-    "disableRegistration": false
6142
-}
6143
-#+END_SRC
6144
-
6145
-Save and exit.
6146
-
6147
-#+BEGIN_SRC: bash
6148
-mkdir /var/local/pump.io
6149
-mkdir /var/local/pump.io/uploads
6150
-useradd -s /bin/bash -d /var/local/pump.io pumpio
6151
-chown -R pumpio:pumpio /var/local/pump.io
6152
-#+END_SRC
6153
-
6154
-Within the section of your Apache site configuration (in /etc/apache2/sites-available/mypumpiodomainname.com) add the following in the section which begins with *<VirtualHost *:443>*.
6155
-
6156
-#+BEGIN_SRC: bash
6157
-mkdir /tmp/apache2
6158
-cd /tmp/apache2
6159
-apt-get build-dep apache2
6160
-apt-get install autoconf
6161
-apt-get source apache2
6162
-cd apache2-*
6163
-wget http://freedombone.uk.to/apache-2.2.24-wstunnel.patch
6164
-sha256sum apache-2.2.24-wstunnel.patch
6165
-7cfe86bb31c6674a316a6b1d8ba48cc2adaf9200348e3c95c29654f387c85cc2
6166
-
6167
-patch -p1 -i apache-2.2.24-wstunnel.patch
6168
-autoconf
6169
-./configure --enable-so --enable-proxy=shared --enable-proxy-wstunnel=shared
6170
-make
6171
-cp modules/proxy/.libs/mod_proxy_wstunnel.so  /usr/lib/apache2/modules/
6172
-cd /etc/apache2/mods-enabled
6173
-ln -s ../mods-available/proxy_wstunnel.load
6174
-#+END_SRC
6175
-
6176
-#+BEGIN_SRC: bash
6177
-LoadModule proxy_wstunnel_module /usr/lib/apache2/modules/mod_proxy_wstunnel.so
6178
-
6179
-        <Location /main/realtime/sockjs>
6180
-                ProxyPass wss://localhost/main/realtime/sockjs
6181
-                ProxyPassReverse wss://localhost/main/realtime/sockjs
6182
-        </Location>
6183
-
6184
-        <LocationMatch ".*\.(jpg|png|gif)$">
6185
-                CacheEnable disk
6186
-        </LocationMatch>
6187
-
6188
-        ProxyPreserveHost On
6189
-
6190
-        ProxyPass               /       https://192.168.x.y/
6191
-        ProxyPassReverse        /       https://192.168.x.y/
6192
-#+END_SRC
6193
-
6194
-#+BEGIN_SRC: bash
6195
-apachectl confgitest
6196
-service apache2 restart
6197
-#+END_SRC
6198
-
6199
-
6200
-
6201
-#+BEGIN_SRC: bash
6202
-./opt/pump.io/bin/pump
6203
-npm install forever -g
6204
-#+END_SRC
6205
-
6206
 * Related projects
6228
 * Related projects
6207
 
6229
 
6208
   * [[https://freedomboxfoundation.org/][Freedombox]]
6230
   * [[https://freedomboxfoundation.org/][Freedombox]]