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

相关推荐
鹧鸪云光伏与储能软件开发1 分钟前
鹧鸪云无人机光伏运维解决方案
运维·无人机
小禾苗_36 分钟前
Linux——基础命令1
linux
北辰水墨1 小时前
深入理解软硬链接
linux·经验分享·笔记·软硬链接
huanzghui1 小时前
在远程 Linux 服务器上运行 Jupyter Notebook(.ipynb 文件)
linux·服务器·jupyter
孫治AllenSun1 小时前
【Linux】curl命令详解
linux·运维·服务器
牛十二1 小时前
Mac本地部署DeekSeek-R1下载太慢怎么办?
linux·运维·ubuntu
虾球xz1 小时前
游戏引擎学习第89天
linux·学习·游戏引擎
weixin_441578512 小时前
Centos 8 离线升级openssh 9.9
linux·运维·centos
NiNg_1_2342 小时前
Docker最佳实践:安装Nacos
运维·docker·容器
m0_748233362 小时前
Nginx反向代理出现502 Bad Gateway问题的解决方案
运维·nginx·gateway