Tag Archives: Linux

Finally a Linux jmx query tool that works out of the box!

I've tried many many jmx query tools from the command line, 
windows has the jconsole tool which is a part of the Java binaries pack, and works fine, 
but it is not a command line tool – it has a nice GUI. 

this command line jar works like a charm, 
displays all the beans it finds, and allows you to invoke them , 

take a look at :

http://crawler.archive.org/cmdline-jmxclient/

only the cmdline-jmxclient-0.10.3.jar files is available for some reason, 
searches in google didnt find the newer file at all. 

than you run it with :

java -jar cmdline-jmxclient.jar – SERVER:PORT

to get a listing of all the available beens.

more samples are available on the link above. 

works like a charm!

 

Technorati Tags: , ,

Jumpy KDE on a new T430

The KDE screen kept hanging every few seconds , and it drove me crazy, 
another error I've been seeing is in the messages log:

 

Jul  5 12:34:05 desktop kernel: [ 5807.441851] [drm:i915_hangcheck_ring_idle] *ERROR* Hangcheck timer elapsed… blt ring idle [waiting on 1688990, at 1688990], missed IRQ?
 
which kept repeating all the time.
 
I found a working solution at: 
 
the solution that worked for me is:

On Kernel 2.8.38: /sys/module/i915/parameters/semaphores is set to 0
On Kernel 2.8.39: /sys/module/i915/parameters/semaphores is set to 1

if i do the following:

sudo -i
echo 1 > /sys/module/i915/parameters/semaphores

The Bug is also gone on 2.8.38 …..

If i set semaphores on 2.8.39 to 0 as it is default on 2.8.38, the bug also appears.

 

also there is a comment there talkeing about setting it up in boot through grub (I didnt test this yet though):

 

you can put this option in /etc/default/grub to make the change permanent
replace following line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

by
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.semaphores=1"

 

now my KDE runs just fine :)

 

fix for the autoboot suggestion:

it didnt work, a working solution was to edit the /boot/grub/menu.lst file and add i915.semaphores=1  to the end of the kernel line.

Technorati Tags: , , , ,

Implementing MediaWiki

My favorite type of wiki is mediawiki,
I love the ease of use, the huge matrix of extensions available,
and the look and feel of the wiki itself.
backup, restore and upgrade support are also very important reasons to choose a specific wiki software,
and having gone through all this steps in mediawiki, I am very pleased with the ease of use.

Starting from the begining:

what is mediawiki?

MediaWiki is free server-based software which is licensed under the GNU General Public License (GPL). It’s designed to be run on a large server farm for a website that gets millions of hits per day. MediaWiki is an extremely powerful, scalable software and a feature-rich wiki implementation, that uses PHP to process and display data stored in its MySQL database.
Media wiki site

Media wiki also saves the versions of the updated files – allowing for easy reverts and versioning of edited files.

The largest sites using medaiwiki:

Mediawiki large sites list

Design matters

Wiki website doesn’t have to have the MediaWiki standard look,
you can design the look and feel either manually to suite the corporate guidelines or with existing skins.

Novelle’s wiki site:

Novell wiki site

marvel.wikia.com:

marvel

Extensions

Extensions are compilations of PHP code that add new features or enhance functionality of the main MediaWiki core. Extensions are one of the main advantages of MediaWiki. They give wiki administrators and wiki end-users the ability to adapt MediaWiki to their requirements.

The extensions can add capabilities like:

Integrate into the Organization

Using LDAP we can integrate the wiki with the main active directory.
http://www.mediawiki.org/wiki/Ldap will show you the step to add ldap support to the wiki install,
with ldap you can have single and multi domain authentication (including local database)
Retrieval of user information from LDAP:
  • Email address
  • Real name
  • Nickname
  • Language
you can configure the wiki to allow to only domain users to access the server, and you can create wikis that will be accessible only by a specific domain group/users.
You can restrict edit access only to users who have created an account AND verified their email address.
more features the mediawiki ofers:
  • A watch list – update by email when a watched page has changed.
  • By default, MediaWiki’s page URLs look like /index.php?title=Your_Page,
  • but an .htaccess file tweak can make them look like Wikipedia’s clean /wiki/Your_Page links.
  • When a user submits an edit to a page, MediaWiki writes it to the database, but without deleting the previous versions of the page, thus allowing easy reverts in case of vandalism or spamming.

First steps with editing wiki pages

http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Editing_overview

This simple editing tutorial will show you the basic step in editing a new wiki page:

  • headings
  • lists
  • links

Technorati Tags: , , ,

solaris 10 and vnc

Boost Your Adsense And Affiliate Commissions By Building 10s, 100s or 1,000s of Websites,
Each With The Click of a Button!

VNC is a server client method of connecting to a remote server,
the great thing about vnc is that you can see the remote server desktop, and work on it with a mouse just like its your local desktop.
another good thing about vnc is that its free for use for many distros.

There are main 2 major software companies that supply free vnc server and vnc cllient,
the first is realvnc and the second is tightvnc , from the tighvnc site:

TightVNC is a free remote control software package. With TightVNC, you can see the desktop of a remote machine and control it with your local mouse and keyboard, just like you would do it sitting in the front of that computer. TightVNC is:

  • free for both personal and commercial usage, with full source code available (GPL-licensed);
  • useful in remote administration, remote customer support, education, and for many other purposes;
  • cross-platform, available for Windows and Unix, compatible with other VNC software.

So these are 2 options for you to download a good free vnc viewer.

Solaris VNCserver configuration

and I say only viewer because now the Solaris 10 build 5 comes with the vncserver alredy inside.
all you need to do is to configure it.

This page on the SUN site will give you the detailed explanation on how to do things and what security patch you need to install fisrt ,but the instructions can be summed up in 4 lines:

mkdir -p /etc/dt/config

cp /usr/dt/config/Xservers    /etc/dt/config/Xservers

edit this file “/etc/dt/config/Xservers” and add these lines at the end:

:1  Local local_uid@none root /usr/X11/bin/Xvnc :1 -nobanner -AlwaysShared -SecurityTypes None -geometry 1024x768x24 -depth 24
:2  Local local_uid@none root /usr/X11/bin/Xvnc :2 -nobanner -AlwaysShared -SecurityTypes None -geometry 1024x768x24 -depth 24
:3  Local local_uid@none root /usr/X11/bin/Xvnc :3 -nobanner -AlwaysShared -SecurityTypes None -geometry 1024x768x24 -depth 24
And reboot the server.

The lines with the :1 :2 etc at the beginning, are the virtual displays you wish to server to have available for connections, you can add more by changing the numbers to :4 :5 etc.

when connecting to the server with the vnc viewer you need to express to which virtual display you want to connect by adding it to end of the server’s name or ip:

10.10.10.1:3

If you want to connect to virtual display number 3.

A security note – this configuration will allow passwordless access to the vnc screen – if someone logs in and leaves it open – the next user can just enter without a login.

A safer configuration is to require a password by using the -SecurityTypes VncAuth parameter. The Xvnc(1) man page describes password requirements.

VNC and Security

The vnc as a general is clear text, for a more secure connection there is a method of tunneling the vnc through a ssh session.
2 nice tutorials for vnc through ssh can be found here and here.
the second tutorial is using putty for the ssh connection – putty is another great freeware,
its a free ssh client for windows to connect to ssh servers.

If the server you wish to connect to through vnc is located withing your lan,
and you are relaxed about security for the users on it – if its a training server etc ,
you can just setup the vncserver without any safeguards,
but if you are connecting through an unsecured medium (AKA the internet)
you better add the ssh layer to it.

Boost Your Adsense And Affiliate Commissions By Building 10s, 100s or 1,000s of Websites,
Each With The Click of a Button!

Technorati Tags: , , , ,

Reading Linux Email book

Linux E-mail

I’m reading a new book about Linux mail servers,
Its basically a Hands on training book for easily installing a full linux email server for the office,
The book is filled with helping screenshots and a step-by-step procedures to install the server and make things work,
some of the apps the book covers are: Postfix, Courier, Procmail etc…
Ill add a full review when I’m done reading – it looks nice so far.

Technorati Tags: , ,

I Like Good Linux Lists On The Morning

Lists are the magic word for SEO and link bait, and they catch the eye.

Well I sometimes bite too so here is the latest Linux links list I have fallen for:
15 Power tools for Linux that you cant afford to miss,
I havent checked all the links in the page yet, but I will.

And you should probably check out the whole blog,
It looks very promising and fun to read.
from their description:
Penguin Inside is a blog about Linux and Software Guides, How-TOs, Reviews.
The blog is dedicated to Linux Desktops.

Another Good list is from Smashing Magazine:
50 Beautiful Flash Websites , and thats a beutiful list of 50 stunning flash websites,
A couple that i liked the most are:

e-Content Solutions

econtent

and v5 Design

v5design_s

Technorati Tags: , , ,

Apache Active Directory Authentication

Apache server is a strong web server that can serve great open source application like Mediawiki which is a great solution for information sharing,
but what if you want to use Mediawiki to share information only for the local office active directory domain members?
Or even only to members of a specific group in the active directory?

In Apache you have a specific module called mod_ldap which allows you to use the Active Directory as an authentication server for your users,
so you can create a secure wiki branch for each department users.

To setup the apache server to use Active Directory as access manager you will need to make sure the mod_ldap was compiled with the apache server and that these lines are in the httpd.conf file:

LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule ldap_module modules/mod_ldap.so

If you have a Windows server installed with the xampp install of apache and mysql, you will have the module pre-compiled into the apache server,
however testing that it’s loaded can be done with:

C:\xampp\apache\bin\httpd.exe -t -D DUMP_MODULES
the output should have these lines:
authnz_ldap_module (shared)
ldap_module (shared)

Once you have the mod_ldap modules loaded you can add to the apache configuration file the user authentication support:

Any Authenticated user from the Domain:

<Location /Finance_Wiki>
Require valid-user
AuthType Basic
AuthName “Finance Wiki Access”
AuthBasicProvider “ldap”
AuthLDAPBindDN “CN=proxy_user,OU=sub_group,OU=main_group,DC=some,DC=domain,DC=com”
AuthLDAPBindPassword “proxy_user_pass”
AuthLDAPURL “ldap://pdc.some.domain.com:389/OU=main_group,DC=some,DC=domain,DC=com?sAMAccountName?sub?(objectClass=*)”
</Location>

The AuthLDAPBindDN and AuthLDAPBindPassword settings are for setting a user that will allow the apache server to browse the Active Directory structure,
the user created for this should have the minimum rights possible in the domain.

This specific apache configuration will allow any user from the domain to share the /Finance_Wiki folder, but if you want to allow access for a specific group you need to add this configuration line:

require ldap-group CN=groupname,OU=group.container,OU=main_group,DC=some,DC=domain,DC=com

This is the part that will require the active directory authentication for a specific group.

This way you can prepare a wiki branch for each group in your company to securely share internal files.

Technorati Tags: , , , , ,