This file contains hidden or 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
GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'%' IDENTIFIED BY 'password'; |
This file contains hidden or 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 | |
sudo yum update | |
sudo yum install python-pip | |
sudo yum install build-essential | |
sudo yum install python-dev | |
sudo pip install paramiko PyYAML jinja2 httplib2 | |
sudo pip install ansible | |
# Boto |
This file contains hidden or 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
CREATE USER 'ssluser'@'%' IDENTIFIED BY 'mypass'; | |
GRANT ALL PRIVILEGES ON *.* TO 'ssluser'@'%' IDENTIFIED BY 'mypass' REQUIRE SSL; | |
sudo mysqld --ssl-ca=/etc/mysql/ca-cert.pem --ssl-cert=/etc/mysql/server-cert.pem --ssl-key=/etc/mysql/server-key.pem | |
# Setup SSL http://askubuntu.com/questions/194074/enabling-ssl-in-mysql | |
# Generate a CA key and certificate with SHA1 digest | |
openssl genrsa 2048 > ca-key.pem | |
openssl req -sha1 -new -x509 -nodes -days 3650 -key ca-key.pem > ca-cert.pem |
This file contains hidden or 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
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub |
This file contains hidden or 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
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) | |
Then it means nginx or some other process is already using port 80. | |
You can kill it using: | |
sudo fuser -k 80/tcp |
This file contains hidden or 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
openssl req -new -newkey rsa:4096 -nodes -keyout server.key -out server.csr | |
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt | |
openssl rsa -in server.key -out server.pem |
This file contains hidden or 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 | |
# listppa Script to get all the PPA installed on a system ready to share for reininstall | |
for APT in `find /etc/apt/ -name \*.list`; do | |
grep -o "^deb http://ppa.launchpad.net/[a-z0-9\-]\+/[a-z0-9\-]\+" $APT | while read ENTRY ; do | |
USER=`echo $ENTRY | cut -d/ -f4` | |
PPA=`echo $ENTRY | cut -d/ -f5` | |
echo sudo apt-add-repository ppa:$USER/$PPA | |
done | |
done |