Config is 2vCPU, 2 GB RAM and running Debian 7 on 64 bits.
apt-get update
apt-get upgrade
apt-get install htop
Add localadmin user
adduser localadmin
apt-get install sudo
# shell command: | |
pg_dump <db_name> -U <db_user> -h <db_host> | gzip | curl -u <ftp_user>:<ftp_password> ftp://<ftp_host>/`date '+%Y-%m-%d_%H-%M'`/db_backup.sql.gz --ftp-create-dirs -T - | |
# if you want to execute it through cron, be sure to escape all %! | |
# for crontab: | |
pg_dump <db_name> -U <db_user> -h <db_host> | gzip | curl -u <ftp_user>:<ftp_password> ftp://<ftp_host>/`date '+\%Y-\%m-\%d_\%H-\%M'`/db_backup.sql.gz --ftp-create-dirs -T - |
lftp -u <ftp_user>,<ftp_password> <ftp_host> -e "rm -rf `date --date="3 days ago" '+%Y-%m-%d_'`*; exit" | |
# make sure to escape % for cron: | |
lftp -u <ftp_user>,<ftp_password> <ftp_host> -e "rm -rf `date --date="3 days ago" '+\%Y-\%m-\%d_'`*; exit" |
#!/bin/bash | |
# the source: http://serverfault.com/questions/515833/how-to-remove-private-key-password-from-pkcs12-container | |
if [ $# -ne 2 ] | |
then | |
echo "Usage: `basename $0` YourPKCSFile YourPKCSPassword" | |
exit $E_BADARGS | |
fi |
curl -u <username_here> https://api.github.com/user/repos -d '{"name":"curltest", "description": "testing description"}' | |
=> Enter passphrase: | |
// Example test case(below): | |
cd <local_repo_dir_path> | |
mkdir curltest | |
cd curltest | |
git init | |
touch curltest.txt | |
subl& culrtest.txt |
#!/bin/bash | |
## Install ISPConfig 3.x on CentOS 7 64Bits | |
## http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html | |
## https://www.howtoforge.com/tutorial/perfect-server-centos-7-2-apache-mysql-php-pureftpd-postfix-dovecot-and-ispconfig/2/ | |
## http://nareshv.blogspot.com.br/2014/02/configure-hhvm-with-apache-fastcgi-on.html | |
## ISPConfig3 3.x + Apache2 + CentOS 7 64Bits | |
## VM HD 50GB, swap 2GB, / 19GB, /var/www all | |
## Filesystem ext4 | |
## Run as root |
# Copied from http://ttaportal.org/wp-content/uploads/2012/10/7-Reallocation-using-LVM.pdf | |
## | |
## Showing the problem: need to reallocate 32GB from /dev/mapper/pve-data to /dev/mapper/pve-root | |
## | |
df -h | |
# Filesystem Size Used Avail Use% Mounted on | |
# /dev/mapper/pve-root 37G 37G 0 100% / | |
# tmpfs 2.0G 0 2.0G 0% /lib/init/rw |
Config is 2vCPU, 2 GB RAM and running Debian 7 on 64 bits.
apt-get update
apt-get upgrade
apt-get install htop
Add localadmin user
adduser localadmin
apt-get install sudo
# generate OpenSSL CSR here | |
# https://www.digicert.com/easy-csr/openssl.htm | |
# to cer | |
cat COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > yourdomain.com.cer | |
# to pem | |
cat yourdomain.com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt yourdomain.com.key > yourdomain.com.pem |
# user http; | |
# user www-data; | |
worker_processes 4; | |
# [ debug | info | notice | warn | error | crit ] | |
error_log /var/log/nginx/error.log warn; | |
events { | |
worker_connections 1024; |
# frontend | |
server { | |
listen 80; | |
server_name yii2.lo; | |
server_tokens off; | |
client_max_body_size 128M; | |
charset utf-8; | |
access_log /var/log/nginx/yii2-access.log main buffer=50k; |