Centos 常用命令备注
来源:互联网 发布:java中对象多态的理解 编辑:程序博客网 时间:2024/06/05 02:22
kill -HUP `cat /usr/local/nginx/logs/nginx.pid` 重启NGINX
vi /usr/local/nginx/conf/nginx.conf
chmod -R 777 wwwcn 添加权限
reboot 重启服务器
iptraf 网络监视
cp -a 复制
/sbin/service vsftpd restart 启动FTP
service httpd restart
/etc/rc.d/init.d/httpd restart
# uname -a # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue # 查看操作系统版本
# cat /proc/cpuinfo # 查看CPU信息
# hostname # 查看计算机名
# lspci -tv # 列出所有PCI设备
# lsusb -tv # 列出所有USB设备
# lsmod # 列出加载的内核模块
# env # 查看环境变量
资源
# free -m # 查看内存使用量和交换区使用量
# df -h # 查看各分区使用情况
# du -sh <目录名> # 查看指定目录的大小
# grep MemTotal /proc/meminfo # 查看内存总量
# grep MemFree /proc/meminfo # 查看空闲内存量
# uptime # 查看系统运行时间、用户数、负载
# cat /proc/loadavg # 查看系统负载
磁盘和分区
# mount | column -t # 查看挂接的分区状态
# fdisk -l # 查看所有分区
# swapon -s # 查看所有交换分区
# hdparm -i /dev/hda # 查看磁盘参数(仅适用于IDE设备)
# dmesg | grep IDE # 查看启动时IDE设备检测状况
网络
# ifconfig # 查看所有网络接口的属性
# iptables -L # 查看防火墙设置
# route -n # 查看路由表
# netstat -lntp # 查看所有监听端口
# netstat -antp # 查看所有已经建立的连接
# netstat -s # 查看网络统计信息
进程
# ps -ef # 查看所有进程
# top # 实时显示进程状态
用户
# w # 查看活动用户
# id <用户名> # 查看指定用户信息
# last # 查看用户登录日志
# cut -d: -f1 /etc/passwd # 查看系统所有用户
# cut -d: -f1 /etc/group # 查看系统所有组
# crontab -l # 查看当前用户的计划任务
服务
# chkconfig --list # 列出所有系统服务
# chkconfig --list | grep on # 列出所有启动的系统服务
程序
# rpm -qa # 查看所有安装的软件包
-----------------------------------
server
{
listen 80;
server_name count.www.cn;
index 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;
include fcgi.conf;
}
location ~ .*/.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*/.(js|css)?$
{
expires 12h;
}
access_log off;
}
- Centos 常用命令备注
- Centos 常用命令备注
- linux常用命令备注
- Git常用命令备注
- SVN常用命令备注
- 【Linux起步】Vim常用命令备注
- CentOS常用命令
- CentOS常用命令
- CentOS常用命令
- CentOS常用命令
- CentOS常用命令
- CentOS常用命令
- centos常用命令
- CentOS 常用命令
- centos 常用命令
- CentOS常用命令
- Centos 常用命令
- centos常用命令
- command line option syntax error/type command for help错误
- 快成了年记了
- 全角和半角的字母、数字之间的转换(别人写的)
- 有关日期格式转换的问题
- 堆和栈的区别(转过无数次的文章)
- Centos 常用命令备注
- spring 2.0 mvc 配制与helloworld
- Apk修改后重新打包、签名
- 零起点学习Linux系列培训视频 [共61课] (万分感谢寒冰老师分享!)
- ExtJs日期控件只读
- 关于分离线程的一种用法
- Form表单验证程序(Ajax)
- 工作流的几个简单节点
- Ubuntu 10.04下设置网络连接