官术网_书友最值得收藏!

Downloading and installing WildFly

In this recipe, we will learn how to get and install WildFly. As always, in the open source world you can do the same thing in different ways. WildFly can be installed using your preferred software manager or by downloading the bundle provided by the http://wildfly.org site. We will choose the second way, as per the JDK.

Getting ready

Just open your favorite browser and point it to http://wildfly.org/downloads/. You should see a page similar to the following screenshot:

WildFly's download page

At the time of writing this book, the latest WildFly was version 9.0.0.Beta2. The final version is now available and in use.

Now, download the latest version into the WFC folder.

How to do it…

  1. Once the download is complete, open a terminal and extract its contents into the WFC folder, executing the following commands:
    $ cd ~/WFC && tar zx wildfly-9.0.0.Beta2.tar.gz
    

    The preceding command will first point to our WildFly Cookbook folder; it will then extract the WildFly archive from it. Listing our WFC folder, we should find the newly created WildFly' folder named wildfly-9.0.0.Beta2.

  2. To better remember and handle WildFly's installation directory, rename it wildfly, as follows:
    $ cd ~/WFC && mv wildfly-9.0.0.Beta2 wildfly
    

    By the way, WildFly can be also installed using the traditional YUM, Fedora's software manager.

    Note

    In a production environment, you will not place the WildFly installation directory into the home folder of a specific user. Rather, you will be placing it into different paths, relative to the context you are working in.

  3. Now we need to create the JBOSS_HOME environment variable, which is used by WildFly itself as base directory when it starts up (probably in future releases, this will be updated to WILDFLY_HOME). We will also create the WILDFLY_HOME environment variable, which we will use throughout the whole book to reference WildFly's installation directory. Thus, open the .bash_profile file, placed in your home folder, with your favorite text editor and add the following directives:
    export JBOSS_HOME=~/WFC/wildfly
    export WILDFLY_HOME=$JBOSS_HOME
  4. For the changes to take effect, you can either log out and log back in, or just issue the following command:
    $ source ~/.bash_profile
    

If you followed the first two recipes carefully, your .bash_profile file should look like the following image:

主站蜘蛛池模板: 平湖市| 婺源县| 马关县| 赤城县| 洛阳市| 莒南县| 克东县| 彭阳县| 江北区| 海伦市| 麻阳| 鄂州市| 桑植县| 英吉沙县| 宕昌县| 石阡县| 清丰县| 乐都县| 辉县市| 大冶市| 鞍山市| 淄博市| 枣阳市| 沅陵县| 银川市| 都兰县| 怀柔区| 神池县| 鄂伦春自治旗| 越西县| 高台县| 阜新市| 新巴尔虎右旗| 宜宾市| 太和县| 平谷区| 商洛市| 罗甸县| 台江县| 屏东县| 曲靖市|