记录一下解决nginx反向代理失败与yum install redis下载失败的问题

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                                                                             

完毕!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值