1 00:00:04,450 --> 00:00:10,510 Now that you have a good understanding of installing and configuring engine X one of the final configuration 2 00:00:10,540 --> 00:00:17,200 tasks is that of making more functionality available or in other words adding new engineers modules 3 00:00:17,650 --> 00:00:23,320 in this place and then we'll see how to add modules to an existing engineers install by rebuilding the 4 00:00:23,320 --> 00:00:24,100 source. 5 00:00:24,160 --> 00:00:30,760 But more specifically do so with a dynamic module dynamic modules being modules we can load selectively 6 00:00:30,760 --> 00:00:37,240 from the engine configuration unlike static modules which is always loaded before we start. 7 00:00:37,240 --> 00:00:43,390 Note that adding standard modules is exactly the same as adding dynamic modules as is upgrading engine 8 00:00:43,390 --> 00:00:47,160 X itself to a newer version just something to keep in mind. 9 00:00:47,880 --> 00:00:53,700 As I mentioned then in order to add new modules to engine X will have to rebuild engine X from source 10 00:00:54,090 --> 00:00:57,100 meaning as with the installation section of the course. 11 00:00:57,150 --> 00:00:58,880 We'll need the source code. 12 00:00:59,160 --> 00:01:04,920 I still have the original source I downloaded right here in the root users home directory including 13 00:01:04,920 --> 00:01:08,470 that extracted directory containing the actual source code. 14 00:01:08,760 --> 00:01:14,350 I'll change into this directory this being where we originally built this install from. 15 00:01:14,460 --> 00:01:16,370 And it's perfectly reusable. 16 00:01:16,620 --> 00:01:20,480 Of course at this point should engine X have released a new version. 17 00:01:20,490 --> 00:01:26,010 You could also download that in bold the newer version instead which is all there is to upgrading engine 18 00:01:26,010 --> 00:01:26,860 X.. 19 00:01:27,060 --> 00:01:33,660 Step 1 to rebuilding in X then is making sure we don't change any of the existing configuration which 20 00:01:33,660 --> 00:01:39,020 we can very easily get by running engine X with a capital V flag there. 21 00:01:39,060 --> 00:01:42,860 This being the configuration with which the current install was built. 22 00:01:43,050 --> 00:01:47,380 So immediately copy that as we all want to use the exact same configuration. 23 00:01:47,490 --> 00:01:50,620 Only adding are new modules having copied that. 24 00:01:50,640 --> 00:01:56,850 The next step is going to be adding a new module to this configuration to see a list of modules available 25 00:01:56,850 --> 00:01:58,410 with the source code download. 26 00:01:58,410 --> 00:02:05,820 Then we can run configure in the current rectory with a help flag which lists out all of these modules 27 00:02:05,880 --> 00:02:09,120 and flags available to configure engine X worth. 28 00:02:09,330 --> 00:02:15,720 And if we scroll up a bit we see a few of these available modules that end worth equals dynamic. 29 00:02:15,720 --> 00:02:22,350 These being dynamic modules we can also filter this output to only show the dynamic modules run that 30 00:02:22,350 --> 00:02:23,480 same command. 31 00:02:23,640 --> 00:02:29,340 But this time filter through grep looking for only lines containing dynamic. 32 00:02:29,340 --> 00:02:33,090 And there we have it not many but still a few to choose from. 33 00:02:33,090 --> 00:02:39,540 I'll add this HTP image filter module to demonstrate so post the original configuration command. 34 00:02:39,540 --> 00:02:45,780 We copied a minute ago and simply add to this the module flag as it's listed here in order to have this 35 00:02:45,780 --> 00:02:48,220 module compiled into engine X.. 36 00:02:48,420 --> 00:02:54,350 With that equals dynamic string telling engine X to compile this as a dynamic module. 37 00:02:54,440 --> 00:02:57,410 Now whilst running this as is will be fine. 38 00:02:57,460 --> 00:03:03,690 We've configured our engineers install to have all its configuration files at slash iti see slash engine 39 00:03:03,690 --> 00:03:10,170 X meaning to have these dynamic modules at that same location which is going to make enabling them much 40 00:03:10,170 --> 00:03:11,190 easier. 41 00:03:11,190 --> 00:03:18,600 We also have to specify the module spark off which we can do by adding a flag modules Poff setting that 42 00:03:18,600 --> 00:03:21,380 to slash it C slash engine X.. 43 00:03:21,480 --> 00:03:26,930 So where the configuration files are located slash modules run this. 44 00:03:29,160 --> 00:03:36,780 And very quickly the configuration files HTP image filter module requires the g.d. library which is 45 00:03:36,780 --> 00:03:39,330 an image processing module for Linux. 46 00:03:39,390 --> 00:03:47,130 A dependency of this image filter module clear this install that module via a peetie by running apt 47 00:03:47,190 --> 00:03:51,230 get install labidi dev. 48 00:03:52,380 --> 00:03:56,760 I'll forward through this answering yes all the way through and done. 49 00:03:57,300 --> 00:04:04,890 Try configuring the engine X source again fast forward and this time it works confirming all other configuration 50 00:04:04,920 --> 00:04:11,310 paths including that new modules directory compile the newly configured source code by running make 51 00:04:11,430 --> 00:04:13,720 as we did during the installation. 52 00:04:13,740 --> 00:04:16,690 Fast forward again as this is quite a long process. 53 00:04:16,980 --> 00:04:24,150 And once that's done run make install which installs the newly compiled source over the existing engine 54 00:04:24,150 --> 00:04:25,530 exe install. 55 00:04:25,530 --> 00:04:31,390 Note that any existing configuration files are left untouched so nothing to worry about there. 56 00:04:31,470 --> 00:04:37,650 Check the current Bolds configuration and this now includes a new module and the modules bath. 57 00:04:38,450 --> 00:04:41,220 Reload engine X to make sure everything is fine. 58 00:04:42,370 --> 00:04:43,820 Check it status. 59 00:04:46,190 --> 00:04:47,100 And all good. 60 00:04:47,320 --> 00:04:53,580 So having this new image filter module installed Let's try and use it in our configuration. 61 00:04:53,680 --> 00:04:56,790 The obvious candidate being thumb don't be in G. 62 00:04:57,730 --> 00:05:00,080 Over to the configuration file. 63 00:05:00,250 --> 00:05:07,270 I'll add a new exact match location for thumb dot G meaning we can apply image filters to this image 64 00:05:07,270 --> 00:05:14,730 with certainty inside this location and if we check the documentation for this new module HTP underscore 65 00:05:14,770 --> 00:05:21,190 image underscore faulter we see a number of arguments accepted on this image filter director off for 66 00:05:21,190 --> 00:05:23,610 manipulating image data. 67 00:05:23,680 --> 00:05:30,920 I'll add image underscore folder rotate rotating thumb don't be in G by a hundred and eighty degrees. 68 00:05:31,150 --> 00:05:33,370 So flipping it upside down. 69 00:05:33,460 --> 00:05:38,590 Save this and before reloading in generics as I know this isn't going to work. 70 00:05:38,590 --> 00:05:42,500 Check the configuration syntax with engine X and a t flag. 71 00:05:42,700 --> 00:05:43,850 Unknown directive. 72 00:05:43,930 --> 00:05:49,450 Image underscore or falter that they're active we just added the should of course be available as we've 73 00:05:49,510 --> 00:05:52,050 added that h.t. dp image full to module. 74 00:05:52,210 --> 00:05:58,630 But remember we added it as a dynamic module meaning that module is not being loaded into INJ and X 75 00:05:58,630 --> 00:06:05,410 by default the module itself exists in the modules part directory we defined list the contents of that 76 00:06:05,470 --> 00:06:15,010 rectory e.g. C in X modules and there it is modules having a common dot s o extension so to enable this 77 00:06:15,010 --> 00:06:22,180 module and have engine X load it we can add to the configuration in the main context load underscore 78 00:06:22,240 --> 00:06:29,260 module the path to that module which is why I said having it in the same directory as the engine X configuration 79 00:06:29,260 --> 00:06:36,900 simplifies loading it modules slash hgt body image filter module dot s o. 80 00:06:36,940 --> 00:06:41,110 Relative to this engine X dot com file safe. 81 00:06:41,800 --> 00:06:45,250 Check the configuration is okay again which it is. 82 00:06:45,250 --> 00:06:46,570 This time round. 83 00:06:47,210 --> 00:06:48,210 Reload. 84 00:06:49,250 --> 00:06:51,560 And in the browser window refresh. 85 00:06:52,300 --> 00:06:58,520 Some dopey end year served at a 180 degree rotation meaning our new image filter module is working as 86 00:06:58,520 --> 00:07:05,090 expected as you can see then adding to upgrading or even making changes to the engine X installation 87 00:07:05,330 --> 00:07:09,940 is extremely simple and can be done without any downtime whatsoever.