1. Set the self-configured environment variables at startup In the Linux terminal environment, the Export command can be used to set environment variables, but the variables it sets disappear immediately after the terminal is closed. If you want to set an environment variable that exists at startup and disappears at shutdown, you need to change some system configuration files. /Etc/profileFile: sets environment variables when the system is started, which works for any user; /Etc/bashrcFile: when the user's shell is opened, the environment variable is set to work for any user; /Home/[Username]/. Bash_profileFile: sets environment variables when a user logs on, which is valid for the current user; /Home/[Username]/. BashrcFile: sets the environment variable when the user's shell is opened, which is valid for the current user. In addition,/Home/[Username]/. BashrcOnly environment variables set in/Etc/profileEnvironment variables. To set environment variables in these files, you only need to add the Export command statement to the file. 2. install the software package Linux software packages can be divided into two types: one is generated by source code compilation, called the source code package; the other is provided in the form of RPM self-installation files, called the RPM package. The installation methods of the two software packages are different. The source code packages are generally stored in the compressed form. Therefore, after obtaining the software package, decompress the package. There are also two types of compressed packages, one is the tar.gz package and the other is the tar.bz2 package. How to decompress the tar.gz package: Tar zxvf[Packagename].Tar.gz Decompress the tar.bz2 package: Tar jxvf[Packagename].Tar.bz2 After decompression[Packagename]You can use the LS command to query the same folder. Go to the folder and run the LS command. If you seeConfigureIndicates that the file must be configured before compilation. The specific configuration options are as follows: "-- Cache-file = file" Test existing features. The test results are stored in a cache file; "-- Help" Outputs help information; "-- No-create" Prevents output files from being created. "-- Quiet" or "-- silent" Additional information cannot be output; "-- Version" Displays the Autoconf version used to generate the configure script; "-- Prefix = prefix" Set the installation path to generate makefile; "-- Exec-Prefix = eprefix" Sets the installation location of the file on which the structure depends. If not configured, it is the same as the -- prefix option value; "-- Bindir = dir" Specifies the installation location of the binary file. The binary file here is defined as a program that can be directly executed by the user; "-- Sbindir = dir" Specifies the installation location of the Super binary file. This is a program that can only be executed by the Super User; "-- Libexecdir = dir" Specifies the installation location of executable support files. These files are not directly executed by the user, but are executed by the binary files mentioned above; "-- Datadir = dir" Specifies the installation location of common data files; "-- Sysconfdir = dir" Specifies the installation location of read-only data used on a single machine; "-- Sharedstatedir = dir" Specifies the installation location of writable data that can be shared on multiple machines; "-- Localstatedir = dir" Specifies the installation location of writable data that can only be used by a single machine; "-- Libdir = dir" Specifies the installation location of the library file; "-- Includedir = dir" Specifies the installation location of the C header file. This option can also be used for header files in other languages such as C ++; "-- Oldincludedir = dir" Specifies the installation location of the C header file installed by the compiler except GCC; "-- Infodir = dir" Specifies the installation location of the Info format document. info is the document format used by the GNU project; "-- Mandir = dir" Specifies the installation location of the manual page; "-- Srcdir = dir" In general, you do not need to specify the location of the configure source code, because the configure script is generally in the same directory as the source code file; "-- Program-Prefix = pprefix" Specifies the prefix that will be added to the name of the installed program. This option will only work when used by the makefile. In file; "-- Program-suffix = suffix" Specifies the suffix that will be added to the name of the installed program; "-- Program-transform-name = Program" Generates installation name setting parameters for sed-e program; "-- Build = build" The system platform where the software package is installed. If not. The default value is the value of the -- Host option; "-- Host = host" If the system platform where the software runs is not specified, config. Guess will be run for detection; "-- Target = target" Specifies the system platform for the software. If no value is specified, the -- Host option value is used by default; "-- Disable-feature" Disable compilation of large options; "-Enable-feature [= Arg]" In contrast to the previous item, Arg provides option parameters to determine the method to use; "-- With-package [= Arg]" Provide information about other installed software packages; "-- Without-package" Prohibit the interaction between a software package and an existing software package; "-- X-regiondes = dir" Specify the directory containing the X11 header file to the configure script; "-- X-libraries = dir" Similarly, the -- X-libraries option provides a method to indicate to the configure script the directory containing the X11 library. Run the./configure command to execute the configuration.-- [Options] {= [Params]}You can. After the configuration is complete, run the make command. After the make command is executed, run the make install or su; make install command. You can install the RPM on your own. Command: rpm-[Options] [packagename].Rpm When installing a software package[Options]Set it to "IVH". When you Uninstall a software package, it is usually set to "E ". Query all installed software packages, use rpm-QA, query specific installed software packages, and use rpm-Q[Packagename]. In addition to the above two types of operations, there are also some common operations on network configuration, but due to a lot of content, it is another post for discussion. Enjoy Linux! |