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 passwd root; | |
su - root; | |
sudo adduser sentry ; adduser sentry sudo; | |
su - sentry; | |
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get install build-essential python-dev; | |
apt-get install curl | |
curl -O http://python-distribute.org/distribute_setup.py | |
sudo python distribute_setup.py ; rm distribute* |
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 apt-get install postfix -y && sudo apt-get install dovecot-imapd dovecot-pop3d -y |
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
--- | |
vagrantfile-local: | |
vm: | |
box: puphpet/ubuntu1404-x64 | |
box_url: puphpet/ubuntu1404-x64 | |
hostname: '' | |
memory: '512' | |
cpus: '1' | |
chosen_provider: virtualbox | |
network: |
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
#restauracion de db en mysql | |
#mysql --host [servername] -u root -p[root_password] [database_name] < dumpfilename.sql | |
#restauracion de db en postgresql | |
#pgdump -h [servername] -U [user] -d your_db_name < dbbackup | |
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 | |
BACKUP_DIR=/home/backup | |
#descargamos la db | |
mysqldump --host servername -u root -p (rootpass) dbtodump > dumpfile.sql | |
# para descargar una sola tabla sin descargar toda la db usariamos : | |
# mysqldump -u root -p rootpass dbname table_name \ /home/backup/table.sql | |
#para descargarlas todas: |
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
# min hor diames diasem comand | |
00 00 * * * sh /home/backup/pgbackup.sh | |
#ejemplo de backup diario con postgresql a las 00 tirando desde el script pgbackup.sh |
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
#/etc/supervisor/conf.d/sentry.conf | |
program:sentry-web] | |
directory=/home/sentry/ | |
command=/home/sentry/.virtualenvs/sentry_env/bin/sentry start http | |
autostart=true | |
autorestart=true | |
redirect_stderr=true |
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
#/home/sentry/.sentry/ | |
# This file is just Python, with a touch of Django which means you | |
# you can inherit and tweak settings to your hearts content. | |
from sentry.conf.server import * | |
import os.path | |
CONF_ROOT = os.path.dirname(__file__) |
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
#/etc/nginx/sites-available/ | |
server { | |
# listen on port 80 | |
listen 80; | |
# for requests to these domains | |
server_name logs.devopen.com; | |
# keep logs in these files |
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 | |
BACKUP_DIR=/home/sentry/backup | |
cd $BACKUP_DIR | |
#Exportamos la base de datos | |
pg_dump -h direccion_ip -U user -d your_sentry_db_name > dbbackup.sql | |
#compresion de base de datos | |
tar -cf $BACKUP_DIR/bd$(date +%d-%m-%y_%H:%M).tar dbbackup.sql |