DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Website Server Provsion


Work flow

  1. Install packages: tree, curl, git;

  2. Create user chad, add it to sudoers;

  3. Install Meteor: curl https://install.meteor.com | /bin/sh;

  4. download mongoDB package (mongodb-linux-x86_64-rhel62-3.0.0.tgz for now) from mongoDB;

  5. Extract mongoDB package to $HOME/apps, add $MONGO_HOME/bin to $PATH (in file ~/.bash_profile);

  6. Config mongoDB: save the following codes into $HOME/docs/mongoRepo/mongo.conf:

    net:
      bindIp: 127.0.0.1
      port: 27017
    storage:
      dbPath: dbHome
    systemLog:
      destination: file
      path: "mongodb.log"
      logAppend: true
    
  7. Start mongod: mongod --config mongo.conf, or in background: nohup mongod --config mongo.conf &;

Ansible

Managing Node

Install ansible with sudo pip install ansible.

Provision of remote host

On remote host, create user with sudo useradd -m chad and set password: sudo passwd chad. On manging node, add ssh automatic login of chad and root on remote host with ssh-copy-id.

For a vagrant host, run the following commands in project's root directory:

vagrant ssh
sudo passwd
// set password for root ...
sudo useradd -m chad
sudo passwd chad
// set password for chad ...
exit
ssh-copy-id chad@localhost -p 2222
ssh-copy-id root@localhost -p 2222

// Install Node.js, MongoDB,

Install mms with installing its rpm package, you can remove it later with:

# service --status-all
# rpm -qa|grep mongo
mongodb-mms-automation-agent-manager-1.6.2.960-1.x86_64
# rpm -e mongodb-mms-automation-agent-manager-1.6.2.960-1.x86_64
# service --status-all

Change host name:

Add "newfairs.biz" after "127.0.0.1 ", before "localhost" in /etc/hosts. Restart mms agent: service mongodb-mms-automation-agent restart.



Published

Mar 6, 2015

Last Updated

Mar 6, 2015

Category

Tech

Tags

  • centos 6.5 1
  • provision 1
  • server 10
  • website 10

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor