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

    ---恢复内容开始---

    1. 改变拥有者和群组  例如: 先进入该文件目录,然后输入:chown -R apache:apache .
      -R : 对目前目录下的所有档案与子目录进行相同的拥有者变更(即以递回的方式逐个变更)
    2. 列出当前目录下的子目录和文件的详细信息  ls -l
    3. 复制文件夹到另一文件夹中 cp wx/. _wx
    4. 撤销上一次的cd操作 cd -
    5. 重命名文件 mv a.php b.php
    6. 横线代表空许可。r代表只读,w代表写,x代表可执行。注意这里共有10个位置。第一个字符指定了文件类型。在通常意义上,一个目录也是一个文件。如果第一个字符是横线,表示是一个非目录的文件。如果是d,表示是一个目录。

        例如:

        - rw- r-- r--

        普通文件 文件主 组用户 其他用户
    7. chmod 754 test

      4代表读权限,2代表写权限,1代表执行权限

      7=4 + 2 + 1,表示拥有可读可写可执行权限
      5=4 + 1,表示拥有可读可执行权限,但是没有写权限
      0 代表没有任何权限
      以此类推




    service mysqld start 启动mysql服务
    php -v 查看php版本
    /usr/sbin/httpd

               检测启动结果:ps aux | grep httpd
    ifconfig 查看服务器的IP 172.18.65.111
    touch info.php 创建info.php文件
    cd /var/www/html/ 进入网站默认根目录
    vi phpinfo.php 创建文件,并进入编辑页面。输如内容后,按esc键,然后再按冒号,WQ,就保存退出了
    pwd 查看当前工作目录
    cd .. 返回上一级(cd和..之间有一个空格)
    cd ../..
    cd 定位到当前家目录(我是root系统管理员登录,所以家目录是/root)
    vi /etc/httpd/conf/httpd.conf 进入编辑阿帕奇配置文件
    设置开机自动启动:systemctl enable httpd.service
    开机启动
    systemctl start httpd
    systemctl enable httpd
    终端输入如下指令检查httpd的运行状态
    sudo systemctl status httpd
    4.启动mysql服务
      systemctl start mysqld
    5.查看MySQL的启动状态
      systemctl status mysqld
     
    lsb_release -a 查看linus版本信息
    rm if 文件名    删除文件命令
     

    yum -y install httpd httpd-devel /*安装apache*/

        service httpd start              /*启动apache*/

        service httpd restart            /*重启apache服务器*/

    #?:yPaAoX2ii

    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 3
    Server version: 5.7.20

    Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

     

    ---恢复内容结束---

    service mysqld start  启动mysql服务
    php -v 查看php版本
    /usr/sbin/httpd

               检测启动结果:ps aux | grep httpd
    ifconfig 查看服务器的IP 172.18.65.111
    touch info.php 创建info.php文件
    cd /var/www/html/ 进入网站默认根目录
    vi phpinfo.php 创建文件,并进入编辑页面。输如内容后,按esc键,然后再按冒号,WQ,就保存退出了
    pwd 查看当前工作目录
    cd .. 返回上一级(cd和..之间有一个空格)
    cd ../..
    cd 定位到当前家目录(我是root系统管理员登录,所以家目录是/root)
    vi /etc/httpd/conf/httpd.conf 进入编辑阿帕奇配置文件
    设置开机自动启动:systemctl enable httpd.service
    开机启动
    systemctl start httpd
    systemctl enable httpd
    终端输入如下指令检查httpd的运行状态
    sudo systemctl status httpd
    4.启动mysql服务
      systemctl start mysqld
    5.查看MySQL的启动状态
      systemctl status mysqld
     
    lsb_release -a 查看linus版本信息
    rm if 文件名    删除文件命令
     

    yum -y install httpd httpd-devel /*安装apache*/

        service httpd start              /*启动apache*/

        service httpd restart            /*重启apache服务器*/

    #?:yPaAoX2ii

    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 3
    Server version: 5.7.20

    Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

     
  • 相关阅读:
    PHP页面跳转的几种方法
    PHP网站并发测试
    04-上传文件
    01-转>linux命令
    01-CDN的好处
    05-socket.io使用
    04-soket.io使用2 -数据同步简单聊天室效果
    03-socket.io 2.3.0版本的使用-用户请求接口,实时推送给前端数据
    02-转>
    跨域-转>预解析OPTIONS请求
  • 原文地址:https://www.cnblogs.com/yolo-bean/p/7703838.html
Copyright © 2011-2022 走看看