(taking link out of admon box, seemed to kill the txt) |
|||
(15 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
This page explains how to set up a Zikula installation on your local system. You can use this for testing packages or other content before deployment. | This page explains how to set up a Zikula installation on your local system. You can use this for testing packages or other content before deployment. | ||
{{admon/note | Instructions updated for latest Zikula that runs only on PHP 5.3}} | |||
The Zikula package is being updated, in the meantime you can use the [http://koji.fedoraproject.org/koji/taskinfo?taskID=2017913 scratch build RPM]. | |||
== Package installation == | == Package installation == | ||
<ol><li>Switch user to the <code>root</code> account: | <ol> | ||
<li>Switch user to the <code>root</code> account: | |||
<pre>su -</pre> | <pre>su -</pre> | ||
Provide the system administrator password at the prompt.</li> | Provide the system administrator password at the prompt.</li> | ||
Line 11: | Line 15: | ||
<li>Install the Zikula package, the PHP mbstring package, and any other modules needed: | <li>Install the Zikula package, the PHP mbstring package, and any other modules needed: | ||
<pre>yum install zikula php-mbstring <zikula_module_pkg...></pre></li> | <pre>yum install zikula php-mbstring <zikula_module_pkg...></pre></li> | ||
The {{package|php-mbstring}} package is not strictly required but may be helpful for some content or modules. | The {{package|php-mbstring}} package is not strictly required but may be helpful for some content or modules. | ||
<li>Install the Zikula modules selection. As of | <li>Install the Zikula modules selection. As of December 2009, we use every packaged module on Fedora Insight. | ||
<pre>yum install zikula-module-*</pre></li> | <pre>yum install zikula-module-\*</pre></li> | ||
<li>Finish the installation of Scribite (the visual editor module) | <li>Finish the installation of Scribite (the visual editor module) | ||
<pre>yum install xinha | <pre>yum install xinha | ||
cd /usr/share/zikula/javascript | |||
mkdir scribite_editors | |||
cd scribite_editors | |||
ln -s /usr/share/js/xinha-0.96-0.1.b2 xinha</pre></li> | |||
</ol> | |||
< | |||
== System setup == | == System setup == | ||
Line 46: | Line 44: | ||
== Set up database == | == Set up database == | ||
<ol><li>If you have not already done so, set up the MySQL database server. First, provide a root password: | <ol><li>If you have not already done so, set up the MySQL database server. First, provide a root password: | ||
<pre>mysqladmin -u root password</pre> | <pre>mysqladmin -u root password $PASSWORD</pre> | ||
{{admon/warning | Do not use root account password | Do not provide the system administrator's password for your Linux system here. Use a different strong password, since this is a separate authentication for a MySQL user called "root."}}</li> | {{admon/warning | Do not use root account password | Do not provide the system administrator's password for your Linux system here. Use a different strong password, since this is a separate authentication for a MySQL user called "root."}}</li> | ||
<li>Create a database for Zikula: | <li>Create a database for Zikula: | ||
<pre>mysqladmin -u root -p create zikula</pre> | <pre>mysqladmin -u root -p create zikula</pre> | ||
{{admon/note | | |||
{{admon/note | Database creation | You will be prompted to enter the MySQL "root" password from the previous step. By installing the database here, you don't have to give your Zikula application the password for the MySQL "root" user.}}</li> | |||
<li>Grant rights for a zikula user on this database: | <li>Grant rights for a zikula user on this database: | ||
<pre>mysql -u root -p | |||
<pre> | |||
GRANT ALL PRIVILEGES ON zikula.* TO zikulaadmin@localhost IDENTIFIED BY ' | [root@publictest1 ~]# mysql -u root -p | ||
FLUSH PRIVILEGES; | Enter password: | ||
QUIT;</pre> | Welcome to the MySQL monitor. Commands end with ; or \g. | ||
The ''zikulaadmin'' account and the | Your MySQL connection id is 5 | ||
Server version: 5.1.41 Source distribution | |||
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. | |||
mysql> GRANT ALL PRIVILEGES ON zikula.* TO zikulaadmin@localhost IDENTIFIED BY 'ZIKULA_PASSWORD'; | |||
Query OK, 0 rows affected (0.00 sec) | |||
mysql> FLUSH PRIVILEGES; | |||
Query OK, 0 rows affected (0.00 sec) | |||
mysql> QUIT; | |||
Bye | |||
</pre> | |||
The ''zikulaadmin'' account and the ''ZIKULA_PASSWORD'' you used above are the ones you will use in Zikula's installation process shortly.</li></ol> | |||
== Zikula installation == | == Zikula installation == | ||
<ol><li> | |||
<ol><li>As root, make the Zikula configuration file writable by changing its SELinux context: | |||
<pre>chcon -t httpd_sys_content_t /etc/zikula/config.php</pre></li> | <pre>chcon -t httpd_sys_content_t /etc/zikula/config.php</pre></li> | ||
Line 85: | Line 101: | ||
Table prefix: zk | Table prefix: zk | ||
</pre> | </pre> | ||
Do ''not'' check the box for ''Create database'' | |||
Do ''not'' check the box for ''Create database'', because you have already created it! Click ''Next'' to proceed.</li> | |||
<li>For installation type, select ''Complete'', and then select ''Next'' to proceed.</li> | <li>For installation type, select ''Complete'', and then select ''Next'' to proceed.</li> | ||
<li>Now you will create a Zikula administrator account. This is the information that a user types into the Zikula | <li>Now you will create a Zikula administrator account. This is the information that a user types into the Zikula web interface to log in, and is separate and distinct from the database account you created earlier. Fill out the form, using a real email address (which you can change later), and select ''Next'' to proceed.</li> | ||
<li>The ''Tour'' module is an appropriate start page for now. Select ''Next'' to proceed.</li> | <li>The ''Tour'' module is an appropriate start page for now. Select ''Next'' to proceed.</li> | ||
Line 98: | Line 115: | ||
== Move install and update bits == | == Move install and update bits == | ||
'''FIXME -- this seems like a bug and a hack. What's actually going on here? Why is this necessary?''' | |||
* These directories contain scripts that are used to do an installation, but Zikula won't run if they remain accessible afterward because of the security risk. Not sure whether there's any way around that. --[[User:Pfrields|pfrields]] 21:31, 24 January 2010 (UTC) | |||
When you try to manage your Zikula sandbox, Zikula will complain unless you make the following changes, still using the <code>root</code> account: | When you try to manage your Zikula sandbox, Zikula will complain unless you make the following changes, still using the <code>root</code> account: | ||
Line 105: | Line 125: | ||
== Install AuthFAS for FAS Authentication == | == Install AuthFAS for FAS Authentication == | ||
AuthFAS | The purpose of the zikula AuthFAS module is to allow users to log into Zikula using their FAS credentials. If they have not logged in before, they will be registered on the Zikula system as default users. Any users in the cmsadmin group on FAS will automatically become administrators on any and every instance of Zikula. | ||
Install the following package (currently available in the infrastructure repository - if you are doing this on a publictest machine you should be able to just yum install it): | |||
zikula-module-fasauth | |||
Once the | Once the package is installed, the two plugins involved must be activated. First we will activate the AuthFAS module. | ||
# Log into your Zikula instance using the zikula administrative account. | |||
# Go to the administrative panel. Go to the "System" tab, then click the "Modules" module. | |||
# You will see a list of modules. Find the AuthFAS module. | |||
# Click the link to initialize the AuthFAS module. | |||
# Click the link to activate the AuthFAS module. | |||
Then we will activate the AuthPN module. | |||
# Still in the administrative panel, in the "System" tab and in the "Modules" module, find AuthPN in the list of modules. | |||
# Click the link to initialize the AuthPN module. | |||
# Click the link to activate the AuthPN module. | |||
We will next do some configuration of the AuthPN module. | |||
# Still looking at the AuthPN section in the administrative panel (in the "System" tab and in the "Modules" module), look for a text field called "AuthPN string." | |||
# Replace the current value of the text field with "AuthFAS,AuthPN" (without the quotes) and save the form. | |||
You may log out of zikula at this time. | |||
Finally, we will make a configuration file on the server. | |||
# ssh into the server zikula is installed on. | |||
# move modules/AuthFAS/config/personal_config.php to config/personal_config.php. | |||
# if this is a non-production instance, you are finished with this section. | |||
# if this is a production instance, edit the config/personal_config.php file to comment out the section for the debug version and comment in the section for the production version. | |||
Once you have completed these steps, installation of AuthFAS is complete and you should be able to login using your FAS username and password. | |||
{{admon/note | Keep a non-FAS admin account | We recommend keeping an administrator account which is not tied to the FAS system, so that should FAS go offline for any reason, the Zikula instance admin panel can still be accessed..}} | {{admon/note | Keep a non-FAS admin account | We recommend keeping an administrator account which is not tied to the FAS system, so that should FAS go offline for any reason, the Zikula instance admin panel can still be accessed..}} | ||
Line 115: | Line 167: | ||
{{admon/important | Congratulations, you're done! | Now you can log in to Zikula with the administrator account you just created, and start learning.}} | {{admon/important | Congratulations, you're done! | Now you can log in to Zikula with the administrator account you just created, and start learning.}} | ||
== Applying the Fedora Insight theme == | |||
'''This theme is known to have some problems. The instructions below describe how to activate the theme; the instructions will work and the theme will apply, but the theme will have visible bugs in it.''' | |||
To apply the Fedora Insight skin, install the package | |||
zikula-fedora-theme | |||
And then activate it with the following steps: | |||
# Log into zikula as an administrator. | |||
# Click on "Administration" > "Theme" | |||
# You will see a list of themes. There should be one called "Fedora" with a green checkbox in its "Options" column. Click the green checkbox. | |||
# You will see a dialog come up saying "This will set Fedora as the active theme for all users of your site!" Click the green checkbox again. | |||
The theme will be applied. | |||
== Fedora Insight specific modules == | == Fedora Insight specific modules == | ||
Line 137: | Line 206: | ||
zikula-fedora-theme | zikula-fedora-theme | ||
</pre> | </pre> | ||
The package is available on the Infra repos for use on publictest machines. The package for Fedora 11 and 12 can be found [https://fedorahosted.org/released/fedora-insight-theme here] | |||
== To take a publictest instance to live or staging == | |||
'''FIXME -- This documentation needs to be far more clear and step by step.''' | |||
<ol> | |||
<li>Take a dump of the publictest zikula database, and import it into a new database on your staging machine (instructions below) (if you do this, you do not need to run the install script below)</li> | |||
<li>Copy the contents of /usr/share/zikula/config/templates to your staging machine.</li> | |||
<li>Copy /usr/share/zikula/themes/fedora to your staging machine</li> | |||
<li>Visit the site in your browser (probably at /zikula) and check it's running ok. If it is, you need go no further in your setup. Importing a publictest instance skips most of the setup. | |||
<em>Note: all customisations should be stored either in the theme, or in the config directory. Excluding the installation of scribite, copying the contents of these directories and the database should be enough to replicate the publictest instance</em></li> | |||
</ol> | |||
[[Category:Zikula]] | [[Category:Zikula]] |
Latest revision as of 19:06, 27 February 2010
This page explains how to set up a Zikula installation on your local system. You can use this for testing packages or other content before deployment.
The Zikula package is being updated, in the meantime you can use the scratch build RPM.
Package installation
- Switch user to the
root
account:su -
Provide the system administrator password at the prompt. - If you have not already done so, install the Apache web and MySQL servers:
yum groupinstall 'Web Server' 'MySQL Database'
- Install the Zikula package, the PHP mbstring package, and any other modules needed:
yum install zikula php-mbstring <zikula_module_pkg...>
- Install the Zikula modules selection. As of December 2009, we use every packaged module on Fedora Insight.
yum install zikula-module-\*
- Finish the installation of Scribite (the visual editor module)
yum install xinha cd /usr/share/zikula/javascript mkdir scribite_editors cd scribite_editors ln -s /usr/share/js/xinha-0.96-0.1.b2 xinha
The php-mbstring
package is not strictly required but may be helpful for some content or modules.
System setup
- If you have not already done so, configure and start the services you just installed:
chkconfig httpd on chkconfig mysqld on service httpd start service mysqld start
- Make sure that the firewall allows traffic on port 80 (HTTP). Use system-config-firewall to perform this task if needed.
When you are finished, you should be able to open a Web browser, visit the URL http://localhost, and see the Fedora test page.
Set up database
- If you have not already done so, set up the MySQL database server. First, provide a root password:
mysqladmin -u root password $PASSWORD
- Create a database for Zikula:
mysqladmin -u root -p create zikula
- Grant rights for a zikula user on this database:
[root@publictest1 ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.1.41 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> GRANT ALL PRIVILEGES ON zikula.* TO zikulaadmin@localhost IDENTIFIED BY 'ZIKULA_PASSWORD'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> QUIT; Bye
The zikulaadmin account and the ZIKULA_PASSWORD you used above are the ones you will use in Zikula's installation process shortly.
Zikula installation
- As root, make the Zikula configuration file writable by changing its SELinux context:
chcon -t httpd_sys_content_t /etc/zikula/config.php
- Open a Web browser and point it at http://localhost/zikula (or the appropriate host name if you're running the Web browser on a different system).
- Click the link for the install script.
- Follow the prompts. First select the appropriate language (e.g. English) and select Next.
- Read and then accept the license by clicking the Accept license button.
- The checklist should be completed. Click the Next button to proceed.
- Use the following database information:
Database type: MySQL Table type: MyISAM Host: localhost Username: zikulaadmin Password: <password> Database name: zikula Table prefix: zk
Do not check the box for Create database, because you have already created it! Click Next to proceed. - For installation type, select Complete, and then select Next to proceed.
- Now you will create a Zikula administrator account. This is the information that a user types into the Zikula web interface to log in, and is separate and distinct from the database account you created earlier. Fill out the form, using a real email address (which you can change later), and select Next to proceed.
- The Tour module is an appropriate start page for now. Select Next to proceed.
- Select a theme and Next to proceed.
- Read the credits if desired, and then click the Go to your Zikula site link.
Move install and update bits
FIXME -- this seems like a bug and a hack. What's actually going on here? Why is this necessary?
- These directories contain scripts that are used to do an installation, but Zikula won't run if they remain accessible afterward because of the security risk. Not sure whether there's any way around that. --pfrields 21:31, 24 January 2010 (UTC)
When you try to manage your Zikula sandbox, Zikula will complain unless you make the following changes, still using the root
account:
cd /usr/share/zikula ls -d install* upgrade* | xargs -i mv '{}' '{}-orig' chmod 444 /etc/zikula/config.php
Install AuthFAS for FAS Authentication
The purpose of the zikula AuthFAS module is to allow users to log into Zikula using their FAS credentials. If they have not logged in before, they will be registered on the Zikula system as default users. Any users in the cmsadmin group on FAS will automatically become administrators on any and every instance of Zikula.
Install the following package (currently available in the infrastructure repository - if you are doing this on a publictest machine you should be able to just yum install it):
zikula-module-fasauth
Once the package is installed, the two plugins involved must be activated. First we will activate the AuthFAS module.
- Log into your Zikula instance using the zikula administrative account.
- Go to the administrative panel. Go to the "System" tab, then click the "Modules" module.
- You will see a list of modules. Find the AuthFAS module.
- Click the link to initialize the AuthFAS module.
- Click the link to activate the AuthFAS module.
Then we will activate the AuthPN module.
- Still in the administrative panel, in the "System" tab and in the "Modules" module, find AuthPN in the list of modules.
- Click the link to initialize the AuthPN module.
- Click the link to activate the AuthPN module.
We will next do some configuration of the AuthPN module.
- Still looking at the AuthPN section in the administrative panel (in the "System" tab and in the "Modules" module), look for a text field called "AuthPN string."
- Replace the current value of the text field with "AuthFAS,AuthPN" (without the quotes) and save the form.
You may log out of zikula at this time.
Finally, we will make a configuration file on the server.
- ssh into the server zikula is installed on.
- move modules/AuthFAS/config/personal_config.php to config/personal_config.php.
- if this is a non-production instance, you are finished with this section.
- if this is a production instance, edit the config/personal_config.php file to comment out the section for the debug version and comment in the section for the production version.
Once you have completed these steps, installation of AuthFAS is complete and you should be able to login using your FAS username and password.
Short URLs System
To get the fancy directory based URL scheme (such as http://www.example.com/News/2009/06/03/my_cool_article.htm) you will need some directives in either a .htaccess placed in the root directory of your Zikula instance, or alternatively the same ruleset added to your Apache .conf file. Short URLs can then be switched on through the administration interface. Click the 'System' tab, then the 'Settings' tab.
Applying the Fedora Insight theme
This theme is known to have some problems. The instructions below describe how to activate the theme; the instructions will work and the theme will apply, but the theme will have visible bugs in it.
To apply the Fedora Insight skin, install the package
zikula-fedora-theme
And then activate it with the following steps:
- Log into zikula as an administrator.
- Click on "Administration" > "Theme"
- You will see a list of themes. There should be one called "Fedora" with a green checkbox in its "Options" column. Click the green checkbox.
- You will see a dialog come up saying "This will set Fedora as the active theme for all users of your site!" Click the green checkbox again.
The theme will be applied.
Fedora Insight specific modules
To set up a Fedora Insight specific instance, you'll need the following packages (some of which are already detailed in the list above).
These are in repos.
zikula-module-crpTag-0.1.3-3.el5 zikula-module-fedora-fasauth-0.2-2.el5 zikula-1.1.2-3.el5 zikula-module-News zikula-module-pagemaster ziula-module-filterutil zikula-module-EZComments zikula-module-scribite xinha
You'll also need this package for the theme.
zikula-fedora-theme
The package is available on the Infra repos for use on publictest machines. The package for Fedora 11 and 12 can be found here
To take a publictest instance to live or staging
FIXME -- This documentation needs to be far more clear and step by step.
- Take a dump of the publictest zikula database, and import it into a new database on your staging machine (instructions below) (if you do this, you do not need to run the install script below)
- Copy the contents of /usr/share/zikula/config/templates to your staging machine.
- Copy /usr/share/zikula/themes/fedora to your staging machine
- Visit the site in your browser (probably at /zikula) and check it's running ok. If it is, you need go no further in your setup. Importing a publictest instance skips most of the setup. Note: all customisations should be stored either in the theme, or in the config directory. Excluding the installation of scribite, copying the contents of these directories and the database should be enough to replicate the publictest instance