El procedimiento normal para instalar el paquete mycrypt se encuentra en este enlace
https://www.cneris.com/es/blog/administracion-de-sistemas/item/57-instalar-mcrypt-en-centos
Pero a veces, por problemas de compatibilidad entre diferentes versiones, puede dar error, como el siguiente:
Al instalar mcrypt en Centos, siguiendo las siguientes órdenes
1. yum install epel-release
2. yum install php-mcrypt
Shell devuelve el siguiente error.
APC es una herramienta Open Source para cachear el código PHP (Alternative PHP Cache)
Para instalar la extensión APC en CentOS, hay que seguir los siguientes pasos
1) Instalar las dependencias de la extensión
yum install php-pear php-devel httpd-devel pcre-devel gcc make -y
2) Instalar la extensión APC con yum
yum install php-pecl-apc -y
3) Habilitar la extensión
echo "extension=apc.so" > /etc/php.d/apc.ini
4) Reiniciar el servicio httpd
sudo service httpd restart
Para instalar mcrypt en Centos, hay que seguir los siguientes pasos.
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
sudo yum update
sudo yum install php-mcrypt*
Editar el fichero mcrypt.ini y agregar la siguiente línea
sudo nano /etc/php.d/mcrypt.ini
extension=/usr/lib64/php/modules/mcrypt.so
sudo service httpd restart
Matar el proceso a pelo, no ayuda mucho. Lo recomendable sería tracear el problema para ver el origen del incidente
kill -TERM 17757
kill -STOP 17757
Paso siguiente sería inspeccionar el proceso
ls -al /proc/17757/
cat /proc/17757/cmdline
Para ver cómo ha arrancado el proceso, se puedo probar con la siguiente orden
ls -la /proc/17757/fd
Que te informará si hay ficheros abiertos por el proceso
También puedes examinar lo que está haciendo el proceso, mediante
strace -p 17757
En Centos, hay que seguir los siguientes pasos para instalar SPAMASSASSIN
## screen -U -S spamc-screen
## yum update
## yum install spamassassin
## groupadd spamfilter
## useradd -g spamfilter -s /bin/false -d /usr/local/spamassassin spamfilter
## chown spamfilter: /usr/local/spamassassin
Ahora toca configurar SPAMASSASSIN
## vim /etc/mail/spamassassin/local.cf
## Required_hits: This determines the filter balance; the lower the score the more aggressive the filter.
# A setting of 5.0 is generally effective for a small organisation or a single user.
# Adjust the strictness score to your organization's needs - a large medical organisation might want to let email items
# through that are trying to sell pharmaceuticals, so we might increase the level to a more modest 8.0.
required_hits 5
## Report_safe: This line determines whether to delete the item or to move the item to the inbox whilst appending
# a spam notice to the subject line. The levels for this line are set to either a 1 or 0. A score of 1 will delete the spam item,
# whereas a score of 0 will send the item to the inbox and rewrite the subject line.
report_safe 0
rewrite_header Subject [**SPAM**]
## Required_score: This line sets the spam score for all email allowed through to your domain, with levels of certainty set from 0 to 5.
# Zero would be classified as a legitimate email item, whereas 5 would be an definite 'SPAM' item. If we set the score to 3 we would catch a
# lot of unsolicited emails but quite a few false positives would still get through. For our example email server we will use the score of 5,
# but you can of course set this value according to your preference.
required_score 5.0
## vim /etc/sysconfig/spamassassin
Agregar lo siguiente
SAHOME="/usr/local/spamassassin"
SPID_DIR="/var/run/spamassassin"
SUSER="spamfilter"
SPAMDOPTIONS="-d -c -m5 --username ${SUSER} -H ${SAHOME} -s ${SAHOME}/spamfilter.log"
## service spamassassin start
## chkconfig spamassassin on
AHORA HAY QUE CONFIGURAR POSTFIX
## vim /etc/postfix/master.cf
Agregar las siguientes líneas en el fichero.
smtp inet n - n - - smtpd -o content_filter=spamassassin
spamassassin unix - n n - - pipe user=spamfilter argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
Y luego reiniciar postfix
## service postfix restart
CNERIS es una empresa constituida por jóvenes emprendedores procedentes de diferentes sectores del mundo de la información. Nuestro equipo está compuesto por programadores, administradores de sistemas, administradores de base de datos, diseñadores gráficos, maquetadores,