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

    防火墙:
    systemctl stop firewalld
    systemctl disable firewalld
    systemctl list-unit-files | grep firewalld
    
    ftp服务
    启动ftp和开机自启动命令
    /bin/systemctl start  vsftpd.service
    systemctl enable vsftpd.service
    ps -ef |grep ftp
    systemctl list-unit-files|grep vsftpd
    
    查看ssh开机自启动
    systemctl enable sshd
    systemctl list-unit-files | grep ssh
    
    查看ntp是否开机自启动
    systemctl status ntpd
    systemctl list-unit-files |grep ntpd
    
    安装telnet
    rpm -qa|grep telnet;
    yum -y install telnet-server;
    systemctl start telnet.socket;
    systemctl list-unit-files |grep telnet
    
    创建用户
    groupadd A
    useradd -d /home/nmb -m -g nmc -s /bin/bash hanjf
    chown hanjf:A /home/nmcuser
    echo xX9#a13Js85kd0Ayi2 | passwd hanjf --stdin
    
    -d指定用户主目录路径
    -m如果路径不存在,将自动创建
    -s指定默认shell
    
    
    java环境变量
    #java environment
    export JAVA_HOME=/usr/local/jdk1.8.0_111
    export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
    export PATH=$PATH:${JAVA_HOME}/bin
    
    最大文件打开数
    * soft nofile 65535   
    * hard nofile 65535  
    echo "* soft nofile 65535"  >> /etc/security/limits.conf
    echo "* hard nofile 65535"  >> /etc/security/limits.conf
    
    * soft noproc 11000
    * hard noproc 11000
    
    * 代表针对所有用户
    noproc 是代表最大进程数
    nofile 是代表最大文件打开数
    
    环境变量
    历史记录配置
    export HISTTIMEFORMAT="%F %T `whoami`     #给history加上时间戳
    echo 'export HISTTIMEFORMAT="%F %T `whoami` "' >> /etc/profile
    系统空闲等待时长
    export TMOUT=300
    

      

  • 相关阅读:
    第03组 Beta冲刺(2/5)
    2019 SDN上机第6次作业
    第03组 Beta冲刺(1/5)
    2019 SDN上机第5次作业
    SDN课程阅读作业(2)
    2019 SDN上机第4次作业
    第05组 团队Git现场编程实战
    第05组 团队项目-需求分析报告
    团队项目-选题报告
    第07组 Alpha事后诸葛亮
  • 原文地址:https://www.cnblogs.com/hanjianfei/p/11454651.html
Copyright © 2011-2022 走看看