有什么方法可以永久启用SCL吗?
我已经安装了rh-php56,我想确保每次我把ssh装入我的机器时都会加载它。
我目前正在运行CentOS 7。
发布于 2017-05-19 14:28:30
使用scl enable实际上会在当前的shell中打开一个新的shell,这是非常不干净的,特别是如果是通过登录脚本完成的。
相反,您应该在您的~/.bash_profile中放置:
source /opt/rh/rh-nginx18/enable或者:
source scl_source enable rh-nginx18后者更“优雅”,因为它独立于实际安装路径。
这会在当前shell中加载环境。
发布于 2018-01-09 19:35:10
Redhat建议在/etc/profile.d,即用于python:
$ cat /etc/profile.d/enablepython33.sh
#!/bin/bash
source scl_source enable python33这对我来说是适用于devtools的,你可以试试这个。
发布于 2016-05-15 21:39:17
我认为您可以在您的shell配置文件(例如~/..bash_ profile )中添加一行,以启用您选择的scl。例如,
scl enable rh-nginx18 bash
编辑:标记为扰流板,因为这是危险的
重新加载配置文件或注销/登录,您应该可以访问SCLs。
https://serverfault.com/questions/751155
复制相似问题