checking if selinux is installed and enabled

have you been wondering if your installation has selinux installed and is interferring with your coding? here’s a way to check (anyway my distro is centos4)

to know if selinux is installed

rpm -qa | grep selinux

to know if it is enabled

/usr/sbin/getenforce

restarting apache httpd in centos

always developed in winxp for the time being and also being new to linux i am forced to learn to make changes in php.ini and needed to restart apache or httpd

to restart:

/sbin/service httpd restart

to start:

/sbin/service httpd start

to stop:

/sbin/service httpd stop

automatically start xampp on boot

(also applies to xampplite)

What could be the search engine terms for this?

  • start xampp automatically
  • xampp as a service
  • xampp in windows startup folder

Here we go with the story:

I always favored simplicity and ease of life that’s why I have many articles relating to productivity(has also remodeled the links on my blog to simplify things up). Then since I am always using xampp as a development environment. I want it started when I start my PC.

So how it is going to be?

  • as a service
  • as a startup program for windows(more clutter on your taskbar)
  • other things(don’t know/forgot)

As a service

You can set this one by:

  1. Going first to your installation directory(in my case it’s c:\xampplite). It could be somewhere else depending on your installation. Have also my full version in c:\x2\xampp
  2. Once your in the installation directory find xampp-control.exe and click/double-click to launch it.
  3. You should first stop all running instances of your apache2 and mysqld/mysql to do this.
  4. Click the checkmark next to Apache and Mysql with the header name Service.
  5. It will warn you that it’s installing as a service which of course is what we like it to do. Click Yes.
  6. Do step 5 also with Mysql. We’re almost done.
  7. Click Start ยป then Run
  8. Type services.msc(it can also be done in control panel under administrative tools which is a way lot of click than this one).
  9. Find apache2 and mysql services
  10. Double click each one and set the startup type to Automatic (You will be presented with 3 options: Automatic, Manual, Disabled)
    Automatic – will start it automatically at startup
    Manual – user’s will have to start it up manually i.e. by issuing command like net start apache2
    Disabled – will disable it.
    ****be warned though that any change in the services just like the registry can cause your system to stall***
  11. Click the start button to manually start it(just for the session though). The next restart it’ll be automated.
  12. Do the same with mysql.

As a startup program

  1. Find xampp_start.exe from your installation directory
  2. Press Ctrl+C to copy it or right-click the file and hit copy.
  3. Go to C:\Documents and Settings\Administrator\Start Menu\Programs\Startup and right click on it and hit Paste Shortcut
  4. When you restart it’ll be starting also and you’ll see something like this:

  5. You can stop it by issuing the xampp_stop.exe command in your installation directory.
    ***another worth mentioning is that if you right click again on the shortcut and hit properties, try to change the run option to minimized. This way the shortcut will be on your taskbar once started.

Enjoy.

what fantasy character are you?

 

Which Fantasy/SciFi Character Are You?

Been reading some blog I forgot where and found this fun link. Basically it’s a character/personality survey and at the end will match you with a character.

Here’s mine. Yoda from Star Wars. What’s yours?

Yoda

A venerated sage with vast power and knowledge, you gently guide forces around you while serving as a champion of the light.

Judge me by my size, do you? And well you should not – for my ally is the Force. And a powerful ally it is. Life creates it, makes it grow. Its energy surrounds us, and binds us. Luminescent beings are we, not this crude matter! You must feel the Force around you, everywhere.

jedit and web development as a free alternative for textmate

I don’t have enough to fuel me buy an expensive IDE for my development works. That is 2USD is more than expensive for me(singing: I’m just a poor boy.. from a poor family..**you know the song**). I’m going to have to setup a donate to my PayPal account soon :D.

Kidding aside. I have seen TextMate and it’s functionality in the web development world. It was never been awarded as Best Mac OS X Developer Tool in 2006 for nothing. Have several bundles to use. Whew.. Cool.

Then there’s this great tutorial about jedit to have some functionality like code completion in TextMate(they call it snippets I think – never had tested it, never will… for now.. I’m broke right?), it’s called SuperAbbrevs(or Super Abbreviations). It’s more of a code completion, also a prompter for variables.. etc.

The code for setting up a code completion for PHP is a no-no for the developers at the time of this writing. There was no port of code completion for PHP. However I am making my own snippets.. I will publish it in this site once I have or think it’s complete for me. :D 

installing pear packages on xampp

Once you’re on PHP development on windows you can’t escape xampp. Only if you toke the stressful path of installing the system one by one i.e. install apache, then php, then mysql, then perl.. then you have a good choice/stand that you know how to configure the system itself.

One thing about xampplite is that it doesn’t have pear installed.

For me? I toke the simple steps. I am lazy.. that’s what programmers are(not generally).

First, go to your xampp installation directory/folder and navigate to the php directory. For me it’s x:\xamplite\php

x:

cd \xampplite\php

pear install <package-name>

There you have it, that should do the job installing the package you want. You may have to list the package to know what pear packages are already installed

pear list