{"id":280015,"date":"2023-08-13T20:10:44","date_gmt":"2023-08-13T12:10:44","guid":{"rendered":"https:\/\/gulass.cn\/szhjblcymlgx.html"},"modified":"2023-08-13T20:10:44","modified_gmt":"2023-08-13T12:10:44","slug":"szhjblcymlgx","status":"publish","type":"post","link":"https:\/\/gulass.cn\/szhjblcymlgx.html","title":{"rendered":"\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u5e38\u7528\u547d\u4ee4\u66f4\u65b0\u73af\u5883test\u7b2c\u4e00\u7ae0"},"content":{"rendered":"
<\/p>\n
Linux<\/a>\u662f\u4e00\u4e2a\u591a\u7528\u6237\u7684\u64cd\u4f5c\u7cfb\u7edf<\/a>\u3002\u591a\u7528\u6237\u610f\u5473\u7740\u6bcf\u4f4d\u7528\u6237\u767b\u5165\u7cfb\u7edf\u540e\uff0c\u90fd\u6709\u81ea\u5df1\u4e13\u7528\u7684\u8fd0\u884c\u73af\u5883\u3002\u800c\u8fd9\u4e2a\u73af\u5883\u662f\u7531\u4e00\u7ec4\u53d8\u91cf<\/a>\u6240\u5b9a\u4e49,\u8fd9\u7ec4\u53d8\u91cf\u88ab\u79f0\u4e3a\u73af\u5883\u53d8\u91cf\u3002\u7528\u6237\u53ef\u4ee5\u5bf9\u81ea\u5df1\u7684\u73af\u5883\u53d8\u91cf\u8fdb\u884c\u66f4\u6539\u4ee5\u8fbe\u5230\u5bf9\u73af\u5883\u7684\u8981\u6c42\u3002<\/p>\n \u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u7684\u65b9\u5f0f<\/p>\n \u8fd9\u7c7b\u53d8\u91cf\u5bf9\u7cfb\u7edf\u5185\u7684\u6240\u6709\u7528\u6237\u90fd\u751f\u6548\uff0c\u6240\u6709\u7528\u6237\u90fd\u53ef\u4ee5\u4f7f\u7528\u8fd9\u7c7b\u53d8\u91cf\u3002\u4f5c\u7528\u8303\u56f4\u662f\u6574\u4e2a\u7cfb\u7edf\u3002<\/p>\n \u6b64\u6587\u4ef6\u53ea\u5728root\u4e0b\u5c31\u80fd\u66f4\u6539\u3002<\/p>\n \n \u6dfb\u52a0\u5b8c\u6210\u540e\u65b0\u7684\u73af\u5883\u53d8\u91cf\u4e0d\u4f1a\u7acb\u523b\u751f\u6548\uff0c\u7acb\u523b\u751f\u6548\u987b\u8981\u8fd0\u884csource\/etc\/profile\uff0c\u5426\u5219\u53ea\u80fd\u5728\u4e0a\u6b21\u91cd\u8fdb\u6b64\u7528\u6237\u65f6\u624d\u4f1a\u751f\u6548\u3002<\/p>\n \u5728\u7528\u6237\u76ee\u5f55\u4e0b\u7684.bash_profile\u6587\u4ef6\u4e2d\u6dfb\u52a0\u53d8\u91cf\uff0c\u8be5\u6587\u4ef6\u662f\u9690\u85cf\u6587\u4ef6\uff0c\u53ef\u4f7f\u7528ll-a\u67e5\u770b\uff1a<\/p>\n \n \u5728\u4e0a\u56fe\u4e2d\u7528\u7ea2\u6846\u6846\u4f4f\u4e86\u4e24\u4e2a\u6587\u4ef6\uff1a.bashrc\u548c.bash_profilelinux\u4fee\u6539readonly\u6587\u4ef6<\/strong>\uff0c\u539f\u5219\u4e0a\u8bb2\u8bbe\u7f6e\u8fd9\u79cd\u73af\u5883\u53d8\u91cf\u65f6\u5728\u8fd9\u4e24\u4e2a\u6587\u4ef6\u4efb\u610f\u4e00\u4e2a\u4e0a\u9762\u6dfb\u52a0\u90fd\u662f\u53ef\u4ee5\u7684\uff0c\u8fd9\u4e24\u4e2a\u6587\u4ef6\u7684\u533a\u522b\u4e3a\uff1a.bash_profile\u662f\u4ea4\u4e92\u5f0flogin\u5f62\u5f0f\u6b65\u5165bashshell<\/a>\u8fd0\u884c\uff0c.bashrc\u662f\u4ea4\u4e92\u5f0fnon-login\u5f62\u5f0f\u6b65\u5165bashshell\u8fd0\u884c\u3002<\/p>\n \u53ef\u4ee5\u7406\u89e3\u4e3a.bash_profile\u6587\u4ef6\u53ea\u4f1a\u5728\u7528\u6237\u767b\u5165\u7684\u65f6\u4faf\u8bfb\u53d6\u4e00\u6b21\uff0c\u800c.bashrc\u5728\u6bcf\u6b21\u6253\u5f00\u7ec8\u7aef\u8fdb\u884c\u4e00\u6b21\u65b0\u7684\u4f1a\u8bdd\u65f6\u5c31\u4f1a\u8bfb\u53d6\u3002<\/p>\n \u4e34\u65f6\u6709\u6548\u7684\u73af\u5883\u53d8\u91cf(\u53ea\u9488\u5bf9\u5f53\u524dshell\u6709\u6548)<\/p>\n \u8fd9\u79cd\u73af\u5883\u53d8\u91cf\u53ea\u5bf9\u5f53\u524d\u7684shell\u6709\u6548\u3002\u5f53\u6211\u4eec\u9000\u51fa\u767b\u5165\u6216\u5219\u5173\u6389\u7ec8\u7aef\u518d\u91cd\u65b0\u6253\u5f00\u65f6\uff0c\u8fd9\u4e2a\u73af\u5883\u53d8\u91cf\u90fd\u4f1a\u6d88\u5931\u3002\u662f\u4e34\u65f6\u7684\u3002<\/p>\n<\/span>
#\u00a0vi\u00a0\/etc\/profile<\/span>
export<\/span>\u00a0CLASSPATH=.\/JAVA_HOME\/lib:$JAVA_HOME<\/span>\/jre\/lib
<\/code><\/pre>\n<\/p>\n<\/span>
$\u00a0whoami\u00a0
rethink
$\u00a0vi\u00a0\/home\/rethink\/.bash_profile
export<\/span>\u00a0CLASSPATH=.\/JAVA_HOME\/lib:$JAVA_HOME<\/span>\/jre\/lib\u00a0
$\u00a0source<\/span>\u00a0\/home\/rethink\/.bash_profile
<\/code><\/pre>\n<\/p>\n