easysite项目常用linux命令

来源:互联网 发布:淘宝怎么修改送货时间 编辑:程序博客网 时间:2024/06/16 00:41
查看ip地址ifconfig


查看java进程ps -ef|grep java
kill -9 


防火墙
service iptables status
1) 重启后生效 
开启: chkconfig iptables on 
关闭: chkconfig iptables off 
2) 即时生效,重启后失效 
开启: service iptables start 
关闭: service iptables stop 

TMOUT=0

查看磁盘
df -hl
du -s
du -sh 查看大小


查看内存
free

压缩
tar –xvf file.tar 

-r 就是向下递归,不管有多少级目录,一并删除
-f 就是直接强行删除,不作任何提示的意思
删除文件夹实例:
rm -rf /var/log/httpd/access


查看文件夹大小
du -s /home


压缩
zip  -r fileName.zip  文件夹名
zip FileName.zip DirName
查看日志tail -f catalina.out


tail -f catalina.out
service httpd stop
ps -ef|grep java
kill -9 

rm -rf 目录名字 删除


查询是否安装 rpm -q 


硬盘挂载
mkdir /easysite


mkfs.ext3 /dev/xvde 


mount /dev/xvde /easysite 


echo "/dev/xvde /easysite ext3 defaults 1 1" >> /etc/fstab


unzip 


service httpd start 启动
service httpd restart 重新启动
service httpd stop 停止服务


查看apache
apachectl -v


ps aux | grep httpd 
查看apache是否已经启动






rsync -vzrtopg --delete --password-file=/etc/rsync.pas --progress root@172.26.14.162::ROOT /easysite/ROOT
rsync -vzrtopg --delete --password-file=/etc/rsync.pas --progress root@172.26.14.162::fileDir /easysite/eportal/fileDir
rsync -vzrtopg --delete --password-file=/etc/rsync.pas --progress root@172.26.14.162::immovableDir /easysite/eportal/immovableDir
rsync -vzrtopg --delete --password-file=/etc/rsync.pas --progress root@172.26.14.162::uiFramework /easysite/eportal/uiFramework
0 0
原创粉丝点击