《Linux基础优化与常用软件包》

Linux基础优化(Kylin系统)

1、安装扩展仓库

cd /etc/yum.repos.d

vim

wget -o https://mirrors.aliyun.com/repo/epel-7.repo

#安装完成后检查是否安装成功

yum repolist

2、优化ssh服务

vim /etc/ssh/sshd_config

#修改端口号,禁止root用户登录等等

3、优化防火墙

systemctl stop firewalld

systemctl disable firewalld

4、 加大文件描述字符集

echo "*_nofile 65535" >> /etc/security/limits.conf

#检查文件最后一行看是否加入成功

tail -1 /etc/security/limits.conf

5、优化字符集

vim /etc/locale.conf

zh_CN.UTF-8-------->en_US.UTF-8

source /etc/locale.conf #使文件生效

6、同步时间

yum -y install ntpdate

#同步时间

ntpdate ntp2.aliyun.com

7、安装常用软件

yum install -y tree telnet vim wget bash-completion lrzsz net-tools sysstat iotop iftop htop unzip nc nmap telnet bc psmisc httpd-tools bind-utils nethogs expect

#检查运行命令不提示找不到命令即可

8、配置命令行参数

#配置

echo "export PS1='[\[\e[34;1m\]\u@\[\e[0m\]\[\e[32;1m\]\H\[\e[0m\]\[\e[31;1m\] \w\[\e[0m\]]\\$ '" >>/etc/profile

#生效

source /etc/profile

#把配置命令行的命令追加到/etc/profile中.

#重新连接Linux就生效.

#也可以通过查看/etc/profile文件内容进行检查

cat /etc/profile看最后一行

相关推荐
keyipatience6 分钟前
4.5 Linux指令和权限
linux·运维·服务器
keyipatience15 分钟前
6.linux权限
linux·运维·服务器
小章UPUP22 分钟前
自部署 LaTeX/Markdown 写作平台
linux
yunhuibin29 分钟前
Linux 7.0 调度器:C 语言面向对象(OOPC)的极致实践
linux·运维·c语言
feng_you_ying_li30 分钟前
linux之进程概念:体系结构,操作系统的基本介绍
linux
尘世壹俗人36 分钟前
linux编译安装git
linux·运维·git
爱学习的小囧38 分钟前
ESXi/vCenter 批量开关虚拟机完整教程 | PowerCLI 一键 + 原生脚本循环,新手也能落地
运维·网络·数据库·esxi
xxjj998a1 小时前
如何安装linux版本的node.js
linux·运维·node.js
AC赳赳老秦1 小时前
测试工程师:OpenClaw自动化测试脚本生成,批量执行测试用例
大数据·linux·人工智能·python·django·测试用例·openclaw
路溪非溪1 小时前
Wireshark抓取以太网MAC帧并进行分析
linux·网络·驱动开发·wireshark