Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: loveless on March 23, 2004, 11:35:38 PM

Title: Geeklog RPM
Post by: loveless on March 23, 2004, 11:35:38 PM
Several of the people I work with have difficulty getting geeklog installed correctly on their SME Server.

So, I packaged Geeklog 1.3.9 in an rpm to make it easier to install.

http://tech-geeks.org/contrib/loveless/SMEServer/contribs/geeklog/

Will move out to the mirrors tonight.

I've tested on v5.6 and 6.0.1.

Feedback to abe_AT_lovelesscentral.org.

Thanks,
Abe
Title: Geeklog RPM
Post by: BlueSky on March 24, 2004, 01:52:18 PM
Thank you Abe for your efforts. I tried to install the rpm and followed the
instructions. However, I receive the following error:

"error selecting database"

when I proceed to the final step of the installation (after step 2 of 2)
when I click on Next. I have checked the mysql database using DBManager. It
shows that I do have a database with the name "Geeklog". I also have a
username "geeklog" with the same password. I just wonder what went wrong?

Thanks again,
Title: geeklog db
Post by: loveless on March 24, 2004, 08:17:05 PM
Hmm... let's verify that the geeklog user has access to the geeklog db, by resetting the permissions.

(From MD's mysql cheatsheet: http://tech-geeks.org/contrib/mdrone/mysql-cheatsheet.html)

login to console as root:

#> mysql
#mysql> grant all on geeklog.* to geeklog@localhost identified by 'geeklog';

#mysql> quit;


Now, check the config.php file.

#> pico -w /opt/geeklog-1.3.9/config.php

Section 1 has db settings.  You should have these:

$_DB_host = 'localhost';  // host name or IP address of your DB server
$_DB_name = 'geeklog';    // name of your database,
                          // must exist before running the installer!
$_DB_user = 'geeklog';    // MySQL user name
$_DB_pass = 'geeklog';    // MySQL password


Let me know if that works.

Thanks,
Abe
Title: Geeklog RPM
Post by: BlueSky on March 25, 2004, 06:54:49 AM
Thank you Abe. That was the trick that I need. It is working now, and I'm loving it.
Take care,
Title: Geeklog RPM
Post by: byte on March 25, 2004, 02:33:27 PM
Abe,

I can also confirm that this rpm works on my sme 6.0.1-01 "takeoff".

Keep up good work, your contribs are valued :-D and have a  :pint: on me

Cheers
Title: Geeklog RPM
Post by: ldavies on April 18, 2004, 07:21:49 AM
I also got the same problem with the username not existing in mysql but fixed it with the above.  Apart from that it was great.  Thanks Abe.

I do however have a few questions:  

1) When I go to www.mydomainname.com I get a blank page.  How can I redirect all traffic to www.mydomainname.com/geeklog without the user being aware of it?

2) Why not put all the public_html files into /home/e-smith/files/primary/html/?

3) Does that not make it a safer install from a security perspective?  Don't geeklog recommend splitting the public_html directory from the rest?

I'd appreciate your perspective and thinking behind the way you did it.

Thanks,
Title: Geeklog RPM
Post by: ldavies on April 18, 2004, 09:16:24 AM
A fourth question for Abe or anyone else that knows:

4) How does it know to go to opt/geeklog-1.3.9/public_html/index.php when you enter http://www.mydomainname/com/geeklog as the browser address?

Thanks
Title: Geeklog RPM
Post by: wellsi on April 18, 2004, 11:03:16 PM
Quote from: "ldavies"
A fourth question for Abe or anyone else that knows:

4) How does it know to go to opt/geeklog-1.3.9/public_html/index.php when you enter http://www.mydomainname/com/geeklog as the browser address?

Thanks


Hopefully this will answer all of 1-4.

# grep -n geeklog /etc/httpd/conf/httpd.conf
974:Alias /geeklog /opt/geeklog-1.3.9/public_html/
976:<Directory /opt/geeklog-1.3.9/public_html>

-- so looking in httpd.conf at those lines --
#----------------------------------------------------------
# Geeklog 1.3.9
#----------------------------------------------------------

Alias /geeklog /opt/geeklog-1.3.9/public_html/

<Directory /opt/geeklog-1.3.9/public_html>
AddType application/x-httpd-php .php .php3 .phtml
Options Indexes +Includes FollowSymLinks
order deny,allow
deny from all
allow from all
</Directory>

#---------------------------------------------------------
# end of Geeklog 1.3.9
#---------------------------------------------------------

You can see that Abe has provided an alias from
http://'yourdomain'/geeklog/ to the actual files at /opt/geeklog-1.3.9/public_html/
Title: Geeklog RPM
Post by: wellsi on April 19, 2004, 01:33:53 AM
Here is a (hopefully correct) answer to the question 3) which was also asked in:
http://forums.contribs.org/index.php?topic=21973.msg86998#msg86998

The geeklog website says
Quote
The other part of Geeklog, which is everything outside the public_html directory, should not be accessible via a URL since it contains sensitive information.


The Geeklog contrib from Abe has the following httpd alias
Code: [Select]

Alias /geeklog /opt/geeklog-1.3.9/public_html/


Note that this only makes the "public_html" directory visible. All of the rest is hidden - just as recommended.

You can try this out by a simple test. In the public_html directory there is a file calendar.php which we should be able to get to. In the main geeklog directory /opt/geeklog-1.3.9 there is a readme file that should not be visible.

so the following should work
http://testserver/geeklog/calendar.php

And the following won't - experiment with variations of this.

http://testserver/geeklog/readme

http://testserver/geeklog/../readme
http://testserver/readme

So the Alias in httpd.conf ensures that you can get access to the required parts, but maintaining security by not granting access to the sensitive parts.
Title: Geeklog RPM
Post by: Anonymous on April 19, 2004, 05:11:17 AM
Thanks Ian.
Title: Geeklog RPM
Post by: wellsi on April 19, 2004, 09:13:13 PM
See http://forums.contribs.org/index.php?topic=21973.msg86998#msg86998 for the full question. However the answer is more appropiate here.

Quote
However I really wish the rpm would work such that when you went to www.mydomainname.com the geeklog index.php would come up rather than having to go to www.mydomainname/geeklog.


I have a oneliner for this - although there may be many ways of doing this.

The httpd.conf Alias is set up in the following template fragment.
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/99geeklog

Edit this file to add the following line directly after the existing Alias line.

Code: [Select]
Alias / /opt/geeklog-1.3.9/public_html/

Then run the following two comands
Code: [Select]
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# /etc/rc.d/init.d/httpd restart


Then try it. You will notice that both forms work.
http://www.mydomainname.com/geeklog
http://www.mydomainname.com

I hope this is the effect that you want, and that you can understand why this works as it does.

(Warning: Because of the new Alias, addresses such as http://www.mydomainname.com/server-manager would not be valid any more. This may not be what you want)
Title: Geeklog RPM
Post by: Anonymous on April 20, 2004, 03:15:09 AM
Thanks Ian.  Even with my basic knowledge I see the logic here.

I will have to think about whether i really don't want to be able to go to www.mydomainname/server-manager.  Would I still be able to get there by going to servername/server-manager?  I am guessing not.

I was reading elsewhere that if you want your changes to not be written over when you do an upgrade to d-smith software you should not make changes to:

/etc/e-smith/templates

but instead use

/etc/e-smith/custom-templates

My question is related to this is whether you have to use the exact same directory strucuture in /etc/e-smith/custom-templates for the new httpd.conf file or can you just put it in /etc/e-smith/custom-templates/
Title: Geeklog RPM
Post by: ldavies on April 20, 2004, 03:29:33 AM
The post above was me./ I forgot to log in
Title: Geeklog RPM
Post by: wellsi on April 20, 2004, 12:32:55 PM
A good question as people often get this wrong.

According to the Mitel designers, you only put a template in the templates-custom directory tree if it conflicts with a template that was provided in the SME Server release.

As SME Server does not have a '99geeklog' Abe correctly put this in the templates directory-tree.

I'll propose that this is made clearer in the documentation: http://no.longer.valid/phpwiki/index.php/Customizing

(Regarding having geeklog at the main domain, but still allowing /server-manager I think I have a solution but will need to test it - unless someone else provides an answer first)
Title: Geeklog RPM
Post by: ldavies on April 20, 2004, 06:16:21 PM
I got a recommendation on this from Abe which I will post later.
Title: Geeklog RPM
Post by: loveless on April 22, 2004, 07:07:48 PM
Geez... lots of posts on this topic, and I haven't been getting any of the forum notices.

Weird, I'll try to pay a little more attention to the forums.  :)
Title: Geeklog
Post by: EdelingF on August 15, 2004, 09:45:45 PM
Is there a simple way to install Geeklog in a Ibay?

Freek
Title: Re: Geeklog
Post by: icpix on August 16, 2004, 01:42:02 PM
Quote from: "EdelingF"
Is there a simple way to install Geeklog in a Ibay?


This is a thread about Abe's RPM... which automatically puts GeekLog deep into /opt/ and not in an iBay.

If you want to start a new thread <GeekLog in an iBay?> I will outline what I did here to achieve it. Not sure if it's simple but I'm pretty simple so it can't be too difficult.

best wishes, Robert