Skip to content

Instantly share code, notes, and snippets.

@robertu7
Created April 5, 2015 14:17
Show Gist options
  • Save robertu7/e7e3a245ab634d45d0f3 to your computer and use it in GitHub Desktop.
Save robertu7/e7e3a245ab634d45d0f3 to your computer and use it in GitHub Desktop.
Install MEAN on CentOS 7
#!/bin/bash
####### Nginx #######
# Install
sudo yum install epel-release
sudo yum install nginx
# Start
sudo systemctl start nginx.service
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
sudo echo 'Nginx Installed'
####### MongoDB #######
# Install
sudo rm /etc/yum.repos.d/mongodb.repo
sudo mkdir -p /data/db
sudo echo '[mongodb]' >> /etc/yum.repos.d/mongodb.repo
sudo echo 'name=MongoDB Repository' >> /etc/yum.repos.d/mongodb.repo
sudo echo 'baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/' >> /etc/yum.repos.d/mongodb.repo
sudo echo 'gpgcheck=0' >> /etc/yum.repos.d/mongodb.repo
sudo echo 'enabled=1' >> /etc/yum.repos.d/mongodb.repo
sudo echo "/etc/yum.repos.d/mondgob.repo created"
sudo yum install mongo-10gen mongo-10gen-server
# Start
sudo systemctl start mongod
export LC_ALL=C
sudo echo 'Mongodb Installed'
####### Node.JS #######
# Install
sudo yum install epel-release
sudo yum install nodejs
sudo yum install npm
sudo echo 'Node.JS Installed'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment