[Excerpt-linux-learning] basic Operation command record __linux

Source: Internet
Author: User
Tags memcached memory usage iptables port number
1, compile ordinary C file: gcc main.c-o main

2. Start memcached/memcached-d-M 128-u root-l 10.161.231.6-p 12001-c 256-p/tmp/memcached12001.pid
3, start the background program run Nohup/smartparkmemcached.out > Xxxx.log 2>&1 &
4. View user memory usage: top-u root
5. View disk space usage: df-h
6. See if a software is installed: rpm-qa|grep-i MySQL
7, uninstall a software: Yum-y remove mysql-5.5*
8, to see if a port number is in use: NETSTAT-APN | grep 3306
9. View firewall Status: Service iptables status
10, Statistics TCP process status: Netstat-n | awk '/^tcp/{++y[$NF]} end {to (w in y) Print W, y[w]} '
11, the query specifies whether the port number is occupied command: NETSTAT–APN | grep 8080
12, add the port number in the firewall and Save: (port number 10005 for example) add:/sbin/iptables-i input-p tcp-m State--state new-m TCP--dport 10005-j ACCEPT Save:/e Tc/init.d/iptables Save

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.