centos环境变量设置

以mongodb为例linux


1. 进入profile编辑环境变量mongodb

vim /etc/profile


2. 设置mongodb环境变量,在export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL 一行的上面添加以下内容:vim

export PATH=/usr/local/mongodb/mongodb-linux-x86_64-3.0.6/bin:$PATH


3. 编译/etc/profile使配置生效code

source /etc/profile
相关文章
相关标签/搜索