Bob Mottram před 11 roky
rodič
revize
97320324e8
1 změnil soubory, kde provedl 79 přidání a 15 odebrání
  1. 79
    15
      beaglebone.txt

+ 79
- 15
beaglebone.txt Zobrazit soubor

@@ -1906,7 +1906,7 @@ Listen 80
1906 1906
 Create a self-signed certificate. The passphrase isn't important and will be removed, so make it easy (such as "password").
1907 1907
 
1908 1908
 #+BEGIN_SRC: bash
1909
-emacs makecert
1909
+emacs /usr/bin/makecert
1910 1910
 #+END_SRC
1911 1911
 
1912 1912
 Enter the following:
@@ -1932,11 +1932,11 @@ service apache2 restart
1932 1932
 Save and exit.
1933 1933
 
1934 1934
 #+BEGIN_SRC: bash
1935
-chmod +x makecert
1936
-./makecert mydomainname.com
1935
+chmod +x /usr/bin/makecert
1936
+makecert mydomainname.com
1937 1937
 #+END_SRC
1938 1938
 
1939
-Enter some trivial password for the key file.  The password will be removed as part of the makecert script.  Note that leaving a password on the key file would mean that after a power cycle the apache server will not be able to boot properly (it would wait indefinitely for a password to be manually entered) and would look as if it had crashed.
1939
+Enter some trivial password for the key file, such as "password".  The password will be removed as part of the /makecert/ script which you just created.  Note that leaving a password on the key file would mean that after a power cycle the Apache server will not be able to boot properly (it would wait indefinitely for a password to be manually entered) and would look as if it had crashed.
1940 1940
 
1941 1941
 If all has gone well then there should be no warnings or errors after you run the service restart command.  After that you should enable ports 80 (HTTP) and 443 (HTTPS) on your internet router/firewall, such that they are redirected to the BBB.
1942 1942
 
@@ -6056,13 +6056,14 @@ See documentation in /usr/share/doc/kune/INSTALL.gz
6056 6056
 
6057 6057
 ** pump.io
6058 6058
 
6059
+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.
6060
+
6059 6061
 #+BEGIN_SRC: bash
6060
-apt-get update && apt-get install nodejs-legacy mongodb graphicsmagick git-core screen
6062
+apt-get update && apt-get install redis-server nodejs-legacy graphicsmagick git-core screen
6061 6063
 cd /opt
6062 6064
 git clone https://github.com/e14n/pump.io.git
6063 6065
 cd /opt/pump.io
6064 6066
 npm install
6065
-npm install -g databank-mongodb
6066 6067
 #+END_SRC
6067 6068
 
6068 6069
 Edit the configuration file.
@@ -6075,26 +6076,89 @@ Add the following, replacing /mypumpiodomainname.com/ with your domain name.
6075 6076
 
6076 6077
 #+BEGIN_SRC: bash
6077 6078
 {
6078
-    "driver":  "disk",
6079
-    "params":  {"dir": "/tmp/pumpio/"},
6080
-    "secret":  "my dog has fleas",
6079
+    "driver": "redis",
6080
+    "params": {"host":"localhost","port":6379},
6081
+    "secret":  "A long random string",
6081 6082
     "noweb":  false,
6082 6083
     "site":  "Name of my pump.io site",
6083 6084
     "owner":  "My name or organisation",
6084
-    "ownerURL":  "http://mypumpiodomainname.com/",
6085
-    "port":  8000,
6085
+    "ownerURL":  "https://mypumpiodomainname.com/",
6086
+    "port":  443,
6086 6087
     "hostname":  "mypumpiodomainname.com",
6087
-    "address":  "pumpio.localhost",
6088
+    "address":  "localhost",
6088 6089
     "nologger":  false,
6089 6090
     "serverUser":  "pumpio",
6090
-    "key":  "/etc/my/keyfile.key",
6091
-    "cert":  "/etc/my/server.crt",
6091
+    "key":  "/etc/ssl/private/mypumpiodomainname.com.key",
6092
+    "cert":  "/etc/ssl/certs/mypumpiodomainname.com.crt",
6092 6093
     "uploaddir": "/var/local/pump.io/uploads",
6093 6094
     "debugClient": false,
6094
-    "firehose": "ofirehose.example"
6095
+    "firehose": "ofirehose.example",
6096
+	"logfile": "/var/log/pump.io.log",
6097
+    "disableRegistration": false
6095 6098
 }
6096 6099
 #+END_SRC
6097 6100
 
6101
+Save and exit.
6102
+
6103
+#+BEGIN_SRC: bash
6104
+mkdir /var/local/pump.io
6105
+mkdir /var/local/pump.io/uploads
6106
+useradd -s /bin/bash -d /var/local/pump.io pumpio
6107
+chown -R pumpio:pumpio /var/local/pump.io
6108
+#+END_SRC
6109
+
6110
+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>*.
6111
+
6112
+#+BEGIN_SRC: bash
6113
+mkdir /tmp/apache2
6114
+cd /tmp/apache2
6115
+apt-get build-dep apache2
6116
+apt-get install autoconf
6117
+apt-get source apache2
6118
+cd apache2-*
6119
+wget http://freedombone.uk.to/apache-2.2.24-wstunnel.patch
6120
+sha256sum apache-2.2.24-wstunnel.patch
6121
+7cfe86bb31c6674a316a6b1d8ba48cc2adaf9200348e3c95c29654f387c85cc2
6122
+
6123
+patch -p1 -i apache-2.2.24-wstunnel.patch
6124
+autoconf
6125
+./configure --enable-so --enable-proxy=shared --enable-proxy-wstunnel=shared
6126
+make
6127
+cp modules/proxy/.libs/mod_proxy_wstunnel.so  /usr/lib/apache2/modules/
6128
+cd /etc/apache2/mods-enabled
6129
+ln -s ../mods-available/proxy_wstunnel.load
6130
+#+END_SRC
6131
+
6132
+#+BEGIN_SRC: bash
6133
+LoadModule proxy_wstunnel_module /usr/lib/apache2/modules/mod_proxy_wstunnel.so
6134
+
6135
+        <Location /main/realtime/sockjs>
6136
+                ProxyPass wss://localhost/main/realtime/sockjs
6137
+                ProxyPassReverse wss://localhost/main/realtime/sockjs
6138
+        </Location>
6139
+
6140
+        <LocationMatch ".*\.(jpg|png|gif)$">
6141
+                CacheEnable disk
6142
+        </LocationMatch>
6143
+
6144
+        ProxyPreserveHost On
6145
+
6146
+        ProxyPass               /       https://192.168.x.y/
6147
+        ProxyPassReverse        /       https://192.168.x.y/
6148
+#+END_SRC
6149
+
6150
+#+BEGIN_SRC: bash
6151
+apachectl confgitest
6152
+service apache2 restart
6153
+#+END_SRC
6154
+
6155
+
6156
+
6157
+#+BEGIN_SRC: bash
6158
+./opt/pump.io/bin/pump
6159
+npm install forever -g
6160
+#+END_SRC
6161
+
6098 6162
 * Related projects
6099 6163
 
6100 6164
   * [[https://freedomboxfoundation.org/][Freedombox]]