1. nginx 反向代理失败
原因可能是之前编译安装了一个nginx,而需要用到的是yum安装的nginx。
解决方法:把编译安装的nginx进程kill掉,再重新启动nginx。
[root@kafka1 ~]# systemctl start nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
[root@kafka1 ~]# ps aux|grep nginx
root 942 0.0 0.1 46240 1160 ? Ss 15:23 0:00 nginx: master process /usr/local/nginx1/sbin/nginx 这是编译安装的位置
chenjian 945 0.0 0.2 46704 2168 ? S 15:23 0:00 nginx: worker process
root 3056 0.0 0.0 112824 988 pts/0 R+ 20:08 0:00 grep --color=auto nginx
[root@kafka1 ~]# kill -9 942
[root@kafka1 ~]# ps aux|grep nginx
root 3059 0.0 0.0 112824 988 pts/0 R+ 20:08 0:00 grep --color=auto nginx
[root@kafka1 ~]# systemctl start nginx
[root@kafka1 ~]# ps aux|grep nginx
root 3071 0.0 0.0 39312 940 ? Ss 20:08 0:00 nginx: master process /usr/sbin/nginx yum安装的位置
nginx 3073 0.0 0.1 39700 1560 ? S 20:08 0:00 nginx: worker process
root 3075 0.0 0.0 112824 988 pts/0 R+ 20:08 0:00 grep --color=auto nginx
2. yum install redis下载失败
要先安装epel-release源:yum install epel-release -y。
如果安装了还不行,有可能是之前epel-release没有安装到/etc/yum.repos.d目录中。
[root@kafka2 ~]# cd /etc/yum.repos.d
[root@kafka2 yum.repos.d]# yum install redis -y
已加载插件:fastestmirror
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/4): extras/7/x86_64/primary_db | 253 kB 00:00:05
(2/4): base/7/x86_64/group_gz | 153 kB 00:00:05
(3/4): base/7/x86_64/primary_db | 6.1 MB 00:00:09
(4/4): updates/7/x86_64/primary_db | 27 MB 00:00:15
没有可用软件包 redis。
错误:无须任何处理
[root@kafka2 yum.repos.d]# yum install epel-release -y
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
软件包 epel-release-7-11.noarch 已安装并且是最新版本
[root@kafka2 yum.repos.d]# ls
CentOS-Base.repo
把epel-release删了重新下就好
[root@kafka1 yum.repos.d]# yum erase epel-release -y
[root@kafka1 yum.repos.d]# yum install epel-release -y
[root@kafka1 yum.repos.d]# ls
CentOS-Base.repo epel.repo epel-testing.repo fb.repo
[root@kafka1 yum.repos.d]# yum install redis -y
...
作为依赖被安装:
jemalloc.x86_64 0:3.6.0-1.el7
完毕!