I hereby claim:
- I am risyasin on github.
- I am risyasin (https://keybase.io/risyasin) on keybase.
- I have a public key whose fingerprint is 6AB3 F79F 0692 CE84 B65A 0608 9132 923E 60B4 03CE
To claim this, I am signing this object:
| # make 2 partitions on the disk. | |
| parted -s /dev/sda mktable msdos | |
| parted -s /dev/sda mkpart primary 0% 100m | |
| parted -s /dev/sda mkpart primary 100m 100% | |
| # make filesystems | |
| # /boot | |
| mkfs.ext2 /dev/sda1 | |
| # / | |
| mkfs.ext4 /dev/sda2 |
| { | |
| "phantom": true, | |
| "devel": true, | |
| "jquery": true, | |
| "node": true, | |
| "browser": true, | |
| "globalstrict": true, | |
| "nonstandard": true, | |
| "bitwise": true, | |
| "curly": true, |
I hereby claim:
To claim this, I am signing this object:
###The Issue With Forever Forever is great for running node services, with a minor setback: the word "forever" doesn't apply to system reboots.
###The solution, run node apps as a system service logged in as root
vim /etc/init/node-app.confContents for node-app.conf
| #!/bin/bash | |
| PHPRC=/opt/local/php56/etc | |
| export PHPRC | |
| umask 022 | |
| export PHP_FCGI_CHILDREN | |
| PHP_FCGI_MAX_REQUESTS=99999 | |
| export PHP_FCGI_MAX_REQUESTS | |
| SCRIPT_FILENAME=$PATH_TRANSLATED | |
| export SCRIPT_FILENAME | |
| exec /opt/local/php56/bin/php-cgi |
Install imagick first!
sudo apt-get install imagick
Enable Apache2 mod_ext_filter
sudo a2enmod ext_filter
Check it:
Copy this myapp.service file under /etc/systemd/system
Enable service (starts at boot time)
systemctl enable myapp.service
Start service immediately
systemctl start myapp.service
Display logs of service (stdout)
journalctl -u myapp.service
| #!/usr/bin/env bash | |
| NODEJS_VERSION=5.6.0 | |
| # aria2 is a really nice tool. promise, you won't regret | |
| apt-get install -y aria2 | |
| echo "Installing Node.js v${NODEJS_VERSION} to /opt/nodejs" | |
| cd /opt/ | |
| ## cleanup |
| #!/usr/bin/env bash | |
| set -e | |
| SRC_ROOT=/usr/src | |
| NSRC_ROOT=/usr/src/nginx | |
| NPS_VERSION=1.13.35.1 | |
| NGINX_VERSION=1.12.2 | |
| NODEJS_VERSION=8.9.4 | |
| ## not installing now, uncomment webmin install below |