zoukankan      html  css  js  c++  java
  • Linux基础命令【记录】

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

    查看端口、查找等命令

    根据关键字查找文件信息: 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/45293167

    更新系统 :yum update 

       报错信息如下时:

    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

    解决办法:

    rm -rf /var/run/yum.pid 来强行解除锁定,然后就可以正常使用你的yum了

    1.rz命令安装

    root 账号登陆后执行以下命令:yum install -y lrzsz

    1.2.使用说明

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

          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
  • 相关阅读:
    线段树入门总结
    从零基础学三分查找
    Codeforces Beta Round #1 A,B,C
    isupper()函数
    matlab字符串操作总结
    hdu 4873 ZCC Loves Intersection(大数+概率)
    设计模式入门之桥接模式Bridge
    有关UIWebView的SSL总结
    vmware虚拟机上linux操作系统进行tty1~tty6切换方法和具体步骤
    Python BeautifulSoup4 使用指南
  • 原文地址:https://www.cnblogs.com/miskis/p/9488715.html
Copyright © 2011-2022 走看看