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 | |
echo "*****************************************" | |
echo " get superuser and install all updates " | |
echo "*****************************************" | |
sudo su | |
yum –y update | |
echo "*****************************************" | |
echo " Installing Development Tools" | |
echo "*****************************************" | |
yum install gcc gcc-c++ make -y |
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 | |
echo "*****************************************" | |
echo " Add the 10gen repository - after you press" | |
echo " enter add the following lines and then" | |
echo " cntl-X to save:" | |
echo " [10gen]" | |
echo " name=10gen Repository" | |
echo " baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64" | |
echo " gpgcheck=0" | |
echo "*****************************************" |
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
From Hack Sparrow: | |
--------------------------- | |
Some time ago, I wrote a post on keeping Node.js apps running even after logging out from the shell. It was cool and all, but soon you will soon realize that Forever alone is not enough. Because, on system reboots, Forever itself is killed. Who will restart your app now? | |
There are many options for handling this kind of scenario, but today we will implement a solution using cron. Let's find out how we can make Forever and our Node.js app reboot-proof. | |
The app you want Forever to start on system restart is probably a web app, so let's try this thing on an Express.js web app. | |
Install Express, if you haven't already: | |
$ npm install -g express |
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 | |
############################################### | |
# To use: | |
# https://raw.github.com/gist/2776351/5fc6f3a63450ff6986ac916fce54d70c16937646/ec2-mysql-installation.sh | |
# chmod 777 install-redis.sh# ./install-redis.sh | |
############################################### | |
echo "*****************************************" | |
echo " Installing MySQL" | |
echo "*****************************************" | |
echo " " |
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 | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
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 | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.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/sh | |
if [ $(ps aux | grep $USER | grep node | grep -v grep | wc -l | tr -s "\n") -eq 0 ] | |
then | |
export NODE_ENV=production | |
export PATH=/usr/local/bin:$PATH | |
forever start ~/vizilinkz/server.js > /dev/null | |
# redirects port 80 to port 8080 | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080 | |
fi |
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 | |
echo "*****************************************" | |
echo " Download the script and add to crontab " | |
echo "*****************************************" | |
sudo wget https://raw.github.com/gist/2777778/e92dc28e3f3961e0e2740d262b3ed884a11f6f85/reboot.sh | |
sudo chmod 777 reboot.sh | |
sudo line="@reboot ~/reboot.sh >> cron.log 2>&1" | |
sudo (crontab -l; echo "$line" ) | crontab - | |
sudo checkconfg crond on |
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 | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/2776679/c131c0548e7cd2ece85edfb8bea70575586147c7/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" | |
echo " Get superuser and install all updates " | |
echo "*****************************************" |
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
curl -w "\nTotal time: %{time_total}\nTime pretransfer: %{time_pretransfer}\nTime starttransfer: %{time_starttransfer}\nSize download: %{size_download}\n Speed download: %{speed_download}" www.vizilinkz.com |
OlderNewer