Lil’ bit: Running VMWare on Ubuntu on NTFS

2008/10/15 19:38:00
Print Friendly

This interesting set of circumstances actually exists, and quite frequently, evidently.

I recently began running Kubuntu on my laptop and started sharing the NTFS partition between Kubuntu and Windows. Unfortunately, after installing VMWare, I found out that VMWare wouldn’t start any of my virtual machines.

I was quite confused. I’d done this so many times on CentOS, I didn’t really expect Kubuntu/Ubuntu, a more user-friendly Linux distribution, to have any issues.

Well, I was wrong. It turns out that adding

mainMem.useNamedFile = "FALSE"

to the given virtual machine’s .vmx file fixes the problem.

This option forces VMWare to actually use the OS’s swap partition rather than making a swap file. Creating the swap file on NTFS seems to be an issue with NTFS on Kubuntu.

Lil’ bit: Timezones on CentOS Linux

2008/07/05 16:48:00
Print Friendly

Not all systems are synchronized to the time zone that you live in. In fact, if you rent a server like I do, it may be in an entirely different country.

CentOS has several commands concerning timezones. I don’t find some of them to be overly intuitive and figured that I would outline some easy-use recipes here:

1. Finding your system-wide timezone

The best documented way I’ve found to do this is with the following commands:

/usr/sbin/zdump /etc/localtime

You will get output like the following:

/etc/localtime  Sat Jul  5 16:42:53 2008 PDT

Which shows us that the local system-wide time zone for the server itself is “Pacific Daylight Time”.

Because we can set the time zone for our account; using the date command reveals the current time, but the wrong time zone:

# date
Sat Jul  5 19:42:53 EDT 2008

2. Setting your system-wide time zone

Setting the system-wide time zone can be achieved two ways.

One, you can copy the time zone file from /usr/share/zoneinfo to /etc/localtime.

Two, you can run the system-config-date program and choose the timezone tab. This is by far, the easiest way.

3. Setting your account time zone

Setting the account time zone is achieved by setting the TZ variable to the appropriate variable.
In Bourne Shell or BASH:

export TZ="EST5EDT"

In C-Shell or TCSH:

setenv TZ "EST5EDT"

To find out what the variable should be set to, look for the appropriate file name in /usr/share/zoneinfo or you can run the tzselect command.

4. Finding your account time zone

As noted before, running the date command shows the time zone for your environment:



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

2008/06/09 18:10:00
Print Friendly

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
Print Friendly

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

Lil’ bit: Configuring pup/yum for a proxy on CentOS 5

2008/06/03 21:07:00
Print Friendly

Configuring pup/yum for a proxy on CentOS 5

Edit the /etc/yum.conf and add

proxy=http://proxy-server-hostname:proxy-server-port/

Note the final slash, it is most important.

ref:
http://docs.fedoraproject.org/yum/sn-yum-proxy-server.html.