linux
VMware on ubuntu 6
I came across several errors whilst trying to install VMware server 1.0.2 on Ubuntu 6. Below is the error messages and their corresponding solutions:
You'll probably get asked for xinetd, make and GCC so get those first
sudo apt-get install xinetd sudo apt-get install build-essential
kernel? [/usr/src/linux/include]
sudo apt-get install linux-headers-`uname -r`
Ubuntu 6.1 64bit install - getting past booting the kernel
Trying to get Unbuntu 6.1 server AMD64 installed and it sticks on the part:
.
Decompressing the kernel
Booting the kernel
Seems to be quite a few others having the same issue, I am having this on a Dell Poweredge SC1435.
Anyway quite a simple fix, there are various different syntaxes for turning off APCI but I will detail what worked for me anyway.
Upon booting off the CD press F6 on the install from CD option, there you can enter boot parameters.
Currently mine ended with ..quiet --
Downloading via SSH to a server with wget and lynx disabled
Imagine my suprise when I logged into a reseller account via SSH and got the following:
-bash-3.00$ wget -bash: wget: command not found -bash-3.00$ lynx -bash: lynx: command not found
Obviously these days no-one likes to SCP or FTP files around and its always nice to download straight from the source. If you are getting the above on a general LAMP server it's very likely curl is still on there, the following command works a treat.
curl -LO http://domain.org/some-large-file.tar.gz
Crontab example
To edit crontab firstly run crontab -e
You might all this below useful to have a reference in the file itself, it's fairly self explanatory
# (Use to post in the top of your crontab) # ------------- minute (0 - 59) # | ----------- hour (0 - 23) # | | --------- day of month (1 - 31) # | | | ------- month (1 - 12) # | | | | ----- day of week (0 - 6) (Sunday=0) # | | | | | # * * * * * command to be executed 0,20,40 * * * * /var/www/scripts/cron-curl.sh 2>&1 >> /dev/null 30 6 * * * /root/automysqlbackup.sh 2>&1 >> /dev/null
The first runs on the hour, 20 past and 20 to every hour, every hour,day,month,week
bash: /bin/rm: Argument list too long
When trying to clean out some LARGE cache directories I recieved the following error:
[technotes@zebra cache]# rm * -bash: /bin/rm: Argument list too long
The quick fix to this was:
find . -name * | xargs rm
IPTables example - basic up and running
After editting /etc/sysconfig/iptables you need to do iptables-reload /etc/sysconfig/iptables - you can then confirm the rules by iptables -L
#Defaults - Don't forward or allow anything in by default, but allow outgoing by default *filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT ACCEPT [0:0] -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -I OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT ##################################################### # IP restrict SSH to known hosts # The office static IP -A INPUT -p tcp -m tcp -s 193.193.193.193 --dport 22 -j ACCEPT
Linux disable local ctrl+alt+delete
I have a linux box on a KVM - a few times I’ve switched over to it and done the ctrl+alt+del by accident (expecting an NT login) - and Unfortunately on fedora out of the box this shuts the machine down - not very good in office hours!
So I found this useful
In /etc/inittab
# Trap CTRL-ALT-DELETE #ca::ctrlaltdel:/sbin/shutdown -t3 -r now ca::ctrlaltdel:/bin/echo “ctrl+alt+del disabled”
No more accidental reboots….