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 |
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
| # 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 |
| #!/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 |
| 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 | |
| # 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 |
| 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" |
| # 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 - |
| # remove | |
| /usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist | |
| # restore | |
| /usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist |