Initializing the Sample Databases and Using the Sample Sites on Mac OS X
Introduction The GoLive Preconfigured Servers installer includes several very helpful site samples in addition to the Web server and database software. These sample sites are a great way to learn about building dynamic web sites because you can use them in your web browser with Apache, MySQL, and Tomcat running in the background. You can also open these sites directly in GoLive to see how they pages were constructed, the files were arranged, and the dynamic bindings were created.
Prerequisites
To use this tutorial you must have already successfully installed the GoLive Preconfigured Servers as outlined in this this easy-to-follow tutorial.
Step 1: Locate the Sample Sites
To see the sample sites point your web browser to http://127.0.0.1:8200/ or http://localhost:8200/. If your web browser fails to load the web page shown below in Figure 2.1 make sure you have started the Web server by double-clicking the Start Webserver alias on your Desktop. You should bookmark the Dynamic Content Welcome page for easy access later.

Figure 2.1
Step 2: Creating the Sample Databases
To view the sample PHP and JSP sites you must first create the sample databases with the web browser interface shown above in Figure 2.1. Make sure to read all the helpful instructions on the Dynamic Content Welcome page and then click the Create Sample Site Databases button as seen below in Figure 2.2 to create the sample databases for the sample sites. You should see a message in your web browser that says "The sample site database golive_samples was installed." Now click the Back button in your web browser.

Figure 2.2
To view the Custom Merchant ecommerce examples you must create another test database with the web browser interface shown below in Figure 2.3. Click the Create Test Provider Database button to create the database and you should see a message in your web browser that says "Success. The database golive_cm_provider was installed successfully." Now click the Back button in your web browser to browse the sample sites.

Figure 2.3
Step 3: Browsing the Sample Sites
Now you can click on the Samples in PHP or Samples in JSP links in the upper-left corner of the Dynamic Content Welcome page to view the functioning dynamic web sites being served live from your computer. Most of the sample sites include three helpful view modes: Main View, Administration View, and How it Works. The Main View is what an outside visitor might see. The Administration View shows how you might include a browser-based administration screen for content contributors or clients. The How it Works section includes a thorough dissection of how the site was built using GoLive.

Figure 2.4
Step 4: Learning from the Sample Sites
You can also open the sample sites in GoLive to learn more about how the dynamic features were created. The PHP sample site can be opened from Applications/GoLive_Preconfigured_Servers/SampleSites/php/samples.site and the JSP sample site can be opened from Applications/GoLive_Preconfigured_Servers/SampleSites/jsp/samples.site.
Conclusion
Now that you've initialized the sample databases and discovered the sample PHP and JSP sites you have some very powerful learning resources at your finger tips. For more free tutorials, tips, and tricks visit the Tips page.
|