1、准备环境centos7
关闭防火墙firewalld
#清空防火墙规则
[email protected]:/root#iptables -F
#关闭开机自启动防火墙
[email protected]:/root#systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
#关闭防火墙
[email protected]:/root#systemctl stop firewalld
设置selinux=disable
#selinux的配置路径:
[email protected]:/root#vim /etc/selinux/config
#查看selinux的状态为Disable
[email protected]:/root#getenforce
Disabled
[email protected]:/root#
2、配置阿里云的yum源,和epel源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
#清空yum缓存
[email protected]:/root#yum clean all
#生成新的yum缓存
[email protected]:/root#yum makecache
3、安装系统初始化所需的软件
yum install -y bash-completion vim lrzsz wget expect net-tools nc namp tree dos2unix htop iftop iotop unzip telnet slpsmisc nethogs glances bc ntpdate openldap-devel gcc
4、安装JumpServer运行所需的依赖环境
yum -y install git python-pip gcc automake autoconf python-devel vim sshpass lrzsz readline-devel zlib zlib-devel openssl openssl-devel
git ——github全球最大的代码托管平台,获取JumpServer的代码,需要去github下载
python-pip——安装python软件
gcc——解析代码中C语言信息:解释器
automake——实现软件自动编译过程
autoconf——实现软件自动配置过程
python-devel——python开发依赖
readline-devel——操作python命令信息是,实现补全功能
5、修改系统字符集为中文
#修改系统字符集为中文
[email protected]:/root#localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8
[email protected]:/root#export LC_ALL=zh_CN.UTF-8
#写入全局配置文件中
[email protected]:/root#echo 'LANG="zh_CN.UTF-8"' > /etc/local.conf
[email protected]:/root#
6、检查系统编码
[email protected]:/root#locale
LANG=en_US.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8
[email protected]:/root#
此时使用ls --help就会有中文解释
[email protected]:/root#ls --help
用法:ls [选项]... [文件]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all 不隐藏任何以. 开始的项目
-A, --almost-all 列出除. 及.. 以外的任何项目
--author 与-l 同时使用时列出每个文件的作者
-b, --escape 以八进制溢出序列表示不可打印的字符
--block-size=SIZE scale sizes by SIZE before printing them; e.g.,
'--block-size=M' prints sizes in units of
1,048,576 bytes; see SIZE format below
-B, --ignore-backups do not list implied entries ending with ~
-c with -lt: sort by, and show, ctime (time of last
modification of file status information);
with -l: show ctime and sort by name;
otherwise: sort by ctime, newest first
标签:zh,CN,部署,环境,jumpserver,堡垒,t01,UTF,root From: https://www.cnblogs.com/Magiclala/p/17138938.html