{"id":279719,"date":"2023-08-07T20:06:51","date_gmt":"2023-08-07T12:06:51","guid":{"rendered":"https:\/\/lrxjmw.cn\/hsbfyszdljsm.html"},"modified":"2023-08-07T20:06:51","modified_gmt":"2023-08-07T12:06:51","slug":"hsbfyszdljsm","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/hsbfyszdljsm.html","title":{"rendered":"\u7070\u8272\u90e8\u5206\u6709\u8bbe\u7f6e\u7684\u8def\u5f84\uff0c\u8bf4\u660e\u73af\u5883\u53d8\u91cf\u5df2\u7ecf\u8bbe\u597d"},"content":{"rendered":"
\n
\n[root@localhost bin]#export\ndeclare -x BASH_ENV=\"\/root\/.bashrc\"\ndeclare -x G_BROKEN_FILENAMES=\"1\"\ndeclare -x HISTSIZE=\"1000\"\ndeclare -x HOME=\"\/root\"\ndeclare -x HOSTNAME=\"localhost.localdomain\"\ndeclare -x INPUTRC=\"\/etc\/inputrc\"\ndeclare -x LANG=\"zh_CN.GB18030\"\ndeclare -x LANGUAGE=\"zh_CN.GB18030:zh_CN.GB2312:zh_CN\"\ndeclare -x LESSOPEN=\"|\/usr\/bin\/lesspipe.sh %s\"\ndeclare -x LOGNAME=\"root\"\ndeclare -x LS_COLORS=\"no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:\"\ndeclare -x MAIL=\"\/var\/spool\/mail\/root\"\ndeclare -x OLDPWD=\"\/opt\/au1200_rm\/build_tools\"\ndeclare -x PATH=\"\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/X11R6\/bin:\/root\/bin:\/opt\/au1200_rm\/build_tools\/bin\"\ndeclare -x PWD=\"\/opt\/au1200_rm\/build_tools\/bin\"\ndeclare -x SHELL=\"\/bin\/bash\"\ndeclare -x SHLVL=\"1\"\ndeclare -x SSH_ASKPASS=\"\/usr\/libexec\/openssh\/gnome-ssh-askpass\"\ndeclare -x SSH_AUTH_SOCK=\"\/tmp\/ssh-XX3LKWhz\/agent.4242\"\ndeclare -x SSH_CLIENT=\"10.3.37.152 2236 22\"\ndeclare -x SSH_CONNECTION=\"10.3.37.152 2236 10.3.37.186 22\"\ndeclare -x SSH_TTY=\"\/dev\/pts\/2\"\ndeclare -x TERM=\"linux\"\ndeclare -x USER=\"root\"\ndeclare -x USERNAME=\"root\" <\/pre>\n<\/p>\n\u53ef\u4ee5\u770b\u89c1\u7ea2\u8272\u90e8\u4efd\u6709\u8bbe\u7f6e\u7684\u8def\u5f84linux\u73af\u5883\u53d8\u91cf<\/a>\u6587\u4ef6<\/strong>\uff0c\u8bf4\u660e\u73af\u5883\u53d8\u91cf\u65e9\u5df2\u8bbe\u597d\uff0cPATH\u4e0a\u9762\u65e9\u5df2\u6709\u4e86\u6211\u8981\u52a0\u7684\u7f16\u8bd1\u5668\u7684\u8def\u5f84\u3002<\/p>\n
2\u3001\u4fee\u6539profile\u6587\u4ef6\uff1a<\/p>\n
\n
\n#vi \/etc\/profile<\/pre>\n<\/p>\n\u5728\u4e0a\u9762\u52a0\u5165:<\/p>\n
\n
\nexport PATH=\"$PATH:\/opt\/au1200_rm\/build_tools\/bin\"<\/pre>\n<\/p>\n3.\u66f4\u6539.bashrc\u6587\u4ef6\uff1a<\/p>\n
\n
\n# vi \/root\/.bashrc<\/pre>\n<\/p>\n\u5728\u4e0a\u9762\u52a0\u5165\uff1a<\/p>\n
\n
\nexport PATH=\"$PATH:\/opt\/au1200_rm\/build_tools\/bin\"<\/pre>\n<\/p>\n\u540e\u4e24\u79cd\u65b9\u5f0f\u901a\u5e38\u987b\u8981\u91cd\u65b0\u6ce8\u9500\u7cfb\u7edf<\/a>\u624d\u4f1a\u751f\u6548\uff0c\u6700\u540e\u53ef\u4ee5\u901a\u8fc7echo\u547d\u4ee4<\/a>\u6d4b\u8bd5\u4e00\u4e0b\uff1a<\/p>\n
\n
\n# echo $PATH\n<\/pre>\n<\/p>\n\u77a7\u77a7\u8f93\u51fa\u4e0a\u9762\u662f\u4e0d\u662f\u65e9\u5df2\u6709\u4e86\/my_new_path\u8fd9\u4e2a\u8def\u5f84\u4e86\u3002<\/p>\n
\u53e6\u6709\uff1a4.\u66f4\u6539\/etc\/re.local\u6587\u4ef6\uff1a<\/p>\n
\n
\n# vi \/etc\/re.local\n<\/pre>\n<\/p>\n\u5728\u4e0a\u9762\u52a0\u5165\uff1a<\/p>\n
\n
\n export PATH=\"$PATH:\/opt\/au1200_rm\/build_tools\/bin\"<\/pre>\n<\/p>\n-----------------------------------------------------------------------------------------------------------------------<\/p>\n
\u201c\/bin\u201d\u3001\u201c\/sbin\u201d\u3001\u201c\/usr\/bin\u201d\u3001\u201c\/usr\/sbin\u201d\u3001\u201c\/usr\/local\/bin\u201d\u7b49\u8def\u5f84\u65e9\u5df2\u5728\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u4e86\uff0c\u82e5\u679c\u53ef\u6267\u884c\u6587\u4ef6\u5728\u8fd9\u51e0\u4e2a\u6807\u51c6\u4f4d\u7f6e\uff0c\u5728\u7ec8\u7aef\u547d\u4ee4\u884c\u8f93\u5165\u8be5\u8f6f\u4ef6\u53ef\u6267\u884c\u6587\u4ef6\u7684\u6587\u4ef6\u540d\u548c\u53c2\u6570(\u5047\u5982\u987b\u8981\u53c2\u6570)\uff0c\u56de\u8f66\u5373\u53ef\u3002<\/p>\n
\u82e5\u679c\u4e0d\u5728\u6807\u51c6\u4f4d\u7f6e\uff0c\u6587\u4ef6\u540d\u540e\u9762\u987b\u8981\u52a0\u4e0a\u5b8c\u6574\u7684\u8def\u5f84\u3002\u4e0d\u8fc7\u6bcf\u6b21\u90fd\u8fd9\u6837\u8dd1\u5c31\u592a\u9ebb\u70e6\u4e86\uff0c\u4e00\u4e2a\u201c\u4e00\u52b3\u6c38\u9038\u201d\u7684\u529e\u6cd5\u662f\u628a\u8fd9\u4e2a\u8def\u5f84\u52a0\u5165\u73af\u5883\u53d8\u91cf\u3002\u547d\u4ee4export$PATH=\"\u8def\u5f84\u201d(\u6216\u201cPATH=$PATH:\u8def\u5f84\u201d)($PATH\u4e3a\u73af\u5883\u53d8\u91cf\u540d\uff0c\u5982DVSDK\uff1b\u8c03\u7528\u65f6\u7528$DVSDK)\u53ef\u4ee5\u628a\u8fd9\u4e2a\u8def\u5f84\u52a0\u5165\u73af\u5883\u53d8\u91cf\uff0c\u5e76\u4e14\u9000\u51fa\u8fd9\u4e2a\u547d\u4ee4\u884c\u5c31\u5931\u6548\u4e86\u3002\u8981\u60f3\u6c38\u4e45\u751f\u6548\uff0c\u987b\u8981\u628a\u8fd9\u884c\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u6587\u4ef6\u91cc\u3002\u6709\u4e24\u4e2a\u6587\u4ef6\u53ef\u9009\uff1a\u201c\/etc\/profile\u201d\u548c\u7528\u623f\u4e3b\u76ee\u5f55\u4e0b\u7684\u201c.bash_profile\u201d\uff0c\u201c\/etc\/profile\u201d\u5bf9\u7cfb\u7edf\u91cc\u6240\u6709\u7528\u6237\u90fd\u6709\u6548\uff0c\u7528\u623f\u4e3b\u76ee\u5f55\u4e0b\u7684\u201c.bash_profile\u201d\u53ea\u5bf9\u8fd9\u4e2a\u7528\u6237\u6709\u6548\u3002<\/p>\n