Apache won’t start nothing in the logs
Chance are, if apache isn’t starting and isn’t logging anything, the error_log is full preventing apache from starting. To double check that, run:
cd /var/log/httpd
ls -lS | less
If any file is around 2-3 gig (or more), then chances are, that’s the problem.
The solution is to remove the logs, restart apache, and then implement preventative measures.
Get logrota to rotate daily.
# see “man logrotate” for details
# rotate log files daily
daily
# keep 2 weeks worth of backlogs
rotate 2
Tags: Apache, logs
Moving /var/lib/mysql
If you want to move the data which is stored in “/var” to another partition.
To move that path to another partition, run the following:
cd /home
mkdir mysql
chown mysql:mysql mysql
cd mysql
/sbin/service mysqld stop
cp -Rp /var/lib/mysql/* .
cd /var/lib
mv mysql mysql_old
ln -s /home/mysql ./mysql
/sbin/service mysqld start
Once satisfied that mysqld is running, remove the old data:
Tags: /var/lib/mysql, Moving
How to use kvm with a non-privileged user?
The cleanest way is probably to create a group, say kvm, and add the user(s) to that group. Then you will need change /dev/kvm to owned by group kvm.
On a system that runs udev, you will probably need to add the following line somewhere in your udev configuration so it will automatically give the right group to the newly created device (i-e for ubuntu add a line to /etc/udev/rules.d/40-permissions.rules).
KERNEL==”kvm”, GROUP=”kvm”
Tags: kvm, non-privileged user
How can I tell if I have Intel VT or AMD-V?
With a recent enough Linux kernel, run the command:
egrep ‘^flags.*(vmx|svm)’ /proc/cpuinfo
If something shows up, you have VT. You can also check the processor model name (in `/proc/cpuinfo`) in the vendor’s web site.
/proc/cpuinfo only shows virtualization capabilities starting with Linux 2.6.15 (Intel) and Linux 2.6.16 (AMD). Use the `uname -r` command to query your kernel version.
Tags: AMD-V, Intel VT
How to Fix Internal Server Error for cgi script.
Internal Server Error for cgi script means that the cgi script did not execute properly.
1) check the /var/log/httpd/suexec_log. It contains any errors that would be as a result of not having correct permissions on the file.
2)The file needs to be in a cgi-bin and must have the owner/group as the username who owns the site.
3)The most common chmod permission is 755, the script must have execute permission.
4)The easiest way to figure out script coding problems is to first run the script manually from an ssh prompt.
5)Other errors that would be generated when running the script manually from ssh would be missing perl modules.
6)Cpan is the easiest method to install new perl modules.
Tags: cgi script, Internal Server Error