Skip to content

Instantly share code, notes, and snippets.

@porjo
Last active August 29, 2015 14:11
Show Gist options
  • Save porjo/b3b75f36ed9a0b9ec78a to your computer and use it in GitHub Desktop.
Save porjo/b3b75f36ed9a0b9ec78a to your computer and use it in GitHub Desktop.
jenkins build

Root user

    1  iptables -nvxL
    3  systemctl stop firewalld
    4  systemctl disable firewalld
    8  yum install iptables-services.x86_64
    9  systemctl enable iptables.service
   11  systemctl start iptables.service
   13  yum install -y http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm
   14  yum install -y java-1.7.0-openjdk.x86_64 git golang hg sudo dejavu-sans-fonts postgresql93 tcpdump tar bzip2
   15  yum install -y http://mirror.as24220.net/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
   16  yum install -y http://mirror.as24220.net/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
   17  yum install -y redis npm
   18  adduser -M -d /data/jenkins jenkins
   20  vim /etc/ssh/sshd_config 
   21  systemctl restart sshd.service
   24  mkdir /data/jenkins
   28  chown jenkins:jenkins /data/jenkins/
   48  yum install wget
   49  su - jenkins
************************
   51  mv jenkins.service /usr/lib/systemd/system
   52  systemctl enable jenkins
   53  systemctl start jenkins
   56  systemctl enable redis
   57  systemctl start redis
   62  yum install -y postgresql93-server postgis2_93
   63  /usr/pgsql-9.3/bin/postgresql93-setup initdb
   68  systemctl enable postgresql-9.3.service
   69  systemctl start postgresql-9.3.service
   78  su - postgres
   80  vim pg_hba.conf 
   81  systemctl restart postgresql-9.3.service
 229  systemctl stop NetworkManager.service
  230  systemctl disable NetworkManager.service

260  hostnamectl set-hostname dev.pace7.com
276  yum install nginx
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy
288  /usr/bin/openssl req -newkey rsa:2048 -keyout server.key -nodes -x509 -days 3650 -out server.crt
310  systemctl enable nginx
  311  systemctl start nginx
330  chcon --reference=Makefile server.crt
386  setsebool -P httpd_can_network_connect on

vim /etc/hosts <- point pgmaster to localhost

npm install -g bower grunt-cli phantomjs

Jenkins user

    9  tar -xvjf jenkins.tar.bz2 
   10  wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war
   14  rm jenkins.tar.bz2 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment