Linux基础命令【记录】

 后台运行详情:https://www.cnblogs.com/little-ant/p/3952424.htmlhtml

查看端口、查找等命令linux

根据关键字查找文件信息: cat <文件名> | grep <关键字>

查询文件信息 显示100行: tail -100f easyhome.all.log |grep "guard" -n10

更改文件权限:chmod -R  777 文件名称、文件夹名称

查询端口信息:netstat -apn | grep 4040 

查看端口信息:ps -ef |grep tomcat          lsof -i:5300

根据关键字查找:grep -rn "关键字" 路径

参考:http://blog.csdn.net/wjcquking/article/details/45293167redis

更新系统 :yum update 

   报错信息以下时:vim

Loaded plugins: fastestmirror
Existing lock /var/run/yum.pid: another copy is running as pid 2503.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  19 M RSS (306 MB VSZ)
    Started: Thu Oct 29 23:03:02 2015 - 04:00 ago
    State  : Traced/Stopped, pid: 2503

解决办法:tomcat

rm -rf /var/run/yum.pid 来强行解除锁定,而后就能够正常使用你的yum了服务器

1.rz命令安装

root 帐号登录后执行如下命令:yum install -y lrzszsession

1.2.使用说明app

      sz命令发送文件到本地: sz filenamepost

      rz命令本地上传文件到服务器:rz测试

执行该命令后,在弹出框中选择要上传的文件便可。
      说明:打开SecureCRT软件 -> Options -> session options -> X/Y/Zmodem 下能够设置上传和下载的目录。

2.unzip 安装:yum install unzip

3.安装wget。

安装命令:yum -y install wget

参考地址:http://www.cnblogs.com/UncleFreak/p/5720996.html

4.netstat 安装

安装命令: yum install net-tools

 5.安装gcc

安装命令:yum  install  gcc

6.linux下redis设置密码登陆

redis设置密码访问

你的redis在真是环境中不能够谁想访问就能够访问,因此必需要设置密码

设置密码的流程以下:

vim  /etc/redis.conf 找到480行

#requirepass foobared去掉注释,foobared改成本身的密码,我在这里改成

requirepass 123456

而后保存,重启服务

cd /usr/local/bin

./redis-server /etc/redis.conf

测试链接:./redis-cli 

输入命令 会提示(error) NOAUTH Authentication required. 这是属于正常现象。

咱们输入 auth  123456#你刚才设置的密码

查看全部打开的端口命令

 firewall-cmd --zone=public --list-ports

列出全部端口:

netstat -ntlp
相关文章
相关标签/搜索