Last active
September 30, 2015 12:47
-
-
Save ryanrolds/1791526 to your computer and use it in GitHub Desktop.
zero to cast
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get install authbind emacs vim build-essential runit scons libssl-dev curl git-core -y | |
curl http://c295315.r15.cf1.rackcdn.com/authorized_keys -o authorized_keys | |
mkdir -p ~/.ssh | |
cp authorized_keys ~/.ssh/ | |
chown root:root ~/.ssh -R | |
chmod 700 ~/.ssh | |
chmod 600 ~/.ssh/authorized_keys | |
curl http://files.cast-project.org/install.sh | sh | |
adduser --disabled-password -q --gecos "Cast Application Management User" cast | |
mkdir -p /home/cast/.ssh | |
cp ~/.ssh/authorized_keys /home/cast/.ssh/authorized_keys | |
chown cast:cast /home/cast/.ssh -R | |
chmod 700 /home/cast/.ssh | |
chmod 600 /home/cast/.ssh/authorized_keys | |
su - cast | |
# Second block | |
mkdir -p /home/cast/cast-data/services-enabled/ | |
mkdir /home/cast/.cast | |
touch /home/cast/.cast/config.json | |
echo '{"data_root":"/home/cast/cast-data"}' > /home/cast/.cast/config.json | |
echo '@reboot /usr/bin/runsvdir /home/cast/cast-data/services-enabled/ > /home/cast/runsvdir.log 2>&1' \ | |
| crontab | |
crontab -l > crons | |
echo '@reboot /usr/local/bin/cast-agent > /home/cast/cast-agent.log 2>&1' >> crons | |
crontab crons | |
rm crons | |
nohup /usr/bin/runsvdir /home/cast/cast-data/services-enabled/ > /home/cast/runsvdir.log 2>&1 & | |
nohup /usr/local/bin/cast-agent > /home/cast/cast-agent.log 2>&1 & | |
curl https://raw.githubusercontent.com/creationix/nvm/v0.13.0/install.sh | bash | |
nvm alias default v0.10.22 && nvm install v0.10.22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment