Linux Server Hack - How to setup a Shell Script to Auto Restart Apache Httpd Server!
Well, I have been struggling with one of my dedicated servers and just found this cool script that will auto-restart the Apache httpd server if it goes out.
Save the following as restart.sh:
#!/bin/bash # Apache Process Monitor # Restart Apache Web Server When It Goes Down # ————————————————————————- # Copyright (c) 2003 nixCraft project <http://cyberciti.biz/fb/> # This script is licensed under GNU GPL version 2.0 or above # ————————————————————————- # This script is part of nixCraft shell script collection (NSSC) # Visit http://bash.cyberciti.biz/ for more information. # ————————————————————————- # RHEL / CentOS / Fedora Linux restart command RESTART=“/sbin/service httpd restart” # uncomment if you are using Debian / Ubuntu Linux #RESTART=“/etc/init.d/apache2 restart” #path to pgrep command PGREP=“/usr/bin/pgrep” # Httpd daemon name, # Under RHEL/CentOS/Fedora it is httpd # Under Debian 4.x it is apache2 HTTPD=“httpd” # find httpd pid $PGREP ${HTTPD} if [ $? -ne 0 ] # if apache not running then # restart apache $RESTART fi
Then setup a cron job like this: (usually in your sa-update file under /etc/cron.d)
*/5 * * * * root /root/restart.sh >/dev/null 2>&1
There’s also a program called Monit that will do more automation.
DIY Wordpress HACK - How to decrease the load on your Wordpress blog by 5 factors!

Here’s how to decrease the load on your Wordpress blog by 5 factors! (if you are running a dedicated server)I was digging today for some stuff on digg and noticed this post about Wordpress performance.
Since Zedomax runs Wordpress, I decided to take a look.
Elliott was running only one server yet he claims that he can handle 1,000,000 hits a day on one server!
FYI, Zedomax is running 3 servers now and the load was at about 0.80 to 1.0 on an average day for the HTTP server and 0.60 to 0.80 for the MYSQL server. (The other HTTP server is for the other blogs)
So through Elliott’s suggestions at changing httpd.conf, my.cnf, php.ini, and installing eAccelerator, my load on the server dropped at least 5 times!
The load for the HTTP server is now at about 0.20 for the HTTP server and 0.15 for the MYSQL server.
Bottom Line
If you run Wordpress blogs, make sure to do the suggested changes and you will definitely notice the increased speed of your website loads.
Here’s some additions to the Elliott’s HOWTO for installing eAccelerator.
When I’m trying to execute phpize, I got this:
/usr/local/php/bin/phpize: line 57: aclocal: command not found
This means you don’t have phpize installed on your Fedora. You can install the php-devel which has the phpize in it like this:
“yum install php-devel”
I got this error when I was trying to install the above:
“Check that the correct key URLs are configured for this repository”
So you gotta do this:
Edit /etc/yum.repos.d/fedora.repo and replace the line
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
with:
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
Then when you do “./configure”, if you get an error, you need to install some more tools. (which wasn’t documented)
So I installed Autoconf and Automake by using:
“yum install autoconf”
and
“yum install automake”
This might be basic for an experience linux-er but it took me couple hours to get it so hopefully it will help ya.
Then you can follow the rest of the directions.
Hey thanks Elliott for sharing the information with the world. I really appreciate this, you made my websites run faster!
DIY - VMware HOWTOs

Do you need to learn to install VMware on your new Fedora or Ubuntu? Here’s a cool site that has a massive collection on VMware howtos.
Linux Distro rankings
Linux shortcuts

Here’s some cool linux shortcuts.
complete list via pio’s blog
Ubuntu 6.10 Edgy Eft Review
Here’s a cool article on the new Ubuntu 6.10. The above picture i think is the 3D window system…
As of October 26, Ubuntu has released their latest Linux operating system, version 6.10 aka Edgy Eft, which can be downloaded here. Ubuntu has been the up and coming star company in the Linux O.S. scene for the last couple of years. They just seem to get more popular with each release and along with their releases getting better with each release. I would dare say they have nearly the cult following like Apple Computers or Google. Ubuntu, as you might be able to tell, is an unorthodox company, even for a company in the Linux scene!
Ubuntu was originally founded by Mark Shuttleworth, a South African multi-millionaire, who once paid $20 million to ride into outer space on the Russian Soyuz TM-34 mission. The company’s name Ubuntu actually derives from the South African (Zulu) concept of ubuntu, which means “I am because you are” or “humanity towards others.” Ubuntu tries to apply that concept into their business model. The companies slogan is “Linux for human beings” and they go as far as to offer to ship for free a copy of their distribution to anyone in the world. The concept of Ubuntu fits perfectly into the world of Linux and open source software. Without the work of others, there would be no way that Linux would be what it is today and the same applies to Ubuntu.
Wine HQ v0.9.22 - Windows emulator in Linux

Wine HQ v.0.9.22 is available now, the latest version for running your programs in Linux.
Now let see, I do have some programs that need to run on my Fedora FC5…
2006 Ohio LinuxFest

The Ohio LinuxFest is a free annual conference and event for the Linux and Open Source community.
Links to festival info:
http://www.ohiolinux.org/
http://fedoraproject.org/wiki/FedoraEvents/OhioLinuxFest
http://www.ohiolinux.org/exhibit.html#31



