Archive for the 'Linux Support' Category

How can I see all running processes from the shell ?

Use either:

ps -auxww
ps -cef

Unpacking and configuring kvm components

Prerequisites

*kvm-release.tar.gz
*A VT capable Intel processor, or an SVM capable AMD processor

qemu prerequisites:

`zlib` libraries and headers
`SDL` libraries and headers
`alsa` libraries and headers (optional alsa support: disabled by default but can be enabled with –enable-alsa)
`gnutls` libraries and headers (optional VNC TLS support: enabled by default but can be disabled with –disable-vnc-tls)
kernel headers (on Fedora, the kernel-devel package)

On a debian etch system you can install the prerequisites with:

apt-get install gcc libsdl1.2-dev zlib1g-dev libasound2-dev linux-kernel-headers pkg-config libgnutls-dev

If you’re not running a patched kernel:

tar xzf kvm-release.tar.gz
cd kvm-release
./configure –prefix=/usr/local/kvm
make
sudo make install
sudo /sbin/modprobe kvm-intel
# or: sudo /sbin/modprobe kvm-amd

Downloads

http://www.linux-kvm.org/page/Downloads

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

SBDavid

Moving /var/lib/mysql

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:

rm -rf mysql_old

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”

« Prev - Next »