Notes on snapshots, images, and migrations
# Create zone
vmadm create <<EOL
{
"brand": "joyent",
.| # vim: set ft=pf | |
| # /etc/pf.conf | |
| ext_if="vtnet0" | |
| webports = "{http, https}" | |
| int_tcp_services = "{domain, ntp, smtp, www, https, ftp}" | |
| int_udp_services = "{domain, ntp}" | |
| set skip on lo |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| # Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/ | |
| # Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date. | |
| ################################################################## | |
| Installing and Configuring SmartOS on a budget server (with a /29) | |
| ################################################################## | |
| # if you find this gist useful, please star it | |
| # please be aware that budget hosting companies usually cut corners somewhere, |
| pkgin -y install git mercurial gcc47 gmake giflib-5.0.5 ImageMagick-6.8.7.4 | |
| export GOROOT=$HOME/go | |
| export PATH=$PATH:$GOROOT/bin | |
| export GOPATH=$HOME/gocode | |
| cd | |
| git clone https://github.com/golang/go.git | |
| cd go | |
| hg update default |
| DAEMON_URL = http://<bitcoin.conf rpcuser>:<bitcoin.conf rpcpassowrd>@localhost:8332/ | |
| DB_DIRECTORY = /Users/bitcoin/.electrumx/ | |
| DB_ENGINE = leveldb | |
| USERNAME = bitcoin | |
| ELECTRUMX = /Users/bitcoin/source/electrumx/electrumx_server | |
| HOST = 0.0.0.0 | |
| ANON_LOGS = fuck off :) | |
| BANNER_FILE = /Users/bitcoin/.electrumx/banner.txt | |
| DONATION_ADDRESS = 34ie35p4G1npt6GoXR9BDhmMndNwCsiiEr |
| #!/bin/sh | |
| # This script will backup all smartos zones to remote servers | |
| # or local directories. | |
| # taken from Brandon Blaylock (brandon@null.pub) | |
| ### Defaults | |
| FTPHOST= | |
| SCPHOST= | |
| LOCALDIR= |
| package cl.puas.web.servlet; | |
| import sun.misc.BASE64Decoder; | |
| import javax.imageio.ImageIO; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.HttpServlet; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; | |
| import java.awt.image.BufferedImage; |
| # Modified for OpenBSD | |
| # Assumes being root | |
| # Requires curl to be installed, wget can also be used, relevant commands need to be adjusted. acme.sh supports both. | |
| # Configured to use Cloudflare DNS for verification | |
| # How to use "acme.sh" to set up Lets Encrypt without root permissions | |
| # See https://github.com/Neilpang/acme.sh for more | |
| # This assumes that your website has a webroot at "/var/www/<domain>" | |
| # I'll use the domain "EXAMPLE.com" as an example |