Skip to content

Instantly share code, notes, and snippets.

@mervintankw
Last active April 22, 2018 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mervintankw/29de40ecbe92ea1150d58e024872c6f9 to your computer and use it in GitHub Desktop.
Save mervintankw/29de40ecbe92ea1150d58e024872c6f9 to your computer and use it in GitHub Desktop.
Install apache and node.js on Centos 6.9
#!/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