sudo yum install gcc gcc-c++
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Deny", | |
"Principal": "*", | |
"Action": [ | |
"s3:PutBucketAcl", | |
"s3:PutObjectAcl", | |
"s3:PutObjectVersionAcl" |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
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
#What this does: | |
#updates centos distribution | |
#install apache, php7, mysql5.6, phpmysql, add apache and mysql to bootup, start apache and mysql, run secure mysql install. add ec2-user to apache users group. change the ownership of /var/www to ec2-user:apache. create vhost file | |
sudo yum update -y && sudo yum install -y httpd24 php70 mysql56-server php70-mysqlnd && sudo service httpd start && sudo chkconfig httpd on && sudo usermod -a -G apache ec2-user && sudo chown -R ec2-user:apache /var/www && sudo chmod 2775 /var/www && find /var/www -type f -exec sudo chmod 0664 {} \; && sudo service mysqld start && sudo chkconfig mysqld on && sudo mysql_secure_installation && sudo mkdir /etc/httpd/sites-available && sudo mkdir /etc/httpd/sites-enabled && echo "<VirtualHost *:80> | |
ServerName clickbuysmile.com | |
ServerAlias clickbuysmile.com | |
DocumentRoot "${INSTALL_DIR}/www/clickbuysmile.com" | |
ErrorLog ${APACHE_LOG_DIR}/clickbuysmile.com/error.log | |
CustomLog ${APACHE_LOG_DIR}/clickbuysmile.com/access.log combine |
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/sh | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /usr/local/nginx/conf/nginx.conf | |
# pidfile: /var/run/nginx.pid |
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 | |
# | |
# Automate mysql secure installation for debian-baed systems | |
# | |
# - You can set a password for root accounts. | |
# - You can remove root accounts that are accessible from outside the local host. | |
# - You can remove anonymous-user accounts. | |
# - You can remove the test database (which by default can be accessed by all users, even anonymous users), | |
# and privileges that permit anyone to access databases with names that start with test_. |
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
public_ipv4_address_of_server=$(curl http://169.254.169.254/latest/meta-data/public-ipv4 -s) && { cat > ./update_clickbuysmileArecord.json <<EOF | |
{ | |
"Comment": "update click buy smile domain with new A record IP", | |
"Changes": [ | |
{ | |
"Action": "UPSERT", | |
"ResourceRecordSet": { | |
"Name": "your_domain_name.com", | |
"Type": "A", | |
"TTL": 60, |
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
cd ~ | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install --lts | |
node -e "console.log('Running Node.js ' + process.version + ', have fun.')" |
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
Cloud-init v. 0.7.7 running 'init-local' at Mon, 09 Apr 2018 00:38:07 +0000. Up 23.48 seconds. | |
Cloud-init v. 0.7.7 running 'init' at Mon, 09 Apr 2018 00:38:08 +0000. Up 23.93 seconds. | |
ci-info: +++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++++ | |
ci-info: +--------+------+----------------------------+---------------+-------+-------------------+ | |
ci-info: | Device | Up | Address | Mask | Scope | Hw-Address | | |
ci-info: +--------+------+----------------------------+---------------+-------+-------------------+ | |
ci-info: | eth0 | True | 10.0.1.165 | 255.255.255.0 | . | 02:da:ec:61:e4:8e | | |
ci-info: | eth0 | True | fe80::da:ecff:fe61:e48e/64 | . | link | 02:da:ec:61:e4:8e | | |
ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | . | . | | |
ci-info: | lo | True | ::1/128 | . | host | . | |
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
.notificationsFrame { | |
position: relative; | |
} | |
.notificationsFrame { | |
z-index: 2; | |
width: 100%; | |
top: 20px; | |
background: #fff; | |
border-radius: 3px; | |
overflow: hidden; |
OlderNewer