eski sistem ise yaramiyor
depreciated 😀

yeni sistem su


for semid in `ipcs -s | grep apache | cut -f2 -d" "`; do ipcrm -s $semid; done

aciklamasi su sekilde

On a cPanel dedicated server, apache server failed to start. So, while checking the apache logs found this:

==> /usr/local/apache/logs/error_log <== [Sat Dec 20 01:12:27 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec) [Sat Dec 20 01:12:27 2008] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Sat Dec 20 01:12:27 2008] [emerg] (28)No space left on device: Couldn't create accept lock Solution: First of all make sure your server is not out of space. This can be checked with the command: root# df –h Now, to check how many semaphores are currently in use the command is: root# ipcs -s When the apache (httpd) is stopped, to kill the semaphores ID the command is: root# ipcrm –s

To kill all the semaphores ID , you can achieve this by doing it in a for loop, the command is:

root# for semid in `ipcs -s | grep nobody | cut -f2 -d” “`; do ipcrm -s $semid; done

Note: “nobody” is apache user.

Now start apache with the command:

root# service httpd restart

This has fixed the issue for us.

howtoforge adresinde gordum
cok kolay yapiliyor klonlama isi
unutmamak icin burayada yazayim.

Ghosting The Machine

This is a short but potentially extremely handy guide to ghosting one Linux box to another (or simply making a full backup of a desktop/server). Credit goes to ‘topdog’ for this.

You might have a small office where you customise one desktop just how you like it and need to roll this out to N other PC’s or simply want a backup of a server or desktop to another machine or even to an image file.

The main tool here is netcat which is extremely powerful and has a multitude of other great uses that won’t be covered here.

Target Machine:

** Boot to linux rescue mode with networking (CentOS works fine)

Initiate netcat to listen on port 30 – # nc -l -p | dd of=/dev/sda (assuming the hard drive is sda and not hda):

# nc -l -p 30 | dd of=/dev/sda

Source Machine:

Dump the contents of the disk to the target PC – #dd if=/dev/sda | nc

# dd if=/dev/sda | nc 192.168.0.20 30

Then to check that traffic is flowing, on the source go to another terminal (ALT/F2) and dump the tcp data on the NIC (assuming it’s eth0):

tcpdump -tnli eth0 port 30

If you just want a backup image you could change the above output on the taget to:

# nc -l -p 30 | dd of=mybackup.img

That’s it. Naturally the target PC/disk cannot be smaller than the source:) I hope this saves someone a lot of time.

 

REQUIRED module missing: Archive::Tar
REQUIRED module missing: IO::Zlib
optional module missing: Digest::SHA
optional module missing: Mail::SPF
optional module missing: IP::Country
optional module missing: Razor2
optional module missing: Net::Ident
optional module missing: IO::Socket::INET6
optional module missing: Mail::DKIM
optional module missing: Encode::Detect

perl -MCPAN -e ‘install Archive::Tar’
perl -MCPAN -e ‘install IO::Zlib’
perl -MCPAN -e ‘install Digest::SHA’
perl -MCPAN -e ‘install Mail::SPF’
perl -MCPAN -e ‘install IP::Country’
perl -MCPAN -e ‘install Razor2’
perl -MCPAN -e ‘install Net::Ident’
perl -MCPAN -e ‘install IO::Socket::INET6’
perl -MCPAN -e ‘install Mail::DKIM’
perl -MCPAN -e ‘install Encode::Detect’

 

 

NOT: daha gunceli iyisi tek tek ugrasmaktansa

 

 

1- cd /usr/local/directadmin/scripts
./spam.sh

kurmicak hata vericek
cikanlara no demeyi unutma

2- PERL_MM_USE_DEFAULT=1 cpan -i Archive::Tar Digest::SHA Mail::SPF IP::Country Net::Ident IO::Socket::INET6 Compress::Zlib Mail::DKIM LWP::UserAgent HTTP::Date Encode::Detect ExtUtils::MakeMaker

and then run the spam.sh again.

3- Are you ready for manual configuration? [yes] no

4- /usr/bin/spamd -d -c -m 15
calistir bitti