Add EBS to Ubuntu EC2 Instance
source: http://stackoverflow.com/questions/11535617/add-ebs-to-ubuntu-ec2-instance additional info: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html Since this is a new volume, you need to format the EBS volume (block device) with a file system between step 1 and step 2. So the entire process with your sample mount point is:…
Add EBS VOLUME to Ubuntu EC2 Instance
Lets say we want to mount /var into new partition: 1. create new volume (leave snapshot id empty) 2. name new volume [var-vol] 3. attach volume to instance: right-click on volume/attach and choose the ec2 instance 4. format the instance:…
Ubuntu 12.04 on Amazon EC2: /dev/xvda1 will be checked for errors at next reboot
*** /dev/xvda1 will be checked for errors at next reboot *** It is a bug on Ubuntu 11.04 and 12.04 ... which causes a file to be created with a future time stamp that contains that message. The simplest solution…
How to backup mysql database (command line)
To backup: mysqldump -u username -p database_to_backup > backup_name.sql To restore: mysql -u username -p CREATE DATABASE database_name; exit mysql -u username -p database_name < backup_name.sql
W: GPG error
- problem: W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8AB767895ADC2037 - to fix: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8AB767895ADC2037
tar – archive utility
To view the contents of tar file without extracting tar -tf filename.tar.gz To extract specific file from tarball tar --extract --file={tarball.tar} {file} tar --extract --file=cbz.tar css
Install PECL uploadprogress
https://drupal.org/node/793264 https://drupal.org/node/1332446
How to install latest PHP 5.4.x on Ubuntu 12
http://www.dev-metal.com/how-to-install-latest-php-5-4-x-on-ubuntu-12-04-lts-precise-pangolin/
How To Use Top, Netstat, Du, & Other Tools to Monitor Server Resources
https://www.digitalocean.com/community/articles/how-to-use-top-netstat-du-other-tools-to-monitor-server-resources
How to verify whether DNS is working correctly
http://www.akadia.com/services/check_dns.html
How to rsync – one way only!
For example you want to rsync "/var/lib/mysql" from "/somefolder/var/lib/mysql", use the following syntax ( for local folders): rsync -avz /somefolder/var/lib/mysql/ /var/lib/mysql (notice the trailing '/' at the end of the source path and the lack of it at the destination path!)…
Postfix mail queue
To flush queue Traditionally you use the "sendmail -q" command to flush mail queue under Sendmail MTA. Under Postfix MTA, just enter the following command to flush the mail queue: # postfix flush OR # postfix -f To see mail…
Use pkill -f, which matches the pattern for any part of the command line
pkill -f my_pattern
How To Add Swap on Ubuntu 12.04
To add a swap-partition instead of swap-file: blkid /dev/sdax (get UUID) mkswap /dev/sdax (format swap partition) swapon -U xxx nano /etc/fstab (edit fstab) UUID=xxx none swap sw 0 0 (enter and save this text to make swap permanant) (then close…
20 Netstat Commands for Linux Network Management
http://www.tecmint.com/20-netstat-commands-for-linux-network-management/