Last active
July 1, 2017 16:19
-
-
Save robconery/aefb86f25ec794a2268cf38d44238352 to your computer and use it in GitHub Desktop.
dot net core installer for Cloud9
This file contains 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
#!/usr/bin/env bash | |
############### USAGE ############### | |
# | |
# 1. Create a new workspace on Cloud9 using the "Blank" template | |
# | |
# 2. Run this command in the console: | |
# bash <(curl -fsSL https://gist.githubusercontent.com/robconery/aefb86f25ec794a2268cf38d44238352/raw/898f8997220df38de193d48c07c2fb078aede10a/install_dncore.sh) | |
echo Updating Packages... | |
# Adding the package source for dotnet core breaks apt, so we need to update and install dependencies | |
sudo apt-get update | |
#intall the https transport, which is required | |
sudo apt-get install apt-transport-https | |
#now the main bits | |
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 | |
sudo apt-get update | |
echo Installing dotnet core... | |
#and finally... | |
sudo apt-get install dotnet-dev-1.0.4 | |
#let's have Node updated | |
echo | |
echo ----- | |
echo UPDATING NODE.JS | |
echo ----- | |
source ~/.nvm/nvm.sh | |
nvm install stable | |
nvm alias default stable | |
echo | |
echo ----- | |
echo SETTING UP POSTGRES | |
echo ----- | |
sudo service postgresql start | |
psql << EOF | |
ALTER USER postgres WITH PASSWORD 'postgres'; | |
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1'; | |
DROP DATABASE template1; | |
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE'; | |
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1'; | |
\c template1 | |
VACUUM FREEZE; | |
\q | |
EOF | |
echo | |
echo ALL DONE! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment