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

相关推荐
lengjingzju6 分钟前
一网打尽Linux IPC(三):System V IPC
linux·服务器·c语言
大聪明-PLUS7 分钟前
如何编写你的第一个 Linux 内核模块
linux·嵌入式·arm·smarc
知识分享小能手23 分钟前
Ubuntu入门学习教程,从入门到精通,Ubuntu 22.04文件压缩与解压缩知识点详解(12)
linux·学习·ubuntu
用户6135411460161 小时前
Krb5-libs-1.18.2-5.ky10.x86_64.rpm 安装失败怎么办?附详细步骤
linux
SoveTingღ2 小时前
【问题解析】我的客户端与服务器交互无响应了?
服务器·c++·qt·tcp
iconball2 小时前
个人用云计算学习笔记 --37 Zabbix
运维·笔记·学习·云计算·zabbix
zhougl9962 小时前
Vuex 模块命名冲突:问题解析与完整解决方案
linux·服务器·apache
一世琉璃白_Y2 小时前
Ubuntu(VMware)虚拟机网络异常排查与解决方案
linux·网络·ubuntu
Tassel_YUE2 小时前
OLT设备介绍
运维·华为
爱丽_3 小时前
MyBatis动态SQL完全指南
服务器·sql·mybatis