Change website

From Jan 16 2015,


All post content will be move to we's offical website with many content...

Can access website here: http://justox.com

Thanks for your visit!

Showing posts with label UNIX. Show all posts
Showing posts with label UNIX. Show all posts

Friday 27 December 2013

Fixed Nginx: 413 Request Entity Too Large Error and Solution

'm running nginx as a frond end to php based Apache+mod_fastcgi server. My app lets user upload images upto 2MB in size. When users trying to upload 1.5MB+ size image file using nginx reverse proxy, they are getting the following error on screen:
Nginx 413 Request Entity Too Large
How do I fix this problem and allow image upload upto 2MB in size using nginx web-server working in reverse proxy or stand-alone mode on Unix like operating systems?
You need to configure both nginx and php to allow upload size.

Thursday 19 December 2013

How To Export MySQL data to CSV file

In this article I'll show you how to export MySQL database to a CSV file.
1. Export MySQL data to CSV file using a simple "SELECT" statement

If you want to export your mysql table into a csv file you need to run the following command:
# mysql -u username -ppassword database -e "SELECT * INTO OUTFILE '/tmp/filename.csv'  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"'  LINES TERMINATED BY '\r\n' FROM table;"

How To add Extra Repositories in Ubuntu Linux

A software repository is a storage location from which software packages may be retrieved and installed on a computer.
It's very easy to add extra repositories in Ubuntu Linux. In this article I'll show you how to add some useful repositories to your Ubuntu distribution.
First, we have to backup our sources.list by typing in terminal:

Bandwidth Monitoring Tools for FreeBSD and Linux: nload

Bandwidth in computer networking refers to the data rate supported by a network connection and it represents the capacity of the connection.
nload is a ncurse based network traffic analyser.

How To Change MAC Address in Linux, BSD, Unix

Media Access Control address (MAC address) is a unique identifier assigned to most network adapters or network interface cards (NICs) by the manufacturer for identification, and used in the Media Access Control protocol sub-layer. If assigned by the manufacturer, a MAC address usually encodes the manufacturer's registered identification number. It may also be known as an Ethernet Hardware Address (EHA), hardware address, adapter address, or physical address.

Linux Tips: Keyboard shortcuts and command line tricks

In this article I will show you some keyboard shortcuts and other command line tricks to make entering commands easier and faster. Learning them can make your life a lot easier!
Here are some keyboard shortcuts you can use within terminal:

UNIX Tools: vmstat – report virtual memory

vmstat is a computer system monitor tool that collects and displays summary information about operating system memory, processes, interrupts, paging and block I/O information.
1vmstat
vmstat sample output
vmstat usage:

UNIX Tools: mytop – MySQL Monitoring

MyTop is a console-based tool for monitoring the threads and overall performance of a MySQL server. It runs on most Unix systems. MyTop is a top clone for MySQL Server.
To install MyTop under FreeBSD, enter:
1make install clean -C /usr/ports/databases/mytop

UNIX Tips: How to find broken symbolic

In computing, a symbolic link (also symlink or soft link) is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.
1. To display a list of the broken links, execute:
1find -L ${dir} -type l
2. To remove the broken links, execute:
1find -L ${dir} -type l -print0 | xargs -0 rm