Aug 31
To change your hostname and/or domain name in Linux you need to modify two files.
/etc/sysconfig/network should read:
NETWORKING=yes
HOSTNAME=
– and –
/etc/hosts
127.0.0.1 localhost locahost.localdomain
Replace the terms in brackets (<>) with your own hostname and domainname, and then reboot.
Apr 10
I spent a lot of time getting ColdFusion to run on Leopard. I wish I had kept better track of all the errors I sorted through on path to figuring it out, but unfortunately I didn’t.
Here were the biggies though. First make sure to get Update 7 for JRun. I didn’t find the updates at first which slowed me down.
Additionally (and the most frustrating), is it turned out that setting java.home in jvm.config was not enough to make JRun use the specified JRE. I wanted it to use JVM 1.5.0. Running ‘./jrun -info’ (from the JRun bin directory) returned “Apple Inc. 1.5.0_13-119 Java HotSpot(TM) Client VM”, so it appeared to be finding the JVM I wanted it to use, but it wasn’t working. So I set the classpath in ~/.bash_profile as well. That didn’t cut it either. Finally I found Steven Erat’s entry where he had similar issues.
What did resolve it was to change the CurrentJDK alias in System/Library/Frameworks/JavaVM.framework/Versions in addition to the changes already made.
Steven’s entry has good directions on how to do so. It seemed to me that setting java.home in jvm.config should have taken care of everything, but it didn’t You can to set the JVM in 3 places.
Once I had it running with JDK 1.5, I’d get this error:
Error 500
Could not invoke Java compiler, please make sure jikesw is in /Applications/JRun4/bin or put a JDK bin directory in your path.
jrunx.compiler.JavaCompiler$NoCompilerFoundException: Could not invoke Java compiler, please make sure jikesw is in /Applications/JRun4/bin or put a JDK bin directory in your path.
at jrunx.compiler.JavaCompiler.outProcessCompile(JavaCompiler.java:474)
……………..
Basically it can’t find javac, and I still have no idea why. The servers running but the sample JSP’s aren’t getting compiled. You could probably just compile the apps manually but I haven’t done that.
Well, there’s no great solution here, but hopefully this’ll help you to get going with whatever you decide. The problem with changing the CurrentJDK alias to 1.4.2 is that then everything on your system will be using that. That’s a hassle for me with all my Eclipse installs, etc where I need JDK 1.5.
Apr 09
On Linux you’ll need to add your user account to the sudoers file so you can run certain tasks as a superuser (sudo, su). Here’s an easy way:
Log in with your user account (not as root):
[martine@machine ~]# sudo
Password:
[root@machine martine]# chmod +w /etc/sudoers
[root@machine martine]# echo ‘martine ALL=(ALL) NOPASSWD:ALL’ >> /etc/sudoers
[root@machine martine]# chmod -w /etc/sudoers
Apr 02
On my Fedora server I was creating some shared folders that I could mount from my other machines.
So I created a Samba share, and chmod-ed the directories.
From my other machine I mounted a share and all seemed swell — that is, until I tried to add a file. It kept telling me I didn’t have sufficient permissions. Finally I figured out that chmod-ing was not enough, and that I had to change the context of the directory on the linux server:
chcon -R -t samba_share_t /path/to/share
I could then add files from the remote machine! Phew.
To get more info on the ‘chcon’ (change context) command, run ‘info chcon’