Last active
December 2, 2019 06:31
-
-
Save joshuaquek/473adac76f93ec795f7ce77e524d2f0a to your computer and use it in GitHub Desktop.
Essential startup scripts that one might want to use when setting up a new RHEL 7 instance on AWS.
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
Summary: Essential startup scripts that one might want to use when setting up a new RHEL 7 instance on AWS. |
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
# ----- Install Nano and Git ----- | |
sudo yum -y install nano | |
sudo yum -y install git | |
# ----- Disable SELinux weird port blocking function, to free up port 80 for NGINX ----- | |
sudo setsebool -P httpd_can_network_connect true | |
# ----- Install NGINX ----- | |
touch /etc/yum.repos.d/nginx.repo #====> Create this file | |
#====> Inside that file, paste the following: | |
# -------- PASTE CONTENTS BELOW, EXCLUDING THIS LINE -------- | |
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/mainline/rhel/7/$basearch/ | |
gpgcheck=0 | |
enabled=1 | |
# -------- PASTE CONTENTS ABOVE, EXCLUDING THIS LINE -------- | |
^D #====> # Save and exit the text editor | |
sudo yum -y install nginx | |
cd #====> Go back to your home directory | |
ln -sf /etc/nginx nginx #====> Create a symlink/shortcut to nginx folder from your current | |
# ----- Install Node Version Manager and NodeJS 10.0.0 (you can choosea version actually) ----- | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install 10.0.0 #====> Install desired NodeJS version | |
node -v #====> Check that the version is installed | |
# Next exit the terminal and ssh in again to see the settings applied | |
# ----- (OPTIONAL) Allow multiple registries for NPM ----- | |
touch .npmrc #===> Create this file if it doesn't already exist (NPM user config file) | |
#====> Inside that file, paste the following: | |
# -------- PASTE CONTENTS BELOW, EXCLUDING THIS LINE -------- | |
#...Default NPM registry | |
registry=https://registry.npmjs.org/ | |
#...Example on how to add custom public registries | |
@nodemodulesio:registry.node-modules.io/ | |
@custom-public-registry:your_public_registry_url.com/ | |
#...example on how to add a custom private registry | |
//npm.myCustomPrivateNPMregistry.io/:_password="SOME PASSWORD HERE" | |
//npm.myCustomPrivateNPMregistry.io/:username=my.username.here | |
//npm.myCustomPrivateNPMregistry.io/:email=hello.world@mysite.com | |
//npm.myCustomPrivateNPMregistry.io/:always-auth=false | |
# set https download to false to quell UNABLE_TO_VERIFY_LEAF_SIGNATURE error | |
strict-ssl=false | |
# -------- PASTE CONTENTS ABOVE, EXCLUDING THIS LINE -------- | |
^D #====> # Save and exit the text editor | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment