linux send email mutt tool
yum install mutt
echo “Hi, database backup.” | mutt -s `date +%d/%m/%Y`” – backup ” [email protected] -a xxx.zip
Change from address
vi ~/.muttrc
set from=”Vick <[email protected]>”
yum install mutt
echo “Hi, database backup.” | mutt -s `date +%d/%m/%Y`” – backup ” [email protected] -a xxx.zip
Change from address
vi ~/.muttrc
set from=”Vick <[email protected]>”
tail /var/log/cron
Mysql export
mysqldump -u root -pxxxxx --all-databases > mysql.sql mysqldump -u root -pxxxxx --databases db1 db2 db3 > wellcome2015.sql
Mysql import
mysql -u root -pxxxxx --all-databases < mysql.sql
Command
sudo yum install samba samba-client samba-common smbpasswd -a username smbpasswd -e username
Config file
[data] path = /home/database writeable = yes public = yes
I noticed that Debian 7 uses the media in the CD-ROM when using the “apt-get” utility.
The following message comes up when attempting to install or update a program using apt-get:
Media change: please insert the disc labeled
‘Debian GNU/Linux 6.0.0 _Squeeze_ – Official i386 DVD Binary-1 20110205-17:27′
in the drive ‘/media/cdrom/’ and press enter
The fix is easy. We need to remove the CD-ROM as a source for apt-get.
To do this, edit the following file: /etc/apt/sources.list
Comment or delete the line for the CD-ROM, save the changes, and try apt-get again.
This time, it should use the online repositories.
sudo apt-get install kvm qemu vnc4server -y
mkdir /home/QEMU/
mkdir /home/QEMU/windows/
qemu-img create -f qcow /home/QEMU/windows/winxp.img 12000M
vnc4server -geometry 1024×768 -depth 24
vncpasswd
vnc4server -kill :1
Vnc clinet
Download http://www.realvnc.com/download/
qemu -boot d -cdrom /dev/cdrom -hda /home/QEMU/windows/winxp.img
apt-get install ntfs-3g exfat-fuse exfat-utils
fdisk -l
mount -t ntfs-3g /dev/hdax /mnt/windows
boot
vi /etc/fstab
/dev/hdax /mnt/windows ntfs-3g defaults 0 0
exfat
/dev/sda1/ /media/music exfat-fuse defaults 0 0
My system is Debian 7.6
apt-get install gnokii gnokii-smsd-mysql mysql-server mysql -u root -p create database smsgw; mysql -u root -p smsgw < /usr/share/doc/gnokii-smsd-mysql/sms.tables.mysql.sql vi /etc/gnokiirc vi /root/.config/gnokii/config [global] port = /dev/ttyS0 model = AT connection = serial use_locking = no serial_baudrate = 9600 smsc_timeout = 10 serial_write_usleep = 1 require_dcd = 0 /usr/sbin/smsd -u root -p -d smsgw -c localhost -m mysql When system boots vi sms.sh sleep 30 rm -rf /var/lock/LCK..ttyS0. /usr/sbin/smsd -u sms -p -d smsgw -c localhost -m mysql
install nginx php5
apt-get install nginx php5-fpm php5-mysql memcached
/etc/php5/fpm/pool.d/www.conf
listen = /var/run/php5-fpm.sock
Check system
mysql -u root -p smsgw select * from inbox; insert into outbox (number,text) values('+642', 'Tetsing Testing everyone');
Install MongoDB Use a 64-bit EC2 Amazon Linux instance to install MongoDB Add a MongoDB yum repository for a 64-bit RPM sudo vi /etc/yum.repos.d/10gen.repo [10gen] name=10gen Repository baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 gpgcheck=0 Install MongoDB sudo yum install mongo-10gen and mongo-10gen-server Setup the data directory sudo mkdir -p /data/db/ If a new EBS storage is mounted for the data …
Recently, I needed to transform and migrate about 50GB of data stored in MongoDB. I needed to do it as quickly as possible to keep disruption to a minimum so I decided to try out Amazon's High I/O Instances, specifically the High I/O Quadruple Extra Large Instance (hi1.4xlarge) which provides two SSD-based volumes each with 1024 GB …