Kill-HUP 'cat/usr/local/nginx/logs/nginx. Pi' restart nginx
VI/usr/local/nginx/CONF/nginx. conf
Chmod-r 777 wwwcn add permissions
Reboot restart Server
Iptraf Network Monitoring
CP-a replication
/Sbin/service vsftpd restart start FTP
Service httpd restart
/Etc/rc. d/init. d/httpd restart
# Uname-A # view kernel/operating system/CPU Information
# Head-N 1/etc/issue # view the operating system version
# Cat/proc/cpuinfo # view CPU Information
# Hostname # view the computer name
# Lspci-TV # list all PCI devices
# Lsusb-TV # list all USB devices
# Lsmod # list loaded Kernel Modules
# Env # view environment variables
Resources
# Free-M # view memory usage and swap zone usage
# DF-h # view the usage of each partition
# Du-SH <Directory Name> # view the size of a specified directory
# Grep memtotal/proc/meminfo # view total memory
# Grep memfree/proc/meminfo # view the Amount of idle memory
# Uptime # view system running time, number of users, and load
# Cat/proc/loadavg # view system load
Disks and partitions
# Mount | column-T # view the status of the mounted Partition
# Fdisk-L # view all partitions
# Swapon-s # view all swap partitions
# Hdparm-I/dev/hda # view disk parameters (only applicable to ide devices)
# Dmesg | grep ide # view the IDE Device Detection Status at startup
Network
# Ifconfig # view the attributes of all network interfaces
# Iptables-L # view firewall settings
# Route-N # view the route table
# Netstat-lntp # view all listening ports
# Netstat-antp # view all established connections
# Netstat-s # view network statistics
Process
# Ps-Ef # view all processes
# Top # display Process status in real time
User
# W # view active users
# Id <User Name> # view specified user information
# Last # view User Logon logs
# Cut-D:-F1/etc/passwd # view all users in the system
# Cut-D:-F1/etc/group # view all groups in the system
# Crontab-L # view the scheduled tasks of the current user
Service
# Chkconfig -- list # list all system services
# Chkconfig -- list | grep on # list all started system services
Program
# Rpm-Qa # view all installed software packages
-----------------------------------
Server
{
Listen 80;
SERVER_NAME count.www.cn;
Index. html index.htm index. php;
Root/home/www/count;
Location ~ . */. (PhP | PhP5 )? $
{
Fastcgi_pass Unix:/tmp/PHP-cgi.sock;
# Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Fcinclude gi. conf;
}
Location ~ . */. (GIF | JPG | JPEG | PNG | BMP | SWF) $
{
Expires 30d;
}
Location ~ . */. (JS | CSS )? $
{
Expires 12 h;
}
Access_log off;
}