Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| #!/usr/bin/env python | |
| import sys | |
| import boto | |
| import pprint | |
| del_flag = '' | |
| if len(sys.argv) > 1: | |
| del_flag = sys.argv[1] |
| import copy | |
| import logging | |
| import os | |
| import boto3 | |
| logging.basicConfig(level=os.environ.get('LOG_LEVEL', 'INFO')) | |
| ec2 = boto3.client('ec2') | |
| logger = logging.getLogger(__name__) |
| from collections import defaultdict | |
| import boto3 | |
| """ | |
| A tool for retrieving basic information from the running EC2 instances. | |
| """ | |
| # Connect to EC2 | |
| ec2 = boto3.resource('ec2') |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| # This little project is hosted at: <https://gist.github.com/1455741> | |
| # Copyright 2011-2012 Álvaro Justen [alvarojusten at gmail dot com] | |
| # License: GPL <http://www.gnu.org/copyleft/gpl.html> | |
| import os | |
| from email.mime.multipart import MIMEMultipart | |
| from email.mime.text import MIMEText |
| http://nbviewer.jupyter.org/github/phelps-sg/python-bigdata/blob/master/src/main/ipynb/intro-python.ipynb |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Metadata: {} | |
| Parameters: | |
| ########### | |
| KeyName: | |
| Description: The EC2 Key Pair to allow SSH access to the instance | |
| Type: 'AWS::EC2::KeyPair::KeyName' | |
| AvailabilityZone: | |
| Description: Availability zone to deploy |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Metadata: {} | |
| Parameters: | |
| ########### | |
| KeyName: | |
| Description: The EC2 Key Pair to allow SSH access to the instance | |
| Type: 'AWS::EC2::KeyPair::KeyName' | |
| AvailabilityZone: | |
| Description: Availability zone to deploy |
| yum -y update && yum -y upgrade | |
| yum -y install unzip net-tools sysstat openssh-clients perl-core libaio nmap-ncat libstdc++.so.6 wget | |
| getenforce | |
| setenforce 0 | |
| getenforce | |
| vim /etc/selinux/config | |
| >> Make sure "SELINUX=disabled" | |
| hostnamectl set-hostname mail | |
| echo "<server_ip> <TLD_domain> mail " >> /etc/hosts | |
| cat /etc/hosts |