Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Solaris system environment variable declaration method

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Solaris system environment variable declaration method

When declaring environment variables in the solaris system, follow the following format:

Format one

Variable name = xxx

Export variable name

Format two

Variable name = xxx;export variable name

Note that the semicolon is the semicolon under the English half corner of the input method

Example:

# format 1 TMOUT=300export TMOUT# format 2 TMOUT = 300 incorrect variable declaration method under export TMOUTSolaris system

The following environment variable declaration method is incorrect in solaris systems, but is available in linux systems:

Export variable name = xxx

Example: export TMOUT=300

If you use this method to declare an environment variable and write it to a file such as / etc/profile, after executing the command:

Source / etc/profile or. / etc/profile

An error is reported when declaring environment variables, resulting in unreferenced environment variables in the profile file, resulting in program or script errors.

How was the problem discovered?

The problem was found when Rizhao strengthened the system security of the server, declared the TMOUT variable in the profile file in an incorrect way, and caused the file synchronization script in Zone 1 and 3 to fail to execute normally and troubleshoot the problem.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report