shopify analytics ecommerce

admin Archive

Server Monitoring with PHP

In the internet have so many server monitoring scripts has many features, but if you’re like me, just want get a notice when the server is down, and all are httpd server, you can simply achieve through PHP, for example, you may very …

File transfer via SSH

When sending files between two hosts, with the ftp command is very convenient, but another more secure approach is through SSH to transfer, and use very simple, as long as you can use scp command. If you want to lower / home / …

PHP’s timezone settings

After the upgrade to PHP 5.3, similar to the following error message appears when using date-related functions: Warning: strtotime () : It is not safe to rely on the system’s timezone settings You are * required * to use the date.timezone setting or …

Linux block ip with iptables

If you want to block ip of network traffic, you can achieve through iptables under Linux, instructions are as follows: iptables -A INPUT -s IP_ADDRESS -j DROP Just want to block the ip method above IP_ADDRESS position before it. There is a case …

[Perl Script] — Backup MySQL

This is a MySQL backup tool written by Perl, please modify the follow variable for your setting: $db_username: mysql username $db_password: mysql password $db_host: mysql server hostname $mysqldump: mysqldump path $backup_dir: path ofsave backup files $rotate: number of backup copy keep @backup_db: backup …

MySQL Backup Shell Script

This is the Shell Script for backup MySQL database, it will use mysqldump create backup files and use gzip compressing to .gz files. This script will save 5 days backup and able to auto rotate. Usage: Modify db_user, db_passwd and db_host to your …

RHEL / CentOS install MRTG

MRTG (Multi Router Traffic Grapher) is a traffic monitoring tools based on SNMP protocol, this is the steps of install MRTG on RHEL and CentOS 1. Install MRTG: # yum install mrtg net-snmp net-snmp-utils 2. Setup SNMP: edit /etc/snmp/snmpd.conf and add this line: …

Sudo without password

This is the steps for setup sudo without password: 1. run visudo edit sudo config file: # sudo visudo 2. e.g. if the user is user123, find this line: user123 ALL=(ALL) ALL change to user123 ALL=NOPASSWD: ALL save and exit, next time when …