Thursday, February 01, 2007
memcached seems well worth using for highly-dynamic webapps which do a lot of database access. There's a brilliant Ajax-based travel portal called Kayak which uses it, for one. Also it looks like a good fit for things implemented using JavaSpaces...?
Wednesday, November 24, 2004
Sendmail on Linux
A few notes on Sendmail, since I don't know much about it, and the little bit that I do know, I don't want to forget. For next time.
It's in /etc/mail. Configure by updating sendmail.mc and then rerun "make -C /etc/mail" (assuming you've got sendmail-cf installed). The config is actually in sendmail.cf but you don't wanna have to understand it!! Don't forget to restart sendmail after you've updated the config!
Dodgy outbound msgs get dumped to /var/spool/mail/. Have a read of all the strange hieroglyphs of the sendmail, and rejoice that you don't have to try to understand it all in detail.
The thing I needed to do just now was to make sendmail send straight to our local SMTP server (actually MS Exchange). I updated the SMART_HOST parameter with an IP address - but that's not good enough. Oh no. It expects a hostname.
That's all I know about sendmail. Told you it wasn't much!
It's in /etc/mail. Configure by updating sendmail.mc and then rerun "make -C /etc/mail" (assuming you've got sendmail-cf installed). The config is actually in sendmail.cf but you don't wanna have to understand it!! Don't forget to restart sendmail after you've updated the config!
Dodgy outbound msgs get dumped to /var/spool/mail/
The thing I needed to do just now was to make sendmail send straight to our local SMTP server (actually MS Exchange). I updated the SMART_HOST parameter with an IP address - but that's not good enough. Oh no. It expects a hostname.
That's all I know about sendmail. Told you it wasn't much!
Labels: linux
Thursday, June 26, 2003
I'm now trying to sort out some backups. The only way I can think of to do this at the moment is copy files from Linux to my ZIP drive in the Windows PC, using the Linux Samba client.
This is how was planning to do it (although I didn't get very far):
1. ensure the drive you want is shared on the Win98 box, set a password etc.
2. smbclient -L zaphod (expects hostname not workgroup name!) - this should at least give you a connection response.
3. smbclient //zaphod/Zip will start you a dialogue a bit like FTP so you can move files around etc.
4. help to see your options
5. move files etc.
I could do with setting up a shell script to do this for my regular backups... or, better, find out if there's a backup tool that's shipped with Linux and use that. Also, how do I figure out what to back up?
This is how was planning to do it (although I didn't get very far):
1. ensure the drive you want is shared on the Win98 box, set a password etc.
2. smbclient -L zaphod (expects hostname not workgroup name!) - this should at least give you a connection response.
3. smbclient //zaphod/Zip
4. help to see your options
5. move files etc.
I could do with setting up a shell script to do this for my regular backups... or, better, find out if there's a backup tool that's shipped with Linux and use that. Also, how do I figure out what to back up?
Labels: linux
Wednesday, June 25, 2003
Linux progress
Have been setting up Sun J2SDK 1.4 and Sun J2EE 1.3: the installation was easy (see download instructions at http://java.sun.com/j2ee/sdk_1.3/install.html for the J2EE part for example.
The bit where I have less experience (for less read "bugger all") is the Unix/Linux sysadmin bits - i.e. getting the correct user/group and setting the environment variables. My theory is that for my box which is going to be basically a Java box, I would like to set up the Java-related variables on a system-wide basis, rather than per user. In fact it looks like I don't have to worry about user/group issues...
I started out putting them in the .bash_profile for my userid in /home/paul, but then decided to put them in the system-wide file, which is /etc/profile. There's some logic I don't understand in detail in this file but it appears to work now. I had to set JAVA_HOME, J2EE_HOME to the directories of the appropriate software (e.g. /usr/java/j2sdkee1.3.1) and extend the PATH to include the bin directories of the J2SDK and J2EE releases I installed (e.g. /usr/java/j2sdkee1.3.1/bin).
I haven't configured J2EE yet, but a test Java source compiled and ran OK. I also want to install jEdit (http://www.jedit.org/ on both the Linux box itself and my Windows PC, in order to standardize on a source editor. So that's next... Then I have a few more things I want to install (see list below) and since I'm putting in quite a bit of work on this I think I should get a proper backup sorted out! At the moment I may have to send backups to the ZIP drive on my Windows PC, coz I don't have a CD writer or tape device.
List of software still to install:
jEdit
Tomcat
Ant
CVS
Commons
Web Services
XML
Jakarta Commons (same as Apache Commons?)
Log4J
Struts
Taglibs
Velocity Templates
Tiles (part of Struts??)
On another subject:
I also got Samba working across the Windows/Linux machines. Once again it was the Windows machine which was the problem. Linux was OK - but (admittedly I'm still on Win98) I had to (re-?)install various Network things as I hadn't got it set up to share data, so it failed when I tried to browse the "Network Neighbourhood". Samba will I guess be useful for sharing files and remotely updating source although I plan to use Dreamweaver to manage source at the "site" level.
Have been setting up Sun J2SDK 1.4 and Sun J2EE 1.3: the installation was easy (see download instructions at http://java.sun.com/j2ee/sdk_1.3/install.html for the J2EE part for example.
The bit where I have less experience (for less read "bugger all") is the Unix/Linux sysadmin bits - i.e. getting the correct user/group and setting the environment variables. My theory is that for my box which is going to be basically a Java box, I would like to set up the Java-related variables on a system-wide basis, rather than per user. In fact it looks like I don't have to worry about user/group issues...
I started out putting them in the .bash_profile for my userid in /home/paul, but then decided to put them in the system-wide file, which is /etc/profile. There's some logic I don't understand in detail in this file but it appears to work now. I had to set JAVA_HOME, J2EE_HOME to the directories of the appropriate software (e.g. /usr/java/j2sdkee1.3.1) and extend the PATH to include the bin directories of the J2SDK and J2EE releases I installed (e.g. /usr/java/j2sdkee1.3.1/bin).
I haven't configured J2EE yet, but a test Java source compiled and ran OK. I also want to install jEdit (http://www.jedit.org/ on both the Linux box itself and my Windows PC, in order to standardize on a source editor. So that's next... Then I have a few more things I want to install (see list below) and since I'm putting in quite a bit of work on this I think I should get a proper backup sorted out! At the moment I may have to send backups to the ZIP drive on my Windows PC, coz I don't have a CD writer or tape device.
List of software still to install:
jEdit
Tomcat
Ant
CVS
Commons
Web Services
XML
Jakarta Commons (same as Apache Commons?)
Log4J
Struts
Taglibs
Velocity Templates
Tiles (part of Struts??)
On another subject:
I also got Samba working across the Windows/Linux machines. Once again it was the Windows machine which was the problem. Linux was OK - but (admittedly I'm still on Win98) I had to (re-?)install various Network things as I hadn't got it set up to share data, so it failed when I tried to browse the "Network Neighbourhood". Samba will I guess be useful for sharing files and remotely updating source although I plan to use Dreamweaver to manage source at the "site" level.
Labels: linux
Router is now upgraded to 4.7 Firmware and FTP and Dynamic DNS appears to work OK now. Dynamic DNS alias has been set up with http://www.dyndns.org/ and is: jeannot.dnsalias.org.
Labels: linux
Tuesday, June 24, 2003
Have found out that FTP and the Dynamic DNS thing I set up is probably not working - this may be down to the router needing a firmware upgrade, which I found at http://www.blue-hardware.com/read_comment.php3?id_news=2270.
Labels: linux
Monday, June 23, 2003
Spent quite a bit of the weekend getting my "hone network" sorted out. It all seems to be working OK and I can even connect to my Linux box remotely now. I still only get a dynamic IP address from BT so at the moment I rely on Helen telling me what that is... am hoping to automate that.
Labels: linux
Friday, June 20, 2003
Oh I get it. What had happened is that I saw on the console log that I had an "Intel 810e" card - and assumed that that was the card I needed. However on looking closely at the XFree86 log I noticed that another card was mentioned - an NVidia Riva TNT2 card. So I redid the config selecting that card instead and it was fine.
Why did I see 2 video cards?? Could it be that there's one default graphics card which is not actually in use?
Why did I see 2 video cards?? Could it be that there's one default graphics card which is not actually in use?
Labels: linux
Various Red Hat 8 PDF docs now downloaded to my laptop (see the Desktop)...
Labels: linux
The really frustrating thing with this X prob at the moment is that X appears to work just fine in the install phase - it only fails to work after. According to the docs, the install phase uses an X configuration that "will work with anything".
I would like to find out what config the install uses!
Try: http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-x-runlevels.html
I am also trying to find out what startx actually does. All I know so far is that it is a frontend to xinit.
The command line params for startx/xinit are at
I seem to remember that "startx &" will start it in a new process and so not hang the console. Other useful thing: "startx & > output" will send the startx log to a file.
I would like to find out what config the install uses!
Try: http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-x-runlevels.html
I am also trying to find out what startx actually does. All I know so far is that it is a frontend to xinit.
The command line params for startx/xinit are at
I seem to remember that "startx &" will start it in a new process and so not hang the console. Other useful thing: "startx & > output" will send the startx log to a file.
Labels: linux
Haven't tried using redhat-config-xfree86 yet... will try that tonight. If I can get round to it before S&J want to get down to the bookshop in time for midnight when the new Harry Potter is due to be apparating on the shelves...
Labels: linux
Video Card: Intel i810
Monitor: Acer 756L (or something like that)
Monitor: Acer 756L (or something like that)
Labels: linux
Got my new/old Dell machine yesterday to put Linux on. It's an old Dell Optiplex GX110, 128MB RAM, 800MHz.
So now I've started putting Linux on it and it soon became clear that I would have to start blogging stuff to keep a record of how it's going, coz I keep forgetting bits of how to do it and then have to start from scratch next time!
I got RedHat Linux for Dummies which came with CDs with the "Publishers Edition" of RedHat 8 on it. I've already read that there are some "limitations" with this edition so we'll see how it goes. Initial load went fine and it's beautifully fast compared to the old Pentium Classic 75MHz that I was trying to load it on before! (And didn't get very enthused by). It found my Ethernet card straightaway, launched the X version of the install GUI, and all went OK.
I still have to configure the eth0 correctly though. I put what I thought were reasonable guesses at IP addresses etc. but I am getting a router soon so I should be able to use DHCP.
So the install completed fine - unfortunately the probs started on next bootup when the system reported unable to start the X server. Had a browse on the internet and it looks like quite a few people have this sort of problem.
Tried text login then "startx" - this initially reported errors - log file is in /var/log/XF86Free.0.log
I tried guessing the BusID and then putting that in the config file at /etc/X11/XF86Config - now what happens is that I just get a blank screen and a hung system.
Ctrl+Alt+Backspace kills X so I don't have to reboot - the log file shows all sorts of weird looking probs with the video card driver.
So now I have to find out what it all means and will probably end up configuring X by hand...!
Check out:
http://www.xfree86.org/
So now I've started putting Linux on it and it soon became clear that I would have to start blogging stuff to keep a record of how it's going, coz I keep forgetting bits of how to do it and then have to start from scratch next time!
I got RedHat Linux for Dummies which came with CDs with the "Publishers Edition" of RedHat 8 on it. I've already read that there are some "limitations" with this edition so we'll see how it goes. Initial load went fine and it's beautifully fast compared to the old Pentium Classic 75MHz that I was trying to load it on before! (And didn't get very enthused by). It found my Ethernet card straightaway, launched the X version of the install GUI, and all went OK.
I still have to configure the eth0 correctly though. I put what I thought were reasonable guesses at IP addresses etc. but I am getting a router soon so I should be able to use DHCP.
So the install completed fine - unfortunately the probs started on next bootup when the system reported unable to start the X server. Had a browse on the internet and it looks like quite a few people have this sort of problem.
Tried text login then "startx" - this initially reported errors - log file is in /var/log/XF86Free.0.log
I tried guessing the BusID and then putting that in the config file at /etc/X11/XF86Config - now what happens is that I just get a blank screen and a hung system.
Ctrl+Alt+Backspace kills X so I don't have to reboot - the log file shows all sorts of weird looking probs with the video card driver.
So now I have to find out what it all means and will probably end up configuring X by hand...!
Check out:
http://www.xfree86.org/
Labels: linux
