[[Tidepools]]



Add New Page: You are not allowed to add pages Select section/namespace. New page title.
 

Tidepools

The following are Jonathan Baldwin's pastebin notes for setting up Tidepools as of 9/29/12

plug server notes (guruplug + dreamplug)

SERIAL: screen /dev/ttyUSB0 115200

first config:

connect to open wifi

ssh root@192.168.1.1

password: nosoup4u

————–DISABLE WIRELESS———————–

nano /etc/rc.local

comment (#) call to /root/init_setup.sh

————————————

——- DIDN“T WORK”———– To add a new sudoer user: guruplug-debian:~# addgroup admin guruplug-debian:~# adduser newuser guruplug-debian:~# adduser newuser admin guruplug-debian:~# visudo ## ADD at end of /etc/sudoers.tmp, and save: User_Alias ADMIN = %admin ADMIN ALL=(ALL) ALL

## and then test guruplug-debian:~# su newuser newuser@guruplug-debian:/root$ sudo touch x newuser@guruplug-debian:/root$ sudo rm x newuser@guruplug-debian:/root$ exit After adding a sudoer, you might want to disable root ssh login Security Tip: Disable Root SSH Login on Linux - How-To Geek newuser@guruplug-debian:/root$ sudo nano /etc/ssh/sshd_config ## Change 'PermitRootLogin yes' to 'PermitRootLogin no' ## then restart ssh: newuser@guruplug-debian:/root$ sudo /etc/init.d/ssh restart After this, only newuser should be able to log in via ssh.

————————————

apt-get update

1))))))) might have to if header apt-get fuck up:

sudo rm /var/lib/apt/lists/* -vf sudo apt-get update

2))))))))

date –set 2012-03-13

date –set 21:47:0

——

IF GETTING permission denied errors when apt-get install'ing, run:

chown -R man /var/cache/man

—–

INSTALLING LIGHTTPD / PHP5 «< lighttpd installed already!!

http://www.howtoforge.com/lighttpd_mysql_php_debian_etch

??? chown -R www-data /var/log/lighttpd

??? chown -R www-data /var/www

apt-get install php5-cgi

added to bottom of /etc/lighttpd/lighttpd.conf:

fastcgi.server = ( “.php” ⇒ 3)

1) ((((((
2) (((((((
3)
                   "bin-path" => "/usr/bin/php5-cgi",
                   "socket" => "/tmp/php.socket"
               )))
server.document-root = “/mnt/usb” ——— USB MOUNT / mount -t ext3 /dev/sda1 /mnt/usb *ON DREAMPLUG SDA1 is SDC1 nano /etc/fstab /dev/sda1 /mnt/usb ext3 defaults 0 0 / FORGET LIGHTTPD, installed APACHE: http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-debian-squeeze-lamp to use USB file mount: http://www.ajopaul.com/2010/05/01/ubuntu-apache2-change-default-documentroot-varwww/ TO REDIRECT ALL WEIRD FILE NOT FOUND: in custom apache config, after created new config file from default, need to allow override: <Directory /mnt/usb/www>
              Options Indexes FollowSymLinks MultiViews
              AllowOverride All
              Order allow,deny
              allow from all
      </Directory>
then create .htaccess file in doc root directory: ErrorDocument 404 /index.php ErrorDocument 401 /index.php ErrorDocument 403 /index.php ErrorDocument 500 /index.php ——- HOOK MONGO TO PHP! —— apt-get install php5-dev install php-pear pecl install mongo-1.2.7 « need to use old ver to stop seg faults add: extension=mongo.so to /etc/php5/apache2/php.ini http://wiki.debian.org/NetworkConfiguration nano /etc/network/interfaces auto eth0 #allow-hotplug eth0 iface eth0 inet static address 192.168.24.160 netmask 255.255.255.0 gateway 192.168.24.1 ……. or 192.168.24.255?? auto eth1 iface eth1 inet dhcp
INSTALLING MONGO: git pull/clone from nonx86 mongo http://www.mongodb.org/display/DOCS/Building+for+Linux downloaded all dependencies —– needed first —– install libxcb1 install libstartup-notification0 install xulrunner-1.9.1 install xulrunner-dev ———————- install libpcre3 libpcre3-dev install libboost-dev install libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev then rest of mongo instruct, scons all http://library.linode.com/databases/mongodb/debian-5-lenny mongodb-start needs to be for /opt/mongo/bin not /opt/mongodb/bin edit /etc/init.d/mongod for path to be /opt/mongo not mongodb if /tmp error: chown root:root /tmp chmod 1777 /tmp —————— ———————— Official Setup for WR1043nd —> sqlite + php + http + USB storage and swap drive ———————— NO INTERNET SETUP: # file: /etc/dnsmasq.conf address=/apple.com/0.0.0.0 address=/#/192.168.0.20 *** Login and change network to: 192.168.22.1 telnet 192.168.22.1 passwd (to switch to ssh) opkg update opkg install nano fdisk echo “$(uci get network.lan.ipaddr) rhi.redhook.news llmp” » /etc/hosts —should look like: cat /etc/hosts 127.0.0.1 localhost. 192.168.22.1 rhi.redhook.news llmp —- uci set system.@system[0].hostname=RedHook-RHI uci commit system echo “$(uci get system.@system[0].hostname)” > /proc/sys/kernel/hostname ——-USB MOUNTING——— opkg install kmod-usb-storage block-mount kmod-fs-ext4 block-hotplug fdisk -l » should see partitions, otherwise need to partition /dev/sda with: /dev/sda1 1 950 7274119 83 Linux /dev/sda2 951 1021 543647 82 Linux swap / Solaris mkdir /mnt/usb /etc/init.d/fstab enable nano /etc/config/fstab config mount option target /mnt/usb option device /dev/sda1 option fstype ext3 option options rw,sync option enabled 1 option enabled_fsck 0 config swap option device /dev/sda2 option enabled 1 mkswap /dev/sda2 /etc/init.d/fstab start type: “free” to see if swap running ————————— ——- HTTP SERVER + PHP ——— opkg install lighttpd lighttpd-mod-cgi Edit /etc/lighttpd/lighttpd.conf and change a few settings: OLD: #server.modules = ( # “mod_cgi” #) NEW: server.modules = ( “mod_cgi” ) OLD: server.document-root = “/www/” NEW: server.document-root = “/srv/www/” OLD: #server.port = 81 NEW: server.port = 80 (End of changes to /etc/lighttpd/lighttpd.conf) Create a directory for our web server content mkdir /mnt/usb/www nano /etc/config/uhttpd change to port 8080 /etc/init.d/uhttpd restart Start the server manually and also at boot by enabling the init script /etc/init.d/lighttpd start /etc/init.d/lighttpd enable PHP opkg install php5 php5-cgi php5-mod-sqlite php5-mod-sqlite3 php5-mod-pdo-sqlite nano /etc/php.ini doc_root = “/www” to: doc_root = “/mnt/usb/www” un-semicolon: extension=pdo_sqlite.so extension=sqlite.so extension=sqlite3.so In /etc/lighttpd/lighttpd.conf change Right after #cgi.assign = ( “.pl” ⇒ “/usr/bin/perl”, “.cgi” ⇒ “/usr/bin/perl” ) add cgi.assign = ( “.php” ⇒ “/usr/bin/php-cgi” ) index-file.names = ( “index.html”, “default.html”, “index.htm”, “default.htm” ) to index-file.names = ( “index.html”, “default.html”, “index.htm”, “default.htm”, “index.php” ) Restart lighttpd /etc/init.d/lighttpd restart echo “<?php phpinfo(); ?>” > /mnt/usb/www/index.php go to: 192.168.22.1 ———————- opkg install nodogsplash nano /etc/nodogsplash/nodogsplash.conf add to authenticated: FirewallRule allow tcp port 8080 add to pre auth: FirewallRule allow tcp port 80 to 192.168.22.1 RedirectURL http://rhi.redhook.news MaxClients 50 ClientIdleTimeout 20 ClientForceTimeout 60 turn on auto authenticate, so redirects to real splash /etc/init.d/nodogsplash enable /etc/init.d/nodogsplash start ——- nano /etc/dnsmasq.conf add to end: address=/apple.com/0.0.0.0 —- scp -r /Users/jrbaldwin/Documents/Databases/testsite/hook/www root@192.168.22.1:/mnt/usb/ scp -r /Users/jrbaldwin/Documents/Databases/testsite/hook/www/splash.html root@192.168.22.1:/etc/nodogsplash/htdocs/ scp -r /Users/jrbaldwin/Documents/Databases/testsite/hook/www/images/top.jpg root@192.168.22.1:/etc/nodogsplash/htdocs/images scp -r /Users/jrbaldwin/Documents/Databases/testsite/hook/www/images/top.jpg root@192.168.22.1:/mnt/usb/www/images