在Solaris設定永久的環境變數

| No Comments | No TrackBacks
每當要使用wget 之類的指令時, 系統總是找不到, 其原因主要是因為並沒有設定永久性的變數.

一般上設置的變數

PATH=$PATH:/opt/csw/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin
export PATH
set

以上三個指令只能維持暫時性, 下次登入時又要重新輸入了.

因此, 為了一勞永逸,

1. vi /etc/profile
2. 在export LOGNAME PATH下面, 增加 PATH=$PATH:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/sfw/bin:/opt/sfw/bin:/apps/php/bin:.
3. 增加 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/sfw/lib
4. 修改export LOGNAME PATH, 變成 export LOGNAME PATH LD_LIBRARY_PATH

或者

1. vi /etc/profile
2. 在export LOGNAME PATH下面, 增加 PATH=$PATH:/opt/csw/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin

No TrackBacks

TrackBack URL: http://www.ode2forest.com/mt-tb.cgi/44

Leave a comment

About this Entry

This page contains a single entry by Gordon Lim published on October 18, 2009 3:34 PM.

允許root 用SSH登入Solaris的方法 was the previous entry in this blog.

喜歡搞怪創新的Google又出招了, Go 語言出擊! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.