简体   繁体   中英

Install java through Chef-recipe

How to Install Sun java jdk installation 1.7 through Chef recipe? I am newbie in this, Can anyone please help me?

有一本关于此的食谱,它被称为java食谱。

You should have specified, in which system you want to install JDK - this varies on unix and Windows systems.

First of all, you can use cookbook java , which can be found here .

Additionaly, if you don't want to use any cookbooks, just install it through Chef resource.

In example, installing JDK on windows (requires windows cookbook):

windows_package 'Java SE Development Kit 7 Update 79'  do
        source              src
        action              :install
        installer_type      :custom
        options             '/v\"/qn INSTALLDIR=\\\"C:\\Java\\\"\"'
end

This will install JDK 7.79 in C:/Java directory.

Remember, that name of resource should be the same as package name in system - you can check them in Control Panel (Uninstalling programs).

If you want more informations about installing JDK silently, you can also check this question.

Cheers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM