Lil’ bit: favicon.ico for your web site

2008/06/26 18:51:00

Note my favicon:
favicon for this site

I had been meaning to add a favicon (note the icon next to my address in the address bar on your browser) for quite some time, but hadn’t gotten around to it. The last time I tried to create something in the .ico format, I needed a special tool.

But then again, times change. I used the GIMP to make the .ico file and posted it to the root of my webserver directory.

Nothing happened when I refreshed the page.

Then I found out that I needed to tell Apache about .ico files, so I put the following in my /etc/httpd/conf/httpd.conf file:

AddType image/x-icon .ico

Make sure that the favicon.ico file has the executable bit set for everyone:

chmod a+x

and now it will show up.

You might need to clean out your cache and restart your browser to see it. Evidently this feature "sticks" to web pages.

Software: Makeself

2008/06/20 18:53:00

I’ve been using makeself from http://megastep.org/makeself/.

This is an excellent tool for distributing self-extracting executables.

There is one issue that was not apparent to me. You can tell the resulting script to execute a file within the archive after extraction. Hence, the following will run test.sh after setup extracts everything:

./makeself.sh --compress ~/tmp setup "Test Installation Setup" ./test.sh

./test.sh is what is extracted. The leading ./ is necessary because the file is executed relative to the extracted directory.

Problem solved: Tikiwiki install generates a blank screen

2008/06/10 22:19:00

If the Tikiwiki install generates a blank screen, it could be (it was for me) because you don’t have the php-mysql package installed.

CentOS 5 does not install the php-mysql package by default.

This is required by Tikiwiki if you are using mysql (obviously).

Lil’ bit: Setting up user directories for Apache (i.e. ~user) on CentOS 5

2008/06/09 18:10:00

Setting up user directories for Apache (i.e. ~user) on CentOS 5:

  1. Change the /etc/httpd/conf/httpd.conf and comment out:
    UserDir disable

    and un-comment:

    UserDir public_html
  2. Restart Apache.
  3. Create a public_html directory in the user’s home directory.
  4. Make sure it has permissions 0755.
  5. Make sure their home directory has permission 0711.
  6. Make sure that public_html directory has SELinux context:
    user_u:object_r:httpd_sys_content_t
  7. Make sure that the SELinux boolean
    httpd_enable_homedirs

    is set to "on".

Lil’ bit: Configuring CentOS 5 host for sharing home directories over samba.

2008/06/04 19:07:00

Configuring CentOS 5 host for sharing home directories over samba.

Create a samba user:

smbpasswd -a smjones

Start Samba:

/sbin/service smb start

Make sure it will start on next boot:

/sbin/chkconfig --level 2345 smb on

Make sure SELinux doesn’t stop us from sharing home directories:

/usr/sbin/setsebool -P samba_enable_home_dirs on