1、添加常用源:
先确认系统架构是32位、64位 系统
cat /etc/redhat-release uname -r
当前CentOS7上已经有哪些源
yum repolist
添加EPEL源,https://fedoraproject.org/wiki/EPEL
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
添加RPMforge源,https://centos.pkgs.org/7/repoforge-x86_64/
2、安装软件:
yum install redis
3、查看 某软件 安装了哪些文件:
find / -name "redis*"
4、vim 基础使用:
vim /etc/redis.conf
(1)、显示行号 => 按住 shift+: 看到:后 输入set nu 回车,会显示行号
(2)、编辑 => 按下 i 字母 就会进入 --INSERT-- 模式
(3)、编辑完成后 => 按下 esc -> shift+: -> wq -> 回车(保存退出)
(4)、无任何修改 => 按下 esc -> shift+: -> q -> 回车(退出)
:w 保存文件但不退出vi
:w file 将修改另外保存到file中,不退出vi
:w! 强制保存,不推出vi
:wq 保存文件并退出vi
:wq! 强制保存文件,并退出vi
q: 不保存文件,退出vi
:q! 不保存文件,强制退出vi
:e! 放弃所有修改,从上次保存文件开始再编辑
5、查看进程:
ps -ef|grep -i redis
启动redis
redis-server /etc/redis.conf
停止redis
redis-cli shutdown
6、安装ipconfig等网络工具:
yum install net-tools
7、Centos重启命令:
reboot shutdown -r now
8、Centos关机命令:
shutdown -h now