zoukankan      html  css  js  c++  java
  • linux命令

    ssh root@192.168.70.131 连接服务器
    su root 切换账户 root
    ip a 查看ip
    ll 文件列表
    ls 文件列表
    cd /ect 进入文件
    cd .. 返回上级目录
    cd ~ 代表home目录
    cd -
    rm 1.png 删除文件 (linux没有回收站,删除后找不回来)
    rm -rf /var/log/httpd/access 删除/var/log/httpd/access目录以及其下所有文件、文件夹
    rm -f /var/log/httpd/access.log 将会强制删除/var/log/httpd/access.log这个文件
    sz tt.txt 下载文件
    find / -name tnsnames.ora 查找某个文件位置
    whereis php 查看php安装位置
    wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz 远程下载
    tar -zxvf zlib-1.2.11.tar.gz 解压
    cd zlib-1.2.11 进入文件
    ./configure 配置
    ./configure --prefix=/user/local/php-5.6.30 制定配置
    ./configure
    make 编译
    make install 安装
    make uninstall 卸载

    php -v 检测php是否安装成功(如果没有安装php,一般会提示没有php这个命令的)

    ps -e 查看所有进程
    ps -ef | grep 显示某个进程
    ps -ef | grep php-fpm 显示php-fpm进程

    文件权限
    chmod 777 zhidao.txt

    退出
    Ctrl+c
    exit

    dG  删除文件内容

    vim使用
    vim三种模式:命令模式、插入模式、编辑模式。使用ESC或i或:来切换模式。
    命令模式下:
    :q 退出
    :q! 强制退出
    :wq 保存并退出
    :set number 显示行号
    :set nonumber 隐藏行号
    /apache 在文档中查找apache 按n跳到下一个,shift+n上一个
    yyp 复制光标所在行,并粘贴
    h(左移一个字符←)、j(下一行↓)、k(上一行↑)、l(右移一个字符→)



    Nginx

    开机启动      chkconfig nginx on

    Mysql

    Mysql启动             service mysqld start

    进入mysql            mysql -h127.0.0.1 -uroot -p123456 (-h 后面带的是ip,-u 后面带的是用户名 ,-p 后面带是密码)

    进入nserver库                   use nserver

    查看表                              show tables

    展示t_orders的表结构         show create table t_orders; 
    数据查询                             select * from t_orders where mobile=123123123 order by id asc;

    show create table t_orders; 展示t_orders的表结构
    select * from t_orders where mobile=123123123 order by id asc;

  • 相关阅读:
    mac下配置openCV
    K最短路 A*算法
    KMP算法
    北航复试机试题
    1385重建二叉树
    二维数组中的查找
    简单的单向链表
    Getting Started with WebRTC [note]
    我的c漏洞
    PeerConnection
  • 原文地址:https://www.cnblogs.com/wesky/p/7142009.html
Copyright © 2011-2022 走看看