我的python是2.7.5,
-bash-4.2$ python --version
Python 2.7.5
Run Code Online (Sandbox Code Playgroud)
默认情况下它没有 python pip。
我的 Linux 是 Redhat ERHL 7.3。
-bash-4.2$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
Run Code Online (Sandbox Code Playgroud)
我还检查了 Linux 存储库中没有 python-pip 。
-bash-4.2$ yum search python-pip
Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager
*Note* Spacewalk repositories are not listed below. You must run this command as root to access Spacewalk repositories.
cloudera-manager 7/7
Warning: No matches found for: python-pip
No matches found
Run Code Online (Sandbox Code Playgroud)
我安装 pip 的方法是使用get-pip.py
. 我get-pip.py
从https://packaging.python.org/installing/得到 …
我想完全禁用 iptables。我按照指示
/etc/init.d/iptables close
Run Code Online (Sandbox Code Playgroud)
它说在那里 No such file or directory
[root@dataapp02 tmp]# service iptables stop
Redirecting to /bin/systemctl stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.
Run Code Online (Sandbox Code Playgroud)
我找到了另一个命令 firewalld
[root@dataapp02 tmp]# service firewalld stop
Redirecting to /bin/systemctl stop firewalld.service
Run Code Online (Sandbox Code Playgroud)
到目前为止,我不确定 iptables 是否被禁用?
如何检查 iptables 是否禁用。
在我的电脑上我可以打开
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml
Run Code Online (Sandbox Code Playgroud)
但是在带有防火墙、iptables 和 http 代理白名单的本地计算机上,它说连接超时。
我用的时候wget
,主机名解析没问题
root:here cd$ wget https://gfe.cit.api.here.com/1/layer_put.json?layer_id=123&app_id=x2&app_code=x1
Run Code Online (Sandbox Code Playgroud)
结果是
Resolving gfe.cit.api.here.com... 52.51.134.116, 54.154.19.134, 52.208.9.155
Connecting to gfe.cit.api.here.com|52.51.134.116|:443... connected.
HTTP request sent, awaiting response... 400 Bad Request
2016-12-24 13:18:47 ERROR 400: Bad Request.
Run Code Online (Sandbox Code Playgroud)
但是当我使用 ping
ping https://gfe.cit.api.here.com/1/layer_put.json?layer_id=123&app_id=x2&app_code=x1
Run Code Online (Sandbox Code Playgroud)
结果是
cannot resolve https://gfe.cit.api.here.com/1/layer_put.json?layer_id=123: Unknown host
Run Code Online (Sandbox Code Playgroud)
主机名解析失败,有什么之间的区别wget
和ping
?
据我所知,机器(A)ssh-keygen
生成一个密钥,并将ssh-copy-id
这个密钥交给另一台机器(B),是吗?
但是当这完成后,要测试这是否完成是使用ssh,如:root@A:ssh root@B
如果在没有密码的情况下登录B,那么这有效。
我对此感到困惑。A给B一把钥匙,为什么A不用密码就可以登录B?它应该是这样的,在B上登录,Bssh A
没有密码。
我的理解有误吗?
我尝试在 RHEL 7.2 上使用关闭 iptables
chkconfig iptables off
在服务 iptables 上读取信息时出错:没有这样的文件或目录
也试过/etc/init.d/iptables stop
了,有
-bash: /etc/init.d/iptables: 没有那个文件或目录
然后我用谷歌搜索了一下,得到了这个:
systemctl status firewalld
iptables 和 firewalld 有什么区别?你如何关闭iptables?
如何赋予机器最大权限?