Set environment variables on Mac OS X Lion

后端 未结 16 1397
余生分开走
余生分开走 2020-11-22 11:01

When someone says \"edit your .plist file\" or \"your .profile\" or \".bash_profile\" etc, this just confuses me. I have no idea where these files are, how to create them if

16条回答
  •  一向
    一向 (楼主)
    2020-11-22 11:17

    I took the idiot route. Added these to the end of /etc/profile

    for environment in `find /etc/environments.d -type f`
    do
         . $environment
    done
    

    created a folder /etc/environments create a file in it called "oracle" or "whatever" and added the stuff I needed set globally to it.

    /etc$ cat /etc/environments.d/Oracle

    export PATH=$PATH:/Library/Oracle/instantclient_11_2
    export DYLD_LIBRARY_PATH=/Library/Oracle/instantclient_11_2
    export SQLPATH=/Library/Oracle/instantclient_11_2
    export PATH=$PATH:/Library/Oracle/instantclient_11_2
    export TNS_ADMIN=/Library/Oracle/instantclient_11_2/network/admin
    

提交回复
热议问题