Difference between revisions of "KBPublisher Install"

From GWAVA Technologies Training
Jump to: navigation, search
(apache)
(Set up Directory Structure)
 
(37 intermediate revisions by 2 users not shown)
Line 11: Line 11:
  
 
This howto [https://www.howtoforge.com/linux_knowledgebasepublisher] might be handy.
 
This howto [https://www.howtoforge.com/linux_knowledgebasepublisher] might be handy.
 +
 +
Where apache keeps things [http://wiki.apache.org/httpd/DistrosDefaultLayout#openSUSE_and_SLES_.28Apache_httpd_2.2.29:]
  
 
==mysql==
 
==mysql==
Line 28: Line 30:
 
Install apache2 and php5 package via YaST accept that apache2 and apache2-prefork must be installed.
 
Install apache2 and php5 package via YaST accept that apache2 and apache2-prefork must be installed.
  
 +
Start on boot
  
 +
===apache locations===
 +
openSUSE and SLES (Apache httpd 2.2): [http://wiki.apache.org/httpd/DistrosDefaultLayout#openSUSE_and_SLES_.28Apache_httpd_2.2.29:]
  
 +
Document root: “/srv/www/htdocs”
 +
directory:    “/srv/www/htdocs”
 +
alias        “/icons/”, “/usr/share/apache2/icons/”
 +
directory:    “/usr/share/apache2/icons”
 +
ScriptAlias:    /cgi-bin/ “srv/www/cgi-bin/”
 +
Directory    “srv/www/cgi-bin”
 +
mod_userdir.c
 +
Include        /etc/apache2/conf.d/*.conf
 +
include        /etc/apache2/conf.d/apache2-manual?conf
 +
Server Name    kbptest
 +
Server Admin main    root@kbptest
  
 +
===apache commands===
 
  rcapache2 start|stop|status
 
  rcapache2 start|stop|status
  
Line 46: Line 63:
 
==php==
 
==php==
  
enable php [https://en.opensuse.org/SDB:Linux_Apache_MySQL_PHP#Start]
+
enable php by installing it from YaST/Software Management
In case the browser wants to save your php files instead of displaying the content, you should enable php support in the /etc/apache2/mod_userdir.conf file. Add the following line to it, just after the <Directory /home/*/public_html> line and restart the server.
+
 
 +
Include PHP5 core files and apache module, but I'm installing everything just to be sure.
 +
 
 +
command line test:
 +
 
 +
php -r 'phpinfo();'
 +
 
 +
I get this far easily. Maybe this will help.
 +
 
 +
===test php file for browser===
 +
test php (info.php) which will post info about the php version installed.
 +
<code>
 +
 
 +
<?php
 +
  phpinfo();
 +
?>
 +
</code>
 +
 
 +
Browser wants to download instead of show the page.
 +
 
 +
"In case the browser wants to save your php files instead of displaying the content, you should enable php support in the '''/etc/apache2/mod_userdir.conf''' file. Add the following line to it, just after the <'''Directory /home/*/public_html'''> line and restart the server." [https://en.opensuse.org/SDB:Linux_Apache_MySQL_PHP#Confirming_PHP_works]
  
 
  <code>Include /etc/apache2/conf.d/php5.conf</code>
 
  <code>Include /etc/apache2/conf.d/php5.conf</code>
  
 +
Success! info.php loads in the browser, of course apache needed restarting at each step.
 +
 +
----
 +
 +
====research items====
 +
<strike>
 +
Maybe more needs to be done.
 
Add the following line to /etc/apache2/sysconfig.d/loadmodule.conf  [https://forums.opensuse.org/showthread.php/453702-How-do-I-start-PHP]
 
Add the following line to /etc/apache2/sysconfig.d/loadmodule.conf  [https://forums.opensuse.org/showthread.php/453702-How-do-I-start-PHP]
  
Line 72: Line 116:
 
  </IfModule>
 
  </IfModule>
 
</code>
 
</code>
 +
</strike>
  
===test php===
+
==download KnowledgebasePublisher==
test php (info.php) which will post info about the php version installed.
+
Download page [http://sourceforge.net/projects/kbpublisher/]
<code>
+
  
  <?php
+
==download CKEditor==
   phpinfo();
+
Download page [http://ckeditor.com/]
  ?>
+
 
</code>
+
==Set up Directory Structure==
 +
 
 +
On SLES the web directory is under /srv/www
 +
Create directories as below
 +
 
 +
  <nowiki> 
 +
/srv/www/
 +
- kb_file/                (for uploads via "Files" module)
 +
- htdocs/                (document root)
 +
   |- kb/
 +
  |- kb_upload/            (for uploads via FCK Editor)  
 +
</nowiki>
 +
 
 +
Copy ../kbp_204/kbp_204/* to /srv/www/htdocs/kb
 +
 
 +
Give your "kb/admin/cache", "kb_upload" and "kb_file" directory full write permissions.
 +
  In unix you can type "chmod 777 cache".
 +
 
 +
==Set up database==
 +
 
 +
Create an empty MySQL database to be used by KnowledgebasePublisher
 +
 
 +
Create tables using db dump file at kb/install/db_install.sql
 +
  To upgrade:
 +
    Use DB dump file kb/install/db_upgrade_[version].sql
 +
    Read instructions in file.
 +
    Do not forget to backup old DB.
 +
 
 +
*download Mysql 5.5 since that is what we use for Retain
 +
 
 +
*install the rpms for server and client
 +
 
 +
*set the password: /usr/bin/mysqladmin -u root password ‘<password>’
 +
 
 +
*set datadir:  mysql_install_db --datadir=/srv/www/htdocs/kb
 +
 
 +
*log into mysql: mysql -u root -p
 +
 
 +
*create database: CREATE DATABASE kbp DEFAULT CHARACTER SET 'utf8' DEFAULT COLLATE 'utf8_bin’;
 +
 
 +
*create kbp mysql user:
 +
 
 +
  GRANT ALL PRIVILEGES ON kbp.* TO 'kbpadmin'@'%' IDENTIFIED BY '<password>';
 +
GRANT ALL PRIVILEGES ON kbp.* TO 'kbpadmin'@'localhost' IDENTIFIED BY '<password>';
 +
 
 +
*load dump file: 
 +
 
 +
go to /srv/www/htdocs/kb/install_upgrade and load db_install.sql
 +
 
 +
mysql -u root --password=<password> kbp< db_install.sql
 +
go into mysql:
 +
use kbp;
 +
show tables;
 +
 
 +
make sure there are new tables there.
 +
<nowiki>
 +
+--------------------------+
 +
| Tables_in_kbp            |
 +
+--------------------------+
 +
| s_data_to_user_rule      |
 +
| s_data_to_user_value    |
 +
| s_feedback              |
 +
| s_file_category          |
 +
| s_file_entry            |
 +
| s_file_entry_to_category |
 +
| s_kb_attachment_to_entry |
 +
| s_kb_category            |
 +
| s_kb_comment            |
 +
| s_kb_entry              |
 +
| s_kb_entry_to_category  |
 +
| s_kb_glossary            |
 +
| s_kb_rating              |
 +
| s_kb_related_to_entry    |
 +
| s_letter_template        |
 +
| s_member                |
 +
| s_priv                  |
 +
| s_priv_module            |
 +
| s_priv_name              |
 +
| s_priv_rule              |
 +
| s_role                  |
 +
| s_setting                |
 +
| s_setting_input          |
 +
| s_setting_to_value      |
 +
| s_user                  |
 +
+--------------------------+
 +
</nowiki>
 +
 
 +
==Configure KBP files==
 +
Configure your "kb/admin/config.inc.php" configuration file
 +
 
 +
Set db_base, db_user, db_pass to values created above.
 +
 
 +
Configure your "kb/index.php" and "kb/rss.php" files if required. Normally it should work without modifications.
 +
 
 +
==Browse to KBP==
 +
 
 +
Main page
 +
http://localhost/kb/
 +
 
 +
Admin page
 +
http://localhost/kb/admin
 +
Login: admin
 +
Password: demo
 +
  DO NOT FORGET TO CHANGE IT!
 +
 
 +
==editor location==
 +
 
 +
/srv/www/htdocs/kb/admin/tools/ckeditor
 +
 
 +
----
  
Install MySQL for SLES11 64-bit
+
----
  
 
==notes gleaned from previous attempt==
 
==notes gleaned from previous attempt==
Line 187: Line 340:
 
  show tables;
 
  show tables;
 
  make sure there are new tables there.
 
  make sure there are new tables there.
 +
 +
5A install with wizard [http://www.kbpublisher.com/kb/installing-kbpublisher_115.html]
  
 
5. edit "kb/admin/config.inc.php"
 
5. edit "kb/admin/config.inc.php"
Line 203: Line 358:
 
  reverting snapshot
 
  reverting snapshot
 
  installing apache2 with php5, perl and python, probably only need php5 but let’s not play with that right now.  
 
  installing apache2 with php5, perl and python, probably only need php5 but let’s not play with that right now.  
 
 
  
 
back to kbp
 
back to kbp
Line 218: Line 371:
 
http://download.opensuse.org/repositories/server:/php/SLE_11/
 
http://download.opensuse.org/repositories/server:/php/SLE_11/
  
mysql> show tables;
+
mysql> show tables;
 +
 
  
-
 
 
  Why won’t php work?
 
  Why won’t php work?
 
  out of time, rebuild tomorrow.
 
  out of time, rebuild tomorrow.
-
+
 
 
Spinning up another VM for kbp with a different version of SLES 11.2 with the most recent date. Hopefully that will work better.  
 
Spinning up another VM for kbp with a different version of SLES 11.2 with the most recent date. Hopefully that will work better.  
 
kbp just seems to need LAMP, but PHP needs to work then I can get MySQL installed.  
 
kbp just seems to need LAMP, but PHP needs to work then I can get MySQL installed.  
-
+
 
 +
 
 +
==html samples==
 +
 
 
a simple html page: (index.html)
 
a simple html page: (index.html)
<HTML>
+
 
<HEAD>
+
<code>
<TITLE>Your Title Here</TITLE>
+
<HTML>
</HEAD>
+
<HEAD>
<BODY BGCOLOR="FFFFFF">
+
<TITLE>Your Title Here</TITLE>
<CENTER><IMG SRC="clouds.jpg" ALIGN="BOTTOM"> </CENTER>
+
</HEAD>
<HR>
+
<BODY BGCOLOR="FFFFFF">
<a href="http://somegreatsite.com">Link Name</a>
+
<CENTER><IMG SRC="clouds.jpg" ALIGN="BOTTOM"> </CENTER>
is a link to another nifty site
+
<HR>
<H1>This is a Header</H1>
+
<a href="http://somegreatsite.com">Link Name</a>
<H2>This is a Medium Header</H2>
+
is a link to another nifty site
Send me mail at <a href="mailto:support@yourcompany.com">
+
<H1>This is a Header</H1>
support@yourcompany.com</a>.
+
<H2>This is a Medium Header</H2>
<P> This is a new paragraph!
+
Send me mail at <a href="mailto:support@yourcompany.com">
<P> <B>This is a new paragraph!</B>
+
support@yourcompany.com</a>.
<BR> <B><I>This is a new sentence without a paragraph break, in bold italics.</I></B>
+
<P> This is a new paragraph!
<HR>
+
<P> <B>This is a new paragraph!</B>
</BODY>
+
<BR> <B><I>This is a new sentence without a paragraph break, in bold italics.</I></B>
</HTML>
+
<HR>
-
+
</BODY>
 +
</HTML>
 +
</code>
 +
 
 +
 
 
Even simpler: (index.html)
 
Even simpler: (index.html)
<HTML>
+
 
<BODY>
+
<code>
Working!
+
<HTML>
</BODY>
+
<BODY>
</HTML>
+
Working!
-
+
</BODY>
 +
</HTML>
 +
</code>
 +
 
 +
 
 
for testing php (index.html)
 
for testing php (index.html)
<html>
+
 
<head>
+
<code>
<title>PHP Test</title>
+
<html>
</head>
+
<head>
<body>
+
<title>PHP Test</title>
<?php phpinfo(); ?>
+
</head>
</body>
+
<body>
</html>
+
<?php phpinfo(); ?>
-
+
</body>
 +
</html>
 +
</code>
 +
 
 
just php (info.php) which will post info about the php version installed.
 
just php (info.php) which will post info about the php version installed.
<?php
+
 
 +
<code>
 +
<?php
 
  phpinfo();
 
  phpinfo();
?>
+
?>
-
+
</code>
 +
 
 
kbp prerequisites are Apache/PHP and MySQL,
 
kbp prerequisites are Apache/PHP and MySQL,
So before installing vmtools install php since the disk is in place.  
+
So before installing vmtools install php since the disk is in place.
-
+

Latest revision as of 15:47, 11 June 2015

currently using 2.0.1

Contents

[edit] Install notes

Notes for installing kbpublisher as I try to upgrade the editor:

Get the installer from sourceforge [1]

Get CKEditor the improved FKEditor [2]

This howto [3] might be handy.

Where apache keeps things [4]

[edit] mysql

Install from YaST for now.

  • mysql
  • mysql-client
  • mysql-tools
  • php53-mysql

accept all the automatic additions.

rcmysql start|stop|restart|status

[edit] apache

Install apache2 and php5 package via YaST accept that apache2 and apache2-prefork must be installed.

Start on boot

[edit] apache locations

openSUSE and SLES (Apache httpd 2.2): [5]

Document root: “/srv/www/htdocs”
directory:     “/srv/www/htdocs”
alias         “/icons/”, “/usr/share/apache2/icons/”
directory:     “/usr/share/apache2/icons”
ScriptAlias:    /cgi-bin/ “srv/www/cgi-bin/”
Directory    “srv/www/cgi-bin”
mod_userdir.c
Include        /etc/apache2/conf.d/*.conf
include        /etc/apache2/conf.d/apache2-manual?conf
Server Name    kbptest
Server Admin main    root@kbptest

[edit] apache commands

rcapache2 start|stop|status

create index.html file in “/srv/www/htdocs”

<HTML>
<BODY>
HTML Working!
</BODY>
</HTML>

Make sure that php is installed and the module is toggled on in YaST

[edit] php

enable php by installing it from YaST/Software Management

Include PHP5 core files and apache module, but I'm installing everything just to be sure.

command line test:

php -r 'phpinfo();'

I get this far easily. Maybe this will help.

[edit] test php file for browser

test php (info.php) which will post info about the php version installed.

<?php
 phpinfo();
?>

Browser wants to download instead of show the page.

"In case the browser wants to save your php files instead of displaying the content, you should enable php support in the /etc/apache2/mod_userdir.conf file. Add the following line to it, just after the <Directory /home/*/public_html> line and restart the server." [6]

Include /etc/apache2/conf.d/php5.conf

Success! info.php loads in the browser, of course apache needed restarting at each step.


[edit] research items

Maybe more needs to be done. Add the following line to /etc/apache2/sysconfig.d/loadmodule.conf [7]

LoadModule php5_module /usr/lib/apache2/mod_php5.so

Create /etc/apache2/conf.d/php5.conf

<IfModule mod_php5.c>
       AddHandler application/x-httpd-php .php4
       AddHandler application/x-httpd-php .php5
       AddHandler application/x-httpd-php .php
       AddHandler application/x-httpd-php-source .php4s
       AddHandler application/x-httpd-php-source .php5s
       AddHandler application/x-httpd-php-source .phps
       DirectoryIndex index.php4
       DirectoryIndex index.php5
       DirectoryIndex index.php
</IfModule>

[edit] download KnowledgebasePublisher

Download page [8]

[edit] download CKEditor

Download page [9]

[edit] Set up Directory Structure

On SLES the web directory is under /srv/www Create directories as below

  
 /srv/www/
 - kb_file/                (for uploads via "Files" module)
 - htdocs/                 (document root)
  |- kb/
  |- kb_upload/            (for uploads via FCK Editor)    	 

Copy ../kbp_204/kbp_204/* to /srv/www/htdocs/kb

Give your "kb/admin/cache", "kb_upload" and "kb_file" directory full write permissions.

  In unix you can type "chmod 777 cache".

[edit] Set up database

Create an empty MySQL database to be used by KnowledgebasePublisher

Create tables using db dump file at kb/install/db_install.sql

  To upgrade:
    Use DB dump file kb/install/db_upgrade_[version].sql
    Read instructions in file.
    Do not forget to backup old DB.
  • download Mysql 5.5 since that is what we use for Retain
  • install the rpms for server and client
  • set the password: /usr/bin/mysqladmin -u root password ‘<password>’
  • set datadir: mysql_install_db --datadir=/srv/www/htdocs/kb
  • log into mysql: mysql -u root -p
  • create database: CREATE DATABASE kbp DEFAULT CHARACTER SET 'utf8' DEFAULT COLLATE 'utf8_bin’;
  • create kbp mysql user:
GRANT ALL PRIVILEGES ON kbp.* TO 'kbpadmin'@'%' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON kbp.* TO 'kbpadmin'@'localhost' IDENTIFIED BY '<password>';
  • load dump file:

go to /srv/www/htdocs/kb/install_upgrade and load db_install.sql

mysql -u root --password=<password> kbp< db_install.sql
go into mysql: 
use kbp;
show tables;

make sure there are new tables there.

 +--------------------------+
 | Tables_in_kbp            |
 +--------------------------+
 | s_data_to_user_rule      |
 | s_data_to_user_value     |
 | s_feedback               |
 | s_file_category          |
 | s_file_entry             |
 | s_file_entry_to_category |
 | s_kb_attachment_to_entry |
 | s_kb_category            |
 | s_kb_comment             |
 | s_kb_entry               |
 | s_kb_entry_to_category   |
 | s_kb_glossary            |
 | s_kb_rating              |
 | s_kb_related_to_entry    |
 | s_letter_template        |
 | s_member                 |
 | s_priv                   |
 | s_priv_module            |
 | s_priv_name              |
 | s_priv_rule              |
 | s_role                   |
 | s_setting                |
 | s_setting_input          |
 | s_setting_to_value       |
 | s_user                   |
 +--------------------------+

[edit] Configure KBP files

Configure your "kb/admin/config.inc.php" configuration file

Set db_base, db_user, db_pass to values created above.

Configure your "kb/index.php" and "kb/rss.php" files if required. Normally it should work without modifications.

[edit] Browse to KBP

Main page

http://localhost/kb/

Admin page

http://localhost/kb/admin
Login: admin
Password: demo
  DO NOT FORGET TO CHANGE IT!

[edit] editor location

/srv/www/htdocs/kb/admin/tools/ckeditor



[edit] notes gleaned from previous attempt

got the vm OS up now to figure out how to install kbp: Installation Steps:

1. Unpack distribution package

2. Place it somewhere in your web-server's document root,

  preferably(recommended) the parent directory of your root web directory.
   
  Create directory to store attachments files
  We recommend to name it kb_file and place it somewhere outside
  your document root directory. It should not be accessible via http (web browser)
  
  The structure of directories should look like this:
     
  - kb_file                (for uploads via "Files" module)
  - public_html            (document root)
    |- kb
    |- kb_upload           (for uploads via FCK Editor)        
     
  

3. Create an empty MySQL database to be used by KnowledgebasePublisher

3. Create tables using db dump file at kb/install/db_install.sql

  To upgrade:
    Use DB dump file kb/install/db_upgrade_[version].sql
    Read instructions in file.
    Do not forget to backup old DB.
  

5. Configure your "kb/admin/config.inc.php" configuration file

6. Configure your "kb/index.php" and "kb/rss.php" files if required

  Normaly it should work without modifications.

7. Give your "kb/admin/cache", "kb_upload" and "kb_file" directory full write permissions.

  In unix you can type "chmod 777 cache". On Windows you must go through
  your webserver to give it write permissions

8. You're done. End user screen will be available at www.your_site.com/kb/

  Admin area will be available at www.your_site.com/kb/admin/
  Login: admin
  Password: demo
  DO NOT FORGET TO CHANGE IT!
  

9. Go to "Settings" tab to configure settings

  Make sure you set correct email address at Setting -> Email
  

10. Read FAQ file

11. Enjoy

--- 1 had to unzip the package to get to the instructions

2a. need to install http server/apache2 go into yast to do that, mount the os install disk, enable php5

ah useful list
Document root: “/srv/www/htdocs”
directory:     “/srv/www/htdocs”
alias         “/icons/”, “/usr/share/apache2/icons/”
directory:     “/usr/share/apache2/icons”
ScriptAlias:    /cgi-bin/ “srv/www/cgi-bin/”
Directory    “srv/www/cgi-bin”
mod_userdir.c
Include        /etc/apache2/conf.d/*.conf
include        /etc/apache2/conf.d/apache2-manual?conf
Server Name    kbptest
Server Admin main    root@kbptest
no virtual hosts

Start Apache2 Server when booting

2b. moving kbp_204 to /srv/www/htdocs/kbp_204

2c. creating /srv/www/kb_file

2d. creating /srv/www/htdocs/kb_upload

3a. download Mysql 5.5 since that is what we use for Retain

3b install the rpms for server and client

3c set the password: /usr/bin/mysqladmin -u root password ‘gwava’

3d set datadir: mysql_install_db --datadir=/srv/www/htdocs/kbp_204

3e: log into mysql: mysql -u root -p

3f: create database: CREATE DATABASE kbp DEFAULT CHARACTER SET 'utf8' DEFAULT COLLATE 'utf8_bin’;

3g: create kbp mysql user:

GRANT ALL PRIVILEGES ON kbp.* TO 'kbpadmin'@'%' IDENTIFIED BY 'gwava';
GRANT ALL PRIVILEGES ON kbp.* TO 'kbpadmin'@'localhost' IDENTIFIED BY 'gwava';

4a: load dump file: mysql -h hostname -u user --password=password databasename < filename

go to /srv/www/htdocs/kbp_204/kbp_204/install_upgrade and load db_install.sql
mysql -h hostname -u user --password=password kbp< db_install.sql
go into mysql: 
use kbp;
show tables;
make sure there are new tables there.

5A install with wizard [10]

5. edit "kb/admin/config.inc.php"

makes changes to match with above, (the docs could be so much better)
assuming htdocs/ is document root. only mostly sure about that. 
adding kb_extras/

6. skipping for now

7. chmoding all those places

8: localhost/kb/ = object not found.

sigh
needs php, won’t load. 
reverting snapshot
installing apache2 with php5, perl and python, probably only need php5 but let’s not play with that right now. 

back to kbp

starting over, I just need to get it to work.

https://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-onopensuse-12.3-lamp

php5 needs mysql first

but first I need to add a repository

http://download.opensuse.org/repositories/server:/php/SLE_11/

mysql> show tables;


Why won’t php work?
out of time, rebuild tomorrow.

Spinning up another VM for kbp with a different version of SLES 11.2 with the most recent date. Hopefully that will work better. kbp just seems to need LAMP, but PHP needs to work then I can get MySQL installed.


[edit] html samples

a simple html page: (index.html)

<HTML>
<HEAD>
<TITLE>Your Title Here</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<IMG SRC="clouds.jpg" ALIGN="BOTTOM">

<a href="http://somegreatsite.com">Link Name</a>
is a link to another nifty site

This is a Header

This is a Medium Header

Send me mail at <a href="mailto:support@yourcompany.com">
support@yourcompany.com</a>.

This is a new paragraph! <P> This is a new paragraph!
This is a new sentence without a paragraph break, in bold italics.


</BODY>
</HTML>

</code>


Even simpler: (index.html)

<code>

<HTML>
<BODY>
Working!
</BODY>
</HTML>

</code>


for testing php (index.html)

<code>

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>

</code>

just php (info.php) which will post info about the php version installed.

<code>

<?php
phpinfo();
?>

</code>

kbp prerequisites are Apache/PHP and MySQL,

So before installing vmtools install php since the disk is in place.

Personal tools
Namespaces

Variants
Actions
Home
Exchange
GroupWise
JAVA
Linux
MTK
Retain
GW Monitoring and Reporting (Redline)
GW Disaster Recovery (Reload)
GW Forensics (Reveal)
GWAVA
Secure Messaging Gateway
GW Mailbox Management (Vertigo)
Windows
Other
User Experience
Toolbox
Languages
Toolbox