I needed a quick way to maintain a current symlink to the most recent file by time stamp. Here’s one way to do it:
ls -t1 *.jpg | head -1 | xargs -i ln -sf {} current.jpg
Linux System Admin Blog….
I needed a quick way to maintain a current symlink to the most recent file by time stamp. Here’s one way to do it:
ls -t1 *.jpg | head -1 | xargs -i ln -sf {} current.jpg
I think the number one skill a sysadmin should have is a solid understanding of shells and shell scripting. The Advanced Bash-Scripting Guide is a good place to start or take a refresher. From the introduction:
A working knowledge of shell scripting is essential to anyone wishing to become reasonably proficient at system administration, even if they do not anticipate ever having to actually write a script. Consider that as a Linux machine boots up, it executes the shell scripts in /etc/rc.d to restore the system configuration and set up services. A detailed understanding of these startup scripts is important for analyzing the behavior of a system, and possibly modifying it.
Not to mention I’ll bet every sysadmin is doing some menial tasks over and over again instead of automating or simplifying them with a script. Sometimes you just don’t realize it. For instance, I can’t tell you how many times I’ve typed a loooong find command to recursively set AFS permissions and I just wrote a wrapper to do it with just two parameters the other day. That one script will literally save me minutes each week. Keep at it and you’ll save hours a week.
Ok, it’s actually an article about 10 Mental Blocks to Creative Thinking but isn’t creative thinking a huge part of being a kick-ass sysadmin? Here’s what I thought of when I read each point, but I highly recommend that you read the whole article and look for ways it applies to you.
In terms of what mindset you should be in:
This should be handled on a case by case basis, but if you are using the default MySQL table type of MyISAM (which is the default storage engine unless changed or specified differently) here are a few options:
Failure to install binary packages in older FreeBSD versions using “pkg_add -r”.
Add these lines to /etc/csh.cshrc (/etc/profile if you are using bash or sh):
[FreeBSD 4.x]
setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/Latest/
setenv PACKAGELIST
[FreeBSD 5.x]
setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/Latest/
setenv PACKAGELIST
My first post 😉
Issue: A change of IP address is needed in FreeBSD.
Solution: If you do not have the root password boot into Single User mode [option 4]. Procced to step 1.
If you have the root password procced to step 2.
1. mount -o (if you get a read-only error, you will have to run fschk -y)
2. vi /etc/rc.conf (If vi is unavailable use ee)
at this point simply edit the IP Address lines that will need to be corrected.
1. Start -> Settings -> Control Panel -> Network Connections
2. Right click and go to properties of the enabled/active NIC
3. Highlight on TCP/IP and click on properties
4. Select ” Use the following IP address ”
5. Enter your IP information for the server.
6. Click on Advanced
7. Click Add on the IP Settings tab.
8. Enter the usable IP range along with the netmask. ( ie 255.255.255.0 )
9. Click OK.
This happens with the configure script for apache cannot find the “openssl” (or “ssleay”) binaries in any of
/usr/bin/openssl
/usr/sbin/openssl
/usr/apps/opensslThe usual location for “openssl” is /usr/bin/openssl
On a debian system, run
apt-get install openssl
I have an ip address attacking my server or taking up all my httpd connections so none of my sites work.
In order to correct this you will want to use the netstat -n command to see the ip addresses connected to your server. Once you have the ip address you want to block you can use the following command to block them from accessing your server using iptables
iptables -I INPUT 1 -s IP.ADD.RES.SS -j DROP
-I INPUT 1 means to insert the rule at the top of the INPUT table (which means it will get looked at first)
-s IP.ADD.RES.SS is the source address of the packets we want to deal with
-j DROP means dump the packets into the void, and forget they ever happened.