《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看最后一行

相关推荐
yyuuuzz5 分钟前
云服务器搭建个人博客记录:一次访问超时的复盘
运维·服务器·数据库
水饺编程7 分钟前
第2章:Linux 基础,mkdir 命令的简单入门
linux·c语言·汇编
自变量yjs11 分钟前
Linux --- 线程控制
linux·运维·服务器
陌上花开缓缓归以25 分钟前
linux 内核4.4 内存分配使用分析
linux·运维·服务器
科技象限30 分钟前
电脑防拍照系统:屏幕被手机拍走,还能追得回来吗
运维·网络安全·电脑·安企神
燕落南枝38 分钟前
C 语言学习大总结:从入门到进阶的完整知识体系
服务器·c语言·学习
开开心心就好40 分钟前
打印机卡住打不了?一键清理卡死打印队列
服务器·开发语言·算法·pdf·ocr·idea·visual studio code
茉莉玫瑰花茶1 小时前
GO [ 数据格式 ]
服务器·网络·算法·golang
欢乐的小猪1 小时前
Linux命令 chmod
linux·运维·服务器
silvamux_1 小时前
MCP 协议如何让大模型完成工具调用
大数据·服务器·elasticsearch·fastapi·vllm