Http://www.cnblogs.com/melody-emma/p/6026622.html
You are need to modify the permission for Jenkins user so, you can run the shell commands. Can install the Jenkins as as service (download the RPM package), you might need to change the ports because by Defaul T it runs HTTP on 8080 and AJP on 8009 port.
Following process is for CentOS
1. Open up the "This script" (using VIM or other editor):
Vim/etc/sysconfig/jenkins
2. Find this $JENKINS _user and change to "root":
$JENKINS _user= "Root"
3. Then change the ownership of Jenkins home, Webroot and logs:
Chown-r root:root/var/lib/jenins
chown-r root:root/var/cache/jenkins
chown-r root:root/var/log/jenkins
4) Restart Jenkins and check the user has been changed:
Service Jenkins restart
ps-ef | grep Jenkins
Now, you are able to run the Jenkins jobs as the "should" and all the shell command'll be executed as root.