Tuesday, February 21, 2012

Installing Jenkins-CI integrated to Github

Installing Jenkins-CI integrated to Github

Step 1. Prerequisites.
* Make sure you have root access.
* Jenkins uses java. Make sure you have java installed. Check your java version by:
java -version
If you don't have java, installing it is as easy as pie:
yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel


Step 2. Installing Jenkins
We just have to get the RedHat Jenkins repo and install it via yum like this:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.reposudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.keysudo yum install jenkins
The Jenkins config file is located in /etc/sysconfig/jenkins. You can modify port settings, log directories on the config file by running:
sudo nano /etc/sysconfiig/jenkins
Verify if jenkins has installed properly by invoking its startup script:
sudo /etc/init.d/jenkins start
The server by default will run at port 8080. Setup a virtual host if this doesn't work for you. Stop or restart the server by replacing start with stop/restart.


Step 3. Execute Jenkins
There are two ways to run Jenkins server, either as a stand-alone application, or deployed as a standard web application onto a Java Servlet container or application server such as Tomcat.


java -jar jenkins.war
Access Jenkins by going to http://youserver:8080.

Friday, February 10, 2012

Fix for “convert: no decode delegate for this image format

Fix for “convert: no decode delegate for this image format.

1.identify -list configure

2. check the installed delegates

3. Install missing delegates

4.Go to: http://www.imagemagick.org/download/delegates/ and download the required/missing delegate library.

  1. Execute “gunzip libjpeg-6b.tar.gz”
  2. Execute “tar -xvf libjpeg-6b.tar”
  3. Change directories to the newly created “libjpeg-x”
  4. Execute “./configure”
  5. Execute “make”
  6. Execute “make test”
  7. Execute “make -n install” first to see if the makefile will put the files where you want them.
  8. If there are no errors and you’re ok with the installation path go ahead and install with “make install

Sunday, February 5, 2012

How to Install Linux Malware Detect (LMD)

How to Install Linux Malware Detect (LMD)

Linux Malware Detect (LMD) is a malware scanner for Linux released under the GNU GPLv2 license, that is designed around the threats faced in shared hosted environments. It uses threat data from network edge intrusion detection
systems to extract malware that is actively being used in attacks and generates signatures for detection. In addition, threat data is also derived from user submissions with the LMD checkout feature and from malware community resources. The signatures that LMD uses are MD5 file hashes and HEX pattern matches, they are also easily exported to any number of detection tools such as ClamAV.

On Centos:

    wget http://www.rfxn.com/downloads/maldetect-current.tar.gz
    tar xfz maldetect-current.tar.gz
    cd maldetect-*
    ./install.sh

    Linux Malware Detect v1.3.4
    (C) 1999-2010, R-fx Networks
    (C) 2010, Ryan MacDonald
    inotifywait (C) 2007, Rohan McGovern
    This program may be freely redistributed under the terms of the GNU GPL

    installation completed to /usr/local/maldetect
    config file: /usr/local/maldetect/conf.maldet
    exec file: /usr/local/maldetect/maldet
    exec link: /usr/local/sbin/maldet
    cron.daily: /etc/cron.daily/maldet

    maldet(32517): {sigup} performing signature update check…
    maldet(32517): {sigup} local signature set is version 2010051510029
    maldet(32517): {sigup} latest signature set already installed

Authenticated SMTP with Postfix on CentOS


Authenticated SMTP with Postfix on CentOS.



#yum install postfix system-switch-mail cyrus-imapd cyrus-plain cyrus-md5 cyrus-utils cyrus-sasl cyrus-sasl-plain cyrus-sasl-md5 dovecot.


#vi /etc/postfix/main.cf
      inet_interfaces = all
      relayhost = smtp.*******.com                             
      smtp_sasl_auth_enable = yes
      smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
      smtp_sasl_mechanism_filter = plain, login                  
      smtp_sasl_security_options = noanonymous       

#vi  /etc/postfix/sasl_passwd
  Place the following line to the file : emailserver username:password  (Our email server)

# postmap /etc/postfix/sasl_passwd
  Restart Service.
# /etc/init.d/saslauthd restart
# /etc/init.d/postfix restart

Installing php 5.2+ Installing eAccelerator+ Installing Zend Optimizer


1. Installing php 5.2

# nano /etc/yum.repos.d/CentOS-Testing.repo
and input these code there:

[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*
after installing:
# yum -y install php
That’s all. We have php 5.2 there

2. Installing eAccelerator:


# wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2
# tar fvx eaccelerator-0.9.6.1.tar.bz2
# yum -y install gcc-c++ make php-devel
# cd eaccelerator-0.9.6.1
# phpize
# ./configure && make && make install
# mkdir /var/tmp/eaccelerator
# chmod 777 /var/tmp/eaccelerator
# nano /etc/php.ini
and insert following strings there
[eAccelerator]
eaccelerator.shm_size=”32″
eaccelerator.cache_dir=”/var/tmp/eaccelerator”
eaccelerator.enable=”1″
eaccelerator.optimizer=”1″
eaccelerator.check_mtime=”1″
eaccelerator.debug=”0″
eaccelerator.filter=”"
eaccelerator.shm_max=”0″
eaccelerator.shm_ttl=”3600″
eaccelerator.shm_prune_period=”1800″
eaccelerator.shm_only=”0″
eaccelerator.compress=”1″
eaccelerator.compress_level=”9″
eaccelerator.keys = “shm”
eaccelerator.sessions = “shm”
eaccelerator.content = “shm” [Zend]
zend_extension=/usr/lib64/php/modules/eaccelerator.so
Restart apache and check php:
service httpd restart
php -v

3. Installing Zend Optimizer:

# wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
# tar fvx ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
Copy directory content of ZendOptimizer-3.3.9-linux-glibc23-x86_64 to /etc/zend
Insert following string into php.ini:
zend_extension=/etc/zend/data/5_2_x_comp/ZendOptimizer.so
That’s all falks. I have:
[root@host ~]# php -v
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies