$ mysql -u root -h localhost -p mysql> SHOW DATABASES; mysql> CREATE DATABASE joomla; mysql> GRANT ALL ON joomla_db.* TO joomla_usr@localhost IDENTIFIED BY 'joomla_pass'; mysql> FLUSH PRIVILEGES;
/var/www/html
./var/www/html
, and set file ownership to web server process (in this case, apache
):$ cd /var/www/html $ tar xzf Joomla_1.0.11-Stable-Full_Package.tar.gz $ chown -R apache:apache *
joomla
as the installation directory).configuration.php
:$ chmod a+rw configuration.php
/var/www/html/installation
) for security reasons./var/www/html/configuration.php
. Make sure this file is set to read-only.Sometimes, due to permission restrictions on the server, it is not possible to install a component through the usual method (inside Joomla). You have 2 alternatives:
Usually giving yourself more rights is a problem since you might be hosting and not managing the server. To work around this problem, you need a different approach
Perform the following steps: 1. Analyze the installer XML file:
Sample Installer XML file:
<mosinstall type="component"> <name>HelloForm</name> <creationDate>06/08/2006</creationDate> <author>John Doe</author> <copyright>© 2006, John Doe. All rights reserved.</copyright> <license> This component in released under the GNU/GPL License (http://www.gnu.org/copyleft/gpl.html). </license> <authorEmail>jdoe@example.com</authorEmail> <authorUrl>www.example.com</authorUrl> <version>1.0</version> <description> This provides a basic Joomla component. </description> <files> <filename>helloform.php</filename> <filename>helloform.html.php</filename> <filename>helloform_settings.php</filename> <filename>helloform_settings.php.default</filename> <filename>language/english.php</filename> </files> <install> <queries> <query>DROP TABLE IF EXISTS `#__helloform`;</query> </queries> </install> <installfile> <filename>install.helloform.php</filename> </installfile> <uninstallfile> <filename>uninstall.helloform.php</filename> </uninstallfile> <uninstall> <queries> <query>DROP TABLE IF EXISTS `#__helloform`;</query> </queries> </uninstall> <administration> <menu>HelloForm</menu> <submenu> <menu act="config">Configuration</menu> <menu act="manage">Manage Items</menu> </submenu> <files> <filename>admin.helloform.html.php</filename> <filename>admin.helloform.php</filename> <filename>helloform.class.php</filename> <filename>toolbar.helloform.html.php</filename> <filename>toolbar.helloform.php</filename> <filename>help/index.html</filename> <filename>tmpl/com_admin.html</filename> </files> </administration> </mosinstall>
2. Perform installation steps manually using the installer XML file as a reference:
mycomp
: <files>
should by copied to /joomla/components/com_mycomp
. <administration><files>…</files></administration >
should by copied to /joomla/administration/components/com_mycomp
.<install><queries>…</queries></install>
.
3. Register the component on the server. Basically, go to the Joomla database, under the components table (usually jos_components
), create a new record similar to the others. The fields must contain the relevant data from the new component.
Note that:
<administration><menu>Parent Menu Entry …</menu></administration>
there will be an entry in table jos_components
, and the Parent ID will be 0. <administration><submenu><menu>SubMenu Entry …</menu></submenu></administration>
there will be an entry in table jos_components
, and the Parent ID (field `parent`) will contain the Record ID (field `id`) of the parent record (parent menu).For example, these would be the records to add based on the XML installer:
id | name | link | menuid | parent | admin_menu_link | admin_menu_alt | option | ordering | admin_menu_img | iscore | params |
---|---|---|---|---|---|---|---|---|---|---|---|
35 | HelloForm | option=com_helloform | 0 | 0 | Manage/Configure HelloForm | com_helloform | 0 | images/icon.png | 0 | ||
36 | Manage | 0 | 35 | option=com_helloform&act=manage | Manage HelloForm | com_helloform | 1 | images/icon.png | 0 | ||
37 | Configuration | 0 | 35 | option=com_helloform&act=config | Configure HelloForm | com_helloform | 2 | images/icon.png | 0 |
Sample SQL statement:
INSERT INTO `jos_components` ( `id` , `name` , `link` , `menuid` , `parent` , `admin_menu_link` , `admin_menu_alt` , `option` , `ordering` , `admin_menu_img` , `iscore` , `params` ) VALUES ( NULL , 'HelloForm', '', '0', '0', 'option=com_helloform', 'Manage/Configure HelloForm', 'com_helloform', '0', 'images/icon.png', '0', '' );
These are the descriptions of each field:
Field | Description |
---|---|
`id` | Record ID, which gets created automatically if NULL is used. |
`name` | Component name, such as MyComp . |
`link` | Link to the component, used for accessing the component frontend, such as option-com_mycomp . |
`menuid` | Menu ID, usually 0. |
`parent` | Parent component ID. If it is the main menu entry, this value is 0. If it is a submenu entry, this value has to be the parent (main entry) ID. |
`admin_menu_link` | Menu link to the component, which is only available under the administration menu. |
`admin_menu_alt` | Menu name (or description) to used instead of plain menu link. |
`option` | Any options specific to the component. |
`ordering` | Ordering used in the menu listing. This is important for the submenu entries. |
`admin_menu_img` | Icon to use beside menu entry. |
`iscore` | Specified whether it is a core component (0=False, 1=True). |
`params` | Any parameters specific to the component. |
An alternative way (probably the best way to approach the problem):
If you do not want to go through all this trouble, at least:
jos_components
. jos_components
(use phpMyAdmin to execute the SQL statement). For example: INSERT INTO `jos_components` ( `id` , `name` , `link` , `menuid` , `parent` , `admin_menu_link` , `admin_menu_alt` , `option` , `ordering` , `admin_menu_img` , `iscore` , `params` ) VALUES ( NULL , 'MyComp', 'option=com_mycomp', '0', '0', 'option=com_mycomp', 'MyComp', 'com_mycomp', '0', '../administrator/components/com_mycomp/images/mycomp_x_icon.png', '0', '' );