Tran Nghi's Site  - Make notes and share experience

Rejecting Unknown Local Recipients with Postfix

By default, the Postfix SMTP server rejects mail for unknown recipients in local domains.. this configuration causes the problem when you try sending an email (ie. from Mozilla Thunderbird) to unknown user in the same domain, it will pop-up a windows like this (it was not happened with Gmail): I found this regarding document (http://www.postfix.org/LOCAL_RECIPIENT_README.html), but this made…

Share bash script to perform backup mysqldump from remote server

#! /bin/bash   BK_TIME=`date +\%Y%m%d%H%M` FILE_DATE=`date +"%Y%m%d%H%M"`.sql.gz HOST=xxx.xxx.xxx.xxx PORT=3306 DATABASES="database1 database2 database3" USER=’noname’ PASS=’someth1ng’ BACKUPFOLDER=/home/backups/databases NUMBER_OF_BKDAYS=+182   for DB in $DATABASES do printf "\nPreparing to perform mysqldump backup for %s\n" $DB BK_DIR=$BACKUPFOLDER/$DB   if [ ! -e $BK_DIR ]; then echo "Dir" $BK_DIR "is not exited. Create new dir…" mkdir $BK_DIR chown root:users $BK_DIR chmod…

Hệ thống giám sát cảnh báo sự cố

(Bài viết sưu tầm) – Giới thiệu hệ thống giám sát cảnh báo sự cố A) Nhu cầu: Xu hướng hội nhập, tiến bộ khoa học kỹ thuật được áp dụng rộng rãi trong các doanh nghiệp đặc biệt việc ứng dụng công nghệ thông tin không còn xa lạ với mỗi doanh nghiệp từ…

Reset root password on Ubuntu

By default the first user’s account is an administrative account, so if the UI is prompting you for a password it’s probably that person’s user password. If the user doesn’t remember their password you need to reset it. To do this you need to boot into recovery mode. Boot up the machine, and after the BIOS screen,…

Install phpmyadmin and some issues

Firstly, I followed this tutorial to install myadmin… link to tutorial ~# apt-get -y install phpmyadmin php-mbstring php-gettext step1) select which one you using (this example selects apache2) step2) answer “No” to proceed on this example Change some settings to enable login to phpMyAdmin with root.. see my previous post here Secondly, sometime I really get annoying that I…

#1698 – Access denied for user ‘root’@’localhost’

I was facing the same problem when using mariaDB with phpmyadmin (Ubuntu 16.04LTS). Firstly, try to follow below post for install MariaDB or MySQL: Prerequisites: 1) Install MariaDB sudo apt-get -y install mariadb-server mariadb-client sudo mysql_secure_installation (answer to some interactive questions): Enter current password for root (enter for none): <enter> Set root password: n Remove…

Kiểm tra tốc độc mạng với Iperf

Iperf là một công cụ miễn phí, dùng để đo lường lượng dữ liệu mạng (throughput) tối đa mà một server có thể xử lý. Công cụ này rất hữu ích để truy tìm ra các vấn đề đối với hệ thống mạng bởi Iperf có thể xác định được server nào không xử lý…

vnStat – Light Weight Console-based Network Monitor

vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won’t actually be sniffing any traffic and also ensures light use of system resources. In this tutorial…

How to test upload/download bandwidth of your VPS

After running a VPS for a while, some sysadmin maybe want to determine the upload/download bandwidth of their VPS. Below is somehow I tried to test the upload/download bandwidth of my VPS. A note is that, you might need to make 02 steps to clarify the exact upload/download bandwidth of your VPS(:from your VPS to…

Manage Processes from the Linux Terminal – 10 Commands You Need to Know

The Linux terminal has a number of useful commands that can display running processes, kill them, and change their priority level. This post lists the classic, traditional commands, as well as some more useful, modern ones. Many of the commands here perform a single function and can be combined — that’s the Unix philosophy of…

Message