From Fedora Project Wiki

No edit summary
Line 41: Line 41:
== 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 | Manual vs. automatic | By installing the database here, you don't have to give your Zikula application the password for the MySQL "root" user.}}</li>
 
{{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
 
<Enter password for MySQL "root" account>
<pre>
GRANT ALL PRIVILEGES ON zikula.* TO zikulaadmin@localhost IDENTIFIED BY 'new_password_here';
[root@publictest1 ~]# mysql -u root -p
FLUSH PRIVILEGES;
Enter password:
QUIT;</pre></li>
Welcome to the MySQL monitor.  Commands end with ; or \g.
The ''zikulaadmin'' account and the new password you used above are the ones you will use in Zikula's installation process shortly.</li></ol>
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 ==

Revision as of 22:43, 19 January 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.

Package installation

  1. Switch user to the root account:
    su -
    Provide the system administrator password at the prompt.
  2. If you have not already done so, install the Apache web and MySQL servers:
    yum groupinstall 'Web Server' 'MySQL Database'
  3. Install the Zikula package, the PHP mbstring package, and any other modules needed:
    yum install zikula php-mbstring <zikula_module_pkg...>
  4. The php-mbstring package is not strictly required but may be helpful for some content or modules.

  5. Install the Zikula modules selection. As of December 2009, we use every packaged module on Fedora Insight.
    yum install zikula-module-*
  6. 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

System setup

  1. 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
  2. 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.

Pre-existing Apache server
If you didn't follow the steps above, because you already have a working Web server, you may need to run service httpd reload for the Zikula configuration file to be loaded by Apache.

Set up database

  1. If you have not already done so, set up the MySQL database server. First, provide a root password:
    mysqladmin -u root password $PASSWORD
    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."
  2. Create a database for Zikula:
    mysqladmin -u root -p create zikula
    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.
  3. 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

  1. Make the Zikula configuration file writable by changing its SELinux context:
    chcon -t httpd_sys_content_t /etc/zikula/config.php
  2. 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).
  3. Click the link for the install script.
  4. Follow the prompts. First select the appropriate language (e.g. English) and select Next.
  5. Read and then accept the license by clicking the Accept license button.
  6. The checklist should be completed. Click the Next button to proceed.
  7. 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. Click Next to proceed.
  8. For installation type, select Complete, and then select Next to proceed.
  9. 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.
  10. The Tour module is an appropriate start page for now. Select Next to proceed.
  11. Select a theme and Next to proceed.
  12. Read the credits if desired, and then click the Go to your Zikula site link.

Move install and update bits

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

AuthFAS allows 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. zikula-module-fasauth is in the infrastructure repository (precise instructions on how to install AuthFAS are to follow).

Once the files are installed, there are three further changes to make. First, log into your Zikula instance, and find the 'Modules' module (in the 'System' tab of the admin panel). In the resulting list, find, initialize and activate the AuthFAS module. Next, find the 'AuthPN' module (usually in the same tab of the admin panel). Here, replace the current 'AuthPN' string with 'AuthFAS,AuthPN' (without the quotes) and save the form. Lastly, move modules/AuthFAS/config/personal_config.php to config/personal_config.php. This file contains the URL string to use for FAS - there are two possible settings, one for debug and one for production. If you are reading this, you probably want the debug version, which is the default. Once you have completed these steps, installation of AuthFAS is complete and you should be able to login using your FAS username and password.

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..

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.

Congratulations, you're done!
Now you can log in to Zikula with the administrator account you just created, and start learning.

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.

  1. 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)
  2. Copy the contents of /usr/share/zikula/config/templates to your staging machine.
  3. Copy /usr/share/zikula/themes/fedora to your staging machine
  4. 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