Linux

95 阅读1分钟
  • 删除当前文件夹下所有文件

    $ rm -rf *
    
  • 更改镜像源

    • 备份镜像源

      $ mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
      
    • 进入yum源配置文件所在的文件夹

      $ cd /etc/yum.repos.d/
      
    • 下载163的yum源配置文件到上面那个文件夹内

      $ wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
      
    • 运行yum makecache生成缓存

      $ yum makecache
      
  • 安装 Nginx

    $
    
  • 安装Docker

    $ yum -y install docker
    
  • 安装 jdk

    $ tar -zxvf jdk -C /usr/local
    
  • 安装 maven

    $ tar -zxvf maven -C /usr/local
    
  • 命令

    查询端口运行 :netstat -anp |grep 80 
    杀死进程:kill -quit port
    
  • 压缩

    解压:tar -zxvf filename.tar.gz
    压缩:tar -czvf gitlab.tar.gz gitlab
    
  • -bash: ./run.sh: /bin/bash^M: bad interpreter: No such file or directory

    :set ff?
    :set ff=unix