Tải bản đầy đủ (.pdf) (14 trang)

Thiết kế web với joomla 1.6(5).x part 4 pptx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (2.07 MB, 14 trang )

Chapter 2: Obtaining and Installing Joomla!
21
Caution
Problems have been detected with certain PHP versions. Avoid the following versions if at all possible: 4.3.9,
4.4.2, and 5.0.4. Also note that some problems have been reported with versions of the Zend Optimizer.
Site visitor and administrator requirements
The front end of Joomla! is usable by a wide variety of platforms and browsers, including mobile
devices. Indeed, the display of the front end is impacted more by the way the site template is
coded than by anything inherent in the system itself. Support for JavaScript is recommended, but
not required for the default site.
Note
The installation of certain third-party extensions may bring with them additional requirements. You should
always check whether the extensions that you install are compatible with the systems you require for your web
site visitors.
To administer a Joomla! site you literally need nothing more than a connection to the Internet and
a web browser. The back-end admin system is compatible with the recent versions of the most
common browsers, including Internet Explorer, Firefox, Safari, and Opera.
Chrome is also a supported browser.
Installing Joomla!
This section covers the installation of Joomla! on either a local server or a remote web host.
Installing Joomla! locally allows you to create a testing or development site that can greatly ease
your development efforts. Installing Joomla! on a remote web host allows you to create a publicly
accessible site that others can see and use. In either event, the process is roughly the same.
Creating a local development site
You can create a Joomla! site on your local computer for testing and development purposes. A local
installation makes it faster and easier to work on the creation of a new site. It is a great way to
develop a site prior to deploying it on a live server as you can see the impact of your changes
immediately without having to move files back and forth from a remote web server. Moreover, if
you have only a slow or unreliable Internet connection, a local development installation can save
huge amounts of time and frustration.
A local installation can be created on any system — Windows, Mac, or Linux. However, you need


to make sure that your machine can function as a server and meets the technical requirements out-
lined in the preceding section. If you want to obtain and install each of the various components
Part I: Getting Started with Joomla!
22
independently you can, but I recommend that you acquire one of several packages that allows you
to install all the required software in one click.
l
For Windows users, the XAMPP and WampServer packages provide an easy way to install
Apache, MySQL, PHP, and related tools.
l
Mac users can use either XAMPP or MAMP.
l
Linux users can install XAMPP.
Note
You can download XAMPP at www.apachefriends.org. WampServer at www.wampserver.com and
MAMP at
www.mamp.info.
Cross-Reference
Installing WampServer is discussed in Appendix C. Installing MAMP is discussed in Appendix D.
After you have installed the underlying package containing all the necessary server components,
you are ready to set up Joomla! on your local machine. Installing Joomla! on any of the -AMP
packages involves the following steps:
1. Download the Joomla! core files.
2. Open the htdocs directory inside the -AMP folder on your machine.
3. Create a new directory for your Joomla! site. Keep the name simple because you use it
for the address in your browser; for example, “joomla15.”
Make sure that you unzip the files in the ROOT of the directory (htdocs). This way, the
start page for -AMP will be the ROOT of the directory. The preceding example places the
files in a directory named /joomla15 which is one level down from the root directory.
4. Unzip the Joomla! files and place them inside the new directory.

5. Start the servers for your -AMP package. Follow the directions that came with the
application. When the servers start, your browser opens and displays the home page of
the -AMP package. What you see should be similar to Figure 2.4.
6. Click on the link for phpMyAdmin. The phpMyAdmin interface opens in your
browser.
7. In the text field labeled Create new database, type a name for your database and
then click Create. The system creates a new database.
8. Point your browser to the directory where you placed your Joomla files. The Joomla!
installation wizard appears.
From this point, you can follow the steps outlined in the “Running the Joomla! Installer” section
later in this chapter.
Chapter 2: Obtaining and Installing Joomla!
23
FIGURE 2.4
The start page of MAMP, typical of the -AMP packages.
Installing on a web hosting service
Joomla! installation on a remote server typically takes one of two approaches. Some web hosts pro-
vide automated installers. The best known of these automated installers is Fantastico. The auto-
mated installers allow you to set up Joomla! or other popular systems directly from your web
hosting account control panel. If you want to use an automated installer, follow the directions of
your web host. Should you need assistance, contact your web host for support.
Note
Occasionally, the use of an automated installer can result in permissions problems in the resulting site. For
most users these problems are not an issue, but if you intend to do extensive customization to your site, you
are best advised to avoid this whole issue by installing the site files yourself, rather than relying on the auto-
mated installer.
Part I: Getting Started with Joomla!
24
Before you begin the install process of Joomla! on the server, you want to create your database with
user privileges ahead of time. You need the user and password to finish all the steps in the Joomla!

installer.
1. Download the Joomla! core files.
2. Access your web server.
3. Create a new directory for your Joomla! site. Keep the name simple because you use it
for the address in your browser; for example, “joomla.” If you want to install Joomla! in
the root directory, you can skip this step.
4. Move the archive containing the Joomla! files to the server. You can do this either by
using FTP to transfer the files, or by using the file manager in your Web Hosting control
panel. Place the files in the directory where you want the site to appear.
Note
Appendix B shows a listing of the Joomla! files and directories as they should appear on your server.
5. Extract the Joomla! file archive. If your web host does not provide the option to extract
archive files on the server, you need to extract the archive locally and then move the files
up to the server. Note that this can take significantly longer because the number and size
of the files are substantial!
6. Point your browser to the directory where you placed your Joomla files. The Joomla!
installation wizard appears.
From this point, you can follow the steps outlined in the following section, “Running the Joomla!
Installer.”
Note
The name of the root directory varies from web host to web host. If you’re not sure which directory on your
web server is the root directory, contact your web hosting support team.
Running the Joomla! installer
Joomla! includes a step-by-step installer with an interface that is similar to many other standard
software installation wizards. The installer does the vast majority of the work for you. In most
cases, you need to do no more than simply supply information when prompted to do so.
Before you can run the installer, you must follow the steps outlined in the previous two sections,
depending on whether you are installing Joomla! locally or on a web host, and then you must
point your browser to the address of the Joomla! files on your server. After you load the address of
your Joomla! site in the browser, the installation wizard starts automatically, and Step 1 of the

installer is displayed on your screen.
Step 1 is to select the language to be used by the Installer, as shown in Figure 2.5. Click the lan-
guage you prefer and then click the Next button.
Chapter 2: Obtaining and Installing Joomla!
25
FIGURE 2.5
Select the language to be used during the installation process. (Step 1 of the installer.)
Step 2 of the Installer is the Pre-Installation Check, shown in Figure 2.6. Note that two lists appear
on this screen: The items listed at the top are requirements that must be met for the system to
work properly. The items listed at the bottom are Recommended Settings. If your system fails to
support any of these items, you will see a bright red No appear next to the item. If any of the items
at the top are not supported, you must fix these issues. If your system fails to support any of the
items on the bottom list, it is not fatal; the system will function, but the configuration will not be
ideal.
If any of the requirements on the top list are not met, you must fix that issue and get a green Yes
before you can proceed to the next step in the installation process. To have the installer retest your
system, click the Check Again button. Repeat as necessary. After all of the required items show a
green Yes, click the Next button to move to Step 3.
Part I: Getting Started with Joomla!
26
FIGURE 2.6
You must get all the required elements to show a green Yes before proceeding. (Step 2 of the Installer.)
Step 3 of the Installer is the License, as shown in Figure 2.7. Read the terms of the license and
then click the Next button. Note that by clicking the Next button you are agreeing to the terms of
the license.
Step 4 of the Installer is Database Configuration, as shown in Figure 2.8. You need to complete the
information requested on this screen to install Joomla! successfully. If you have manually created
the database by using phpMyAdmin, enter that information here. Note, however, that it is not
always necessary to manually create the database; in many cases the Joomla! installer is capable of
creating the database on its own.

Chapter 2: Obtaining and Installing Joomla!
27
FIGURE 2.7
Read the terms of the License. (Step 3 of the Installer.)
The screen is divided into two sections: Basic Settings and Advanced Settings. All of the following
Basic Settings fields are required:
l
Database Type: For most users the default option, mysql, is correct. If, however, you are
using mysqli (MySQL Improved), you should select that option from the combo box.
l
Host Name: If you are installing Joomla! locally, the odds are you should enter localhost
into this field. If you are installing on a web host, use the name they supply.
l
Username: This field holds the MySQL username. The default name is root. If you or
your web host have specified something other than the default value, enter it instead.
l
Password: Enter the password for your MySQL installation.
l
Database Name: This is the name you set when you created the database, or if you are
relying on the Joomla! Installer to create the database, enter the name you want it to use
for your new database.
Part I: Getting Started with Joomla!
28
The Advanced Settings can be viewed by clicking on the name. When you click on the name, the
section will fold out, displaying the options in the following list. Note that these options are only
applicable if you want to install over an existing Joomla! installation or install multiple instances of
Joomla! in one database.
l
Delete existing tables: Any existing tables are wiped out and replaced with new tables
from this installation.

l
Back up Old Tables: Any existing tables are backed up before the new tables are written.
l
Table Prefix: The default table prefix is jos_. You can set an alternative prefix if you so
desire; this setting is most useful when you intend to place multiple installations inside
one database. Note that the prefix
bak_ is reserved for use in backups and therefore
should not be used.
After you have entered the information, click the Next button. The Installer attempts to connect
with your database and if it is successful, it moves on to Step 5. If it is not successful, you will
receive an error message explaining where the problem lies. After you have addressed the problem,
try clicking the Next button again.
FIGURE 2.8
Showing the Database Configuration fields. (Step 4 of the Installer.)
Chapter 2: Obtaining and Installing Joomla!
29
Step 5 of the Installer is the FTP Configuration, as shown in Figure 2.9. The FTP functionality has
been included in Joomla! to provide a work-around for situations where the web server prohibits
other types of FTP access. If you need this functionality, enable this; if you do not, then skip this
step and move to Step 6.
The screen is divided into two sections: Basic Settings and Advanced Settings. All of the following
Basic Settings fields are required if you want to enable this feature.
l
Enable FTP file system layer: The default setting is No. If you want to use this feature,
set it to Yes.
l
FTP User: You must type a name to be used for the FTP access.
l
FTP Password: You must type a password to be used for the FTP access.
l

FTP Root Path: Type the FTP root path if you know it; if not you can click the Autofind
FTP Path button and let the system attempt to figure this out.
l
Verify FTP Settings: After you have completed the fields listed above, click this button to
verify and test the settings.
The Advanced Settings can be viewed by clicking on the name. When you click, the section folds
out, displaying the following options:
l
FTP Host: The system attempts to determine this value. If it is not correct for your sys-
tem, type the value you desire.
l
FTP Port: The system attempts to determine this value. If it is not correct for your system,
type the value you desire.
l
Save FTP Password: Yes/No, the default value is No. Set it to Yes if you want the system
to remember the password, rather than prompt you for it when needed.
After you have entered the information, click the Next button. The Installer moves on to Step 6.
Tip
If you want to skip FTP setup during installation, you can always set it up later via the Global Configuration
Manager. See Chapter 4 for a discussion of the Global Configuration Manager.
Step 6 of the Installer is the Main Configuration screen, shown in Figure 2.10. A number of
important items appear on this screen, including the option to install sample data for your use.
First, start off by giving your site a name. Type the name you want to use for your site into the field
labeled Site Name. Note that this name will appear on the browser title bar and in a wide variety of
circumstances. You can adjust this later through the Global Configuration Manager.
Next, type the e-mail address you want to associate with the administrator account. Type the
address in the field labeled Your E-mail. In the field Admin Password, type your choice of pass-
word for the default admin account. Type it again to confirm it in the Confirm Admin Password
field.
Part I: Getting Started with Joomla!

30
FIGURE 2.9
The optional FTP Configuration. (Step 5 of the Installer.)
Tip
If you want to install sample data for your site, use the Install Sample Data button. If you want an empty site,
you can skip this.
Tip
If this is your first time working with Joomla!, I highly recommended that you install the sample data. The
Joomla! sample data includes a variety of useful information as well as examples of common site-building tech-
niques. Note that while you can always delete the sample data you cannot easily install it later, so if you think
you might want it, install it now!
The Load Migration Script option you see below the Sample Data button is intended for users who
want to populate the database of their new site with data from another source, typically from a previ-
ous Joomla! site. If this is not applicable to you, skip it and click the Next button to move to Step 7.
Chapter 2: Obtaining and Installing Joomla!
31
FIGURE 2.10
Step 6 of the Installer is the Main Configuration screen, which includes the option to install the sample
data or to migrate existing data to the new site.
Part I: Getting Started with Joomla!
32
If, on the other hand, you want to populate your Joomla! site with data from another source, you can
do so through this interface, or you can do it later by manually migrating the database content and
running the SQL query through phpMyAdmin. Note that the utility provided here is dependent upon
the existence of an SQL migration script that is compatible with your version of Joomla!. The best
way to achieve this is to use the
com_migrator tool to create the migration script.
If you have a compliant script, follow these steps:
1. Click the radio button to select the option Load Migration Script.
2. Enter the old table prefix into the field labeled Old Table Prefix.

3. Select the old site’s encoding from the combo box.
4. Click the Browse button. The file upload window opens.
5. Locate the migration script file and then click Upload. The File Upload window loads
and the name of the migration script should appear in the field next to the label
Migration Script.
6. If your script is from a Joomla 1.0 site, click the checkbox labeled This script is a
Joomla! 1.0 migration script.
7. Click the Upload and Execute button. The system attempts to populate the database
with the script data. If you are successful, a confirmation message appears.
Note
The com_migrator component is a third-party extension that must be installed on your old site and used to
create the migration script. You can find the extension on the JoomlaCode site. Note that
com_migrator will
only migrate your core files. If you have extensions installed on your old site, you need to manage their migra-
tion separately. Migration can be the source of a number of problems, due to the wide variations in installation
configurations and extensions. For a list of common problems and their solutions, see
http://docs.
joomla.org/Common_Migrator_Errors
.
Step 7 of the Installer is the Confirmation Screen, as shown in Figure 2.11. There are no required
steps here; rather this page provides you with links to both the front end and the back end of your
new site, along with a warning that you need to delete your installation directory to avoid prob-
lems and security risks.
At this time, you need to access your Joomla! files on the server and delete the directory named
installation. After you have deleted the directory, you are ready to go. Click through to either
the front end or the back end of your site to close the installer.
Chapter 2: Obtaining and Installing Joomla!
33
FIGURE 2.11
The final Confirmation screen. You’re done! (Step 7 of the Installer.)

Sample data
The sample data provided as an option during the installation process is designed to help users
new to the system. The topics include tutorials as well as information about the Joomla! project
and directions to further help resources. Additionally, when you elect to install the sample data,
the system also creates a number of menus and modules that help speed your initial development
of the site. Many experienced site developers actually choose to install the sample data because it
saves them time creating the most common menus and modules; it’s faster to delete what you don’t
need than to create from scratch all the basic parts.
That said, if you are an experienced developer and you do want the maximum amount of control
over your site, you will want to skip the sample data and install a clean site that you can customize
to suit your needs exactly.
Part I: Getting Started with Joomla!
34
Summary
In this chapter, we covered the acquisition and installation of Joomla! You learned the following:
l
Where to obtain the proper files
l
How to install the system on a local host
l
How to install the system on a web hosting service
l
The various installation requirements and options
l
The advantages of using the sample data

×