Last active
April 22, 2018 09:15
-
-
Save mervintankw/29de40ecbe92ea1150d58e024872c6f9 to your computer and use it in GitHub Desktop.
Install apache and node.js on Centos 6.9
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
#!/bin/bash | |
# edit variable values here | |
NODE_VERSION="8.4.0" | |
###### DO NOT EDIT FROM HERE ONWARDS ###### | |
# update centos | |
sudo yum -y update | |
# install development tools | |
yum -y groupinstall "Development Tools" | |
# install apache and necessary tools | |
sudo yum -y install httpd nano mlocate | |
# install node.js | |
sudo yum install -y gcc-c++ make | |
sudo curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash - | |
sudo yum -y install nodejs-${NODE_VERSION} | |
# install pm2 to manage node apps | |
sudo npm install -g pm2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment