Skip to content

倪之帅 Victor 个人主页

  • Home
  • Tech
    • Linux
    • LNMP
    • Mac
    • Mobile
    • Products
    • SMS
August 29, 2015 / Linux

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]>”

May 16, 2018 / Linux

Check cron log

tail /var/log/cron
June 13, 2018 / Linux

Mysql database Export and Import

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
May 16, 2018 / Linux

How to install Samba server on CentOS 7

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
October 8, 2014 / Linux

Remove CD-ROM from apt-get repositories Debian 7

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.

 

August 23, 2014 / Linux

Qemu install windows

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

August 23, 2014 / Linux

Debian Support NTFS read and write

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

May 16, 2018 / SMS

Debian SMS system

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');

 

April 26, 2014 / Linux

Install MongoDB on Amazon Linux

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 …

Continue Reading
April 21, 2014 / Linux

Formatting and Mounting Amazon EC2 Instance Ephemeral Storage

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 …

Continue Reading

Posts navigation

  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

Categories

  • Linux
  • LNMP
  • Mac
  • Mobile
  • PHP
  • Products
  • SMS
  • Uncategorized
  • VPS
  • 原创
  • 技术

Recent Posts

  • 宝塔面板修改composer默认PHP版本
  • PHP代码http跳转到https
  • 宝塔php 7.2,php7.3,php7.4 安装 mcrypt 扩展
  • 9 Best Free FTP Server Software
  • Mysql database copy command

Archives

  • June 2020
  • June 2019
  • October 2018
  • May 2018
  • April 2018
  • March 2018
  • July 2016
  • June 2016
  • April 2016
  • November 2015
  • October 2015
  • May 2015
  • April 2015
  • February 2015
  • January 2015
  • December 2014
  • October 2014
  • August 2014
  • April 2014
  • June 2011
  • June 2010
  • May 2010
  • April 2010
  • May 2006
  • November 2005
  • December 2004
  • June 2004
  • March 2003
  • October 2002
  • January 2001
  • March 2000
© 2022 倪之帅 Victor 个人主页