lsof 大家都知道是用来查看当前文件系统中被打开的文件。
其实有一个问题,我们在用rm删除文件的时候,有可能误操作把有些重要文件删掉了。怎么回复呢。
通过这个功能我们可以将一些被删除的文件恢复。
当Linux计算机受到入侵时,常见的情况是日志文件被删除,以掩盖攻击者的踪迹。管理错误也可能导致意外删除重要的文件,比如在清理旧日志时,意外地删除了数据库的活动事务日志。有时可以通过lsof来恢复这...
wordpress 取消ftp方式安装插件
默认安装的wp 插件和主题安装方式都比较单一,需要ftp信息,有的服务器没有就很麻烦,因此这里推荐一个取消ftp安装插件的方式:
切换到wordpress应用目录。修改wp-config.php文件
在该文件中加入
define('FS_METHOD', 'direct');
PS:需要调整目录权限为755 或者777
利用iftop查看Linux中网络流量情况
windows /Linux 系统运维交流群 30733661 欢迎各位圈内好友加盟
最近有朋友问我 服务器访问特别慢,经过好多方法,都没有解决,问有没有什么好的软件来查看服务器流量。
这里我给大家推荐一款软件
iftop 是类似于top的实时流量监控工具。
主要用于显示本地网络流量情况和跟其他主机的相互通信流量情况。
主要有几个参数
Cumm:运行iftop到目前时间的总流量
peak:流量峰值
rates:分别表示过去 2s 10s 40s ...
docker安装配置-自学笔记
docker
1.git clone https://git.oschina.net/bjtenao/docker-training.git
yum install -y epel-release
yum install docker-io -y
2.
#. 表示dockerfile的目录 为当前目录
docker build -t csphere/centos:7.1 .
PS:
docker run -it 启动是交互式模式 把docker启动到前台
docker run -d 后台启动,返回一个id号
docker run -d -P 22 ( expose 是22的时候,宿主机会随机给个...
Linux shell 自动重启脚本
#!/bin/sh
source /etc/profile
proc_name="iget_spider"
#current_time=`date +%Y%m%d+%H%M%s`
NUM=`ps -ef|grep $proc_name|grep -v grep|wc -l`
proc=`ps -ef|grep $proc_name|grep -v grep`
echo "--------------num is:"$NUM ";time is :"$(date) ";proc is " $proc "-------------"
if [ $NUM -eq 0 ]
then
echo -e $NUM
echo -e "the spider not alive,start spider"
cd /home...
Mysql连接不上提示 Can’t connect to MySQL server on ‘ip’ (13)
我的web应用服务器192.168.133.82远程连接mysql服务端 192.168.133.66:
下面是php的连接信息
$host = "192.168.133.82";
$user = "root";
$pass = "rootpassword";
$database = "test";
#$con=@mysql_connect("$host","$user","$pass") or die('Error connecting to mysql');
$con = mysql_connect("$host", "username", "password") or die(mysql_error());
$db="$database"; @mysql_select_db($db, $con...
supervisor守护scala应用故障处理
在部署scala应用时,使用supervisor做进程守护时提示:
Oops, cannot start the server.
java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:339)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io....
【CentOS5.3 64位系统Tomcat6.0无法启动】
这个错误如果从没见过,绝对会浪费大家好多时间去查找,而且网上千篇文章都没有一个真正的解决办法!欢迎请大家转载!!
新服务器配置tomcat6.0环境,配置完毕后,无法正常启动。报错如下:shutdown 端口看似被占用,但是换成其他端口还是无法启动;
2010-11-13 10:16:06 org.apache.catalina.core.StandardServer await
严重: StandardServer.await: create[8001]:
java.net.BindException: Cannot...
linux 挂载新硬盘,重启后自动挂载
1.新拿到一台liux主机,默认增加的硬盘没有挂载。所以需要创建文件系统同时挂载到一个目录下
#首先查看一下当前系统下有几块硬盘
[root@localhost tmp]# fdisk -l
Disk /dev/xvda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 by...
Nginx 安装php-fpm
Nginx 安装php-fpm
nginx本身不能处理PHP,它只是个web服务器,当接收到请求后,如果是php请求,则发给php解释器处理,并把结果返回给客户端。
nginx一般是把请求发fastcgi管理进程处理,fascgi管理进程选择cgi子进程处理结果并返回被nginx
本文以php-fpm为例介绍如何使nginx支持PHP
一、编译安装php-fpm
什么是PHP-FPM
PHP-FPM是一个PHP FastCGI管理器,是只用于PHP的,可以在 http://php-fpm.org/download...