Install JDK with rpm under Fedora

Source: Internet
Author: User
Install JDK decompress JDK with rpm under Fedora: Download JDK rpm installation package, here the jdk-6u35-linux-i586-rpm as an example to describe. The downloaded file may be a jdk-6u35-linux-i586-rpm.bin. Move the jdk-6u35-linux-i586-rpm.bin to the appropriate installation directory...
Install JDK decompress JDK with rpm under Fedora: Download JDK rpm installation package, here the jdk-6u35-linux-i586-rpm as an example to describe. The downloaded file may be a jdk-6u35-linux-i586-rpm.bin. Moving the jdk-6u35-linux-i586-rpm.bin to the appropriate installation directory, the installation software should not be in the/home path, so it is easy to involve access permissions of different users, so the maintenance of the program is quite unfavorable. Here will move the installation package to the/opt directory mv jdk-6u35-linux-i586-rpm.bin/opt move the installation package to the/opt directory cd/opt enter the/opt directory unzip jdk-6u35-linux-i586-rpm.bin unzip JDK file ls to view the extracted files, find the jdk-6u35-linux-i586-rpm to give the installation package run permission to the chmod 755 jdk-6u35-linux-i586-rpm to install the rpm installation package rpm-I jdk-6u35-linux-i586-rpm.bin to set environment variables: www.2cto.com [root @ localhost opt] # vi/etc/profile edit the system configuration file and enter I, add the following content ================================== ==================== Export JAVA_HOME =/usr/java/jdk1.6.0 _ 04 export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar export PATH = $ PATH: $ JAVA_HOME/bin press the exc key, enter the colon, and then enter: wq to save and exit the test: enter javac and java under the terminal, respectively, if a command is displayed, it indicates the operation is successful. Introduction to the installation of www.2cto.com RPM: it is becoming increasingly popular to publish software using RPM packages. The main reason is that this software release method is convenient for users to install, upgrade, and delete from the system. In addition, RPM allows you to manage more software installed in the system. for example, you can check which software packages have been installed in the system, check what files are installed in these software packages, where these files are stored, and so on. Here is a simple Getting started manual. These RPM commands are the most commonly used. for more complex functions, you do not need to worry about them for the time being. you can check man's manual when necessary. Let's start. The command format used to install an RPM package is as follows: # rpm-ivh package. ix86.rpm in the preceding command, the package is a hypothetical name, and ix86 indicates that the package is optimized for a specific CPU. For example, package may be a ldconfig-1.9.5-14, while ix86 is i386. The "-I" parameter indicates that the package is to be installed, while the "-v" parameter increases the output information, "-h" indicates that hashes is displayed as a progress bar during the installation process. If you want to see which files are installed after an RPM Package is installed, you can use this command: # rpm-ql packagename is the name of the package you want to query, such as the ldconfig-1.9.5-14mdk; the "-p" parameter indicates to query the software package database and check whether the software package has been installed. The "-l" parameter indicates to list the complete paths of all installed files of the queried package. The following is an example: [wh @ infonet wh] $ rpm-ql ldconfig-1.9.5-14mdk/sbin/ldconfig/usr/doc/ldconfig-1.9.5/usr/doc/ldconfig-1.9.5/README in addition to the practical feature of querying information for a software package, you can also easily delete a specific RPM package. The command parameter used is "-e". The format is as follows: # rpm-e packagename "-e" indicates the meaning of the deletion (erase), that is, the specific packagename) delete. It is worth noting that the rpm Management mechanism does not allow you to delete a software package if it is also dependent on other software packages. Once you delete this software package, other software packages dependent on it will not work properly. I have learned how to install and delete an rpm Package. let's see how to upgrade an existing rpm package. The upgrade is similar to the installation. you can refer to the following command: www.2cto.com # rpm-Uvh package. ix86.rpm "-U" parameter indicates an upgrade. the values of "v" and "h" are the same as those described above. This is how to install, delete, and upgrade a software released using rpm.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.