Quản lý cấu hình web - part 12 doc

10 332 0
Quản lý cấu hình web - part 12 doc

Đang tải... (xem toàn văn)

Thông tin tài liệu

Getting Started with Alfresco WCM [ 92 ] 4. Click on Preview Website to view the website. 5. In the browser the website will appear as follows: The code bundle for the corresponding les is available as a downloadable for this chapter. Download from Wow! eBook <www.wowebook.com> Chapter 3 [ 93 ] Listing User Sandboxes On clicking on the web project, the sandbox view appears displaying the Staging and User Sandboxes. Each User Sandbox contains the existing web project content. The sandbox labeled My Sandbox belongs to the currently logged in user (in this case, the administrator). As the administrator, you have access to the sandboxes of all users associated with the web project. By default, only the Staging Sandbox and the User Sandbox display; however, you can select the Show All Sandboxes option in this view to display all the sandboxes available to you, as shown in the following screenshot: Download from Wow! eBook <www.wowebook.com> Getting Started with Alfresco WCM [ 94 ] Refresh your browser page to view all the User Sandboxes if the browser is not refreshed automatically. You cannot add the content directly to the Staging Sandbox. Here is the process you need to follow in order to create the content. 1. Create content in your User Sandbox either by uploading the les or using bulk import feature. 2. Preview the content to ensure the accuracy. 3. Optionally verify the broken links using the links checker. 4. Submit the approved content to the Staging Sandbox. 5. Deploy the content from Staging Sandbox to external servers using the lesystem deployer. Add content to the web project There are multiple methods of adding and creating content for a web project. In addition to creating web content within a project, you can also upload individual les from your computer or perform a bulk import of a ZIP le with web project contents as shown in the following screenshot: When you install WCM, you will also get sample les to create web projects. Refer to the le alfresco-sample-website.war, which is provided as a default example in the Alfresco bundle, from c:\alfresco\extras\wcm. Download from Wow! eBook <www.wowebook.com> Chapter 3 [ 95 ] To bulk import content of this le, select Bulk Import in the Create menu. Use the Browse button to locate and upload the alfresco-sample-website.war le. Once uploaded, click on OK to begin the import. The .war le, which you imported into the current directory (the ROOT webapp), appears in expanded form in your User Sandbox. If you don't have the sample .war le, then add few sample les to your User Sandbox from your local computer using the Add Content option. In the Alfresco WCM, a lock is automatically placed on content items created, imported, modied, or deleted, in order to prevent editing clashes. In our sandbox, notice that all of the items (not folders) currently display a padlock icon with a key ( ). This indicates that you own the lock and can perform actions on the content. A lock owned by another user appears as a plain padlock ( ). You can position the mouse cursor over the icon to display a tooltip indicating the lock owner. Click on Preview Website in the sandbox header to see the website in its current state. The preview window displays how the website or web application will look with the submitted User Sandbox content. Click on About us and then on News to display the empty Alfresco Press Releases page. You will come back to this again later once you have added some content. Close the preview and return to User Sandbox. Click on Project Name in the breadcrumb path to return to the sandbox view. Submit content to the Staging Sandbox At this point, the web project is populated with content items, some imported and some created, some submitted and some not. You must now deal with the submission of the remaining items to staging. Download from Wow! eBook <www.wowebook.com> Getting Started with Alfresco WCM [ 96 ] In the User Sandbox, expand the Modied Items list to display the imported content. Click on Submit All and, on the Submit Items page, provide the information that will display as the name and description of the corresponding snapshot in staging: Label: Initial Import Description: Sample Website Download from Wow! eBook <www.wowebook.com> Chapter 3 [ 97 ] Click on OK. The submission takes place in the background and each content item remains in the Modied Items list until its submission is complete. Refresh the page as necessary until the Modied Items list is empty. In the Staging Sandbox, expand the Recent Snapshots list to view the snapshot you have created as shown in the following screenshot: Filesystem projection The AVM repository and its virtual stores are made available by projection through CIFS. To mount the CIFS directory in Windows Server/XP, follow these steps: 1. Open up Windows Explorer. 2. Under the Tools menu, Select Map Network Drive…. 3. Select an available drive letter. Example: Z:. Download from Wow! eBook <www.wowebook.com> Getting Started with Alfresco WCM [ 98 ] 4. For Folder enter the CIFS server name. Example: \\<your_server_name>A\AVM Windows will open the mapped drive and you should see something similar to the following that includes the current web projects: AVM CIFS projection provides: • Access to all available sandboxes (Read/Write) • Access to all available layers (Preview) • Access to all snapshots in read-only mode under top-level Versions Directory • Access to all le metadata under top-level METADATA directory • Mounting of AVM virtual store "docroots" to test servers Download from Wow! eBook <www.wowebook.com> Chapter 3 [ 99 ] Bulk loading of content XML les and previously rendered les (HTML, XML, and RSS feeds) will not recreate mapping between source le -> rendering template -> output le. This is also the case for bulk uploads into a web project. There is a Web Projects tool on the Alfresco Forge, but it is for Version 2.2. These tools provided import and export features, and re-association of renditions with content and templates, among others. Virtualization server A Virtualization server is a customized version of Tomcat that treats each User Sandbox, Staging Sandbox, and workow instance as a separate Tomcat web application. It understands an "overloaded" hostname format that allows it to map requests to specic sandboxes. These "overloaded" hostnames use wildcard DNS entries to map all request to the same Alfresco Virtualization server. Conguring the virtual server for preview The conguration les for the virtual server can be found in the <alfresco home>/ virtual-tomcat/conf directory. To enable previews on a development machine, you need to modify the alfrescovirtserver.properties le to utilize the Alfresco wildcard DNS service. The alfresco.virtserv.domain value needs to be updated to replace 127-0-0-1 with the IP of the Alfresco local machine, substituting all "." with dashes: # Alfresco's free/public wildcard domain service ("EchoDNS") # returns resource records with a TTL of 1 day. Therefore, # the run-time overhead is quite minimal. Once the machine # has done a name lookup, it will cache the result for the # next 24 hours (or until you reboot). # alfresco.virtserver.domain=127-0-0-1.ip.alfrescodemo.net If the IP of the Alfresco machine is 192.168.1.25, update alfresco.virtserver. domain to alfresco.virtserver.domain=192-168-1-25.ip.alfrescodemo.net. Alfresco Virtual Server needs to be restarted at this point. Virtualization URL format The general format for Alfresco virtual hyperlink is: http://virtual-hostname.www sandbox.virtualization-domain:port/ request-path Download from Wow! eBook <www.wowebook.com> Getting Started with Alfresco WCM [ 100 ] where the virtual-hostname is dened as the DNS name when creating a web project, and the virtualization-domain is the wildcarded domain name entry that maps to the Alfresco Virtualization Server. The default port for a virtualization server is 8180. Given that a web project was created with "test" as the DNS name, (*.virtualserver.unico.com is a DNS entry for Virtualization Server) and is installed on the default port, the following are true: • http://unicom.www sandbox.virtualserver.unico.com:8180/ is the preview of the Unicom web project for the Staging Sandbox. • http://admin.unicom.www sandbox.virtualserver.unico.com:8180/ is the preview of the root of the Unicom web project for the admin user's sandbox. • http://jsmith.unicom.www sandbox.virtualserver.unico.com:8180/ index.html is the preview of the le /index.html of the web project in the jsmith user's sandbox. There are variations of this for previewing new content before the initial persistence and previews for items within a workow. Virtualization server access to the User Sandbox The AVM repository and its virtual stores are mapped into the virtual Tomcat working directory: $VIRTUAL_TOMCAT_HOME/work/Catalina/avm.alfresco.localhost/. This working directory will contain directories like the following, which are similar to the naming CIFS convention for virtual stores: TABLE[ $-1$mysite admin preview$ROOT/ $-1$silly admin preview$ROOT/ $-1$mysite admin$ROOT/ $-1$silly admin$ROOT/ $-1$mysite alice preview$ROOT/ $-1$silly alice preview$ROOT/ $-1$mysite alice$ROOT/ $-1$silly alice$ROOT/ $-1$mysite bob preview$ROOT/ $-1$silly preview$ROOT/ $-1$mysite bob$ROOT/ $-1$silly-$ROOT/ $-1$mysite preview$ROOT/ host-manager/ $-1$mysite$ROOT/ manager/ $42$mysite$ROOT/] Download from Wow! eBook <www.wowebook.com> Chapter 3 [ 101 ] Virtual server conguration Congure the virtual server to allow the previewing of content and review some of the content in the CIGNEX web project in the user's sandbox. Once you are satised that the preview is working, submit the whole project to staging. After the submission is complete, preview the website in the Staging Sandbox. 1. Determine the current IP of the Alfresco machine using one of the following: ° Windows—open CMD prompt and run the ipconfig command ° Unix(s)—open terminal and run ipconfig -a 2. Open the virtserver.properties le found in the <alfresco home>/ virtual-tomcat/conf directory. c:\Alfresco\virtual-tomcat\conf\virtserver.properties 3. Modify the following line to use the IP found in step one, replacing all "." with "-" : alfresco.virtserver.domain=127-0-0-1.ip.alfrescodemo.net For IP of 192.168.1.100 the line would be: alfresco.virtserver.domain=192-168-1-100.ip.alfrescodemo.net 4. Save and exit the le. 5. Start or restart the Virtual Server. 6. Test previewing the le in the user's sandbox. Click on Submit All to send all les to the staging environment. Test preview in the Staging Sandbox. Previewing in the User and Staging Sandboxes should work. Dynamic websites using WCM A web project it not limited to just static les. Web projects can include server-side scripting les including JSP, PHP, CF, or Python les. In the end, these les would be published to the appropriate application server or web server enabled to evaluate these les. Specically for Java, Alfresco supports the evaluation of JSPs and exploded WARs within a web project with support for preview of JSPs by the Virtual Server. You could upload archived WARs, have Alfresco deploy them to a web application server for unpacking, and so on. For Tomcat, it could place them in the webapps directory. Download from Wow! eBook <www.wowebook.com> . stores: TABLE[ $-1 $mysite admin preview$ROOT/ $-1 $silly admin preview$ROOT/ $-1 $mysite admin$ROOT/ $-1 $silly admin$ROOT/ $-1 $mysite alice preview$ROOT/ $-1 $silly alice preview$ROOT/ $-1 $mysite alice$ROOT/ $-1 $silly. alice$ROOT/ $-1 $silly alice$ROOT/ $-1 $mysite bob preview$ROOT/ $-1 $silly preview$ROOT/ $-1 $mysite bob$ROOT/ $-1 $silly-$ROOT/ $-1 $mysite preview$ROOT/ host-manager/ $-1 $mysite$ROOT/ manager/ $42$mysite$ROOT/] Download. "." with " ;-& quot; : alfresco.virtserver.domain =12 7-0 - 0-1 .ip.alfrescodemo.net For IP of 192.168.1.100 the line would be: alfresco.virtserver.domain=19 2-1 6 8-1 -1 00.ip.alfrescodemo.net 4.

Ngày đăng: 05/07/2014, 20:21

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan