work:springboarddevvm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| work:springboarddevvm [2012/04/26 13:54] – 193.130.68.17 | work:springboarddevvm [2012/04/26 14:08] (current) – 193.130.68.17 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | =====HISTORY - Set-up for Springboard development===== | ||
| + | |||
| + | ===19/ | ||
| + | |||
| + | Ignore the basic Centos set-up (and subsequent switch to X Windows desktop)... | ||
| + | |||
| + | Disable SELinux: | ||
| + | < | ||
| + | # vi / | ||
| + | ... | ||
| + | SELINUX=permissive | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Then, reboot and check | ||
| + | |||
| + | < | ||
| + | # sestatus | ||
| + | SELinux status: | ||
| + | SELinuxfs mount: | ||
| + | Current mode: | ||
| + | Mode from config file: permissive | ||
| + | Policy version: | ||
| + | Policy from config file: targeted | ||
| + | </ | ||
| + | |||
| + | Create jtadmin account: | ||
| + | < | ||
| + | # useradd jtadmin | ||
| + | # passwd jtadmin | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Grant jtadmin full sudo access: | ||
| + | < | ||
| + | # visudo | ||
| + | ... | ||
| + | jtadmin ALL=(ALL) | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Need to install basic software (httpd already installed via yum): | ||
| + | |||
| + | Java: | ||
| + | Download JDK and set-up... | ||
| + | < | ||
| + | # cd /usr/local | ||
| + | # chmod 755 jdk-6u31-linux-i586.bin | ||
| + | # ./ | ||
| + | ... | ||
| + | # ln -s / | ||
| + | </ | ||
| + | |||
| + | Ant: | ||
| + | Download and set-up... | ||
| + | < | ||
| + | # tar -zxf apache-ant-1.8.3-bin.tar.gz | ||
| + | # ln -s / | ||
| + | </ | ||
| + | |||
| + | Tomcat: | ||
| + | Download and set-up... | ||
| + | < | ||
| + | # tar -zxf apache-tomcat-5.5.35.tar.gz | ||
| + | # chown -R jtadmin.jtadmin apache-tomcat-5.5.35/ | ||
| + | # ln -s / | ||
| + | </ | ||
| + | |||
| + | MySQL: | ||
| + | Default version for Centos 6.2 is 5.1, but this has had issues with Hibernate | ||
| + | and Springboard - so will try to install 5.0 manually for now. | ||
| + | Ensure any other versions are uninstalled first... | ||
| + | < | ||
| + | # yum list mysql* | ||
| + | ... | ||
| + | # rpm -ivh MySQL-server-5.0.96-1.glibc23.i386.rpm \ | ||
| + | > MySQL-client-5.0.96-1.glibc23.i386.rpm \ | ||
| + | > MySQL-shared-5.0.96-1.glibc23.i386.rpm | ||
| + | |||
| + | #/ | ||
| + | ... (root/ | ||
| + | </ | ||
| + | |||
| + | MySQL is running as a service by default. | ||
| + | |||
| + | CVS: | ||
| + | < | ||
| + | # yum install cvs | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | NTP: | ||
| + | Installed by default - but not running as a service... | ||
| + | < | ||
| + | # chkconfig --level 345 ntpd on | ||
| + | # chkconfig --list|grep ntp | ||
| + | ntpd | ||
| + | ntpdate | ||
| + | # service ntpd start | ||
| + | Starting ntpd: | ||
| + | </ | ||
| + | |||
| + | SAMBA: | ||
| + | < | ||
| + | # yum install samba samba-common samba-winbind | ||
| + | ... | ||
| + | # cd /etc/samba/ | ||
| + | # cp smb.conf smb.conf.000 | ||
| + | # vi smb.conf | ||
| + | [global] | ||
| + | workgroup-wiley.com | ||
| + | security=USER | ||
| + | |||
| + | [centos6] | ||
| + | path=/ | ||
| + | guest ok=yes | ||
| + | read only=no | ||
| + | create mask=0644 | ||
| + | |||
| + | # chkconfig --level 345 smb on | ||
| + | # chkconfig --level 345 nmb on | ||
| + | # service smb start | ||
| + | ... | ||
| + | # service nmb start | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | DON'T NEED nmb running - but do need to set-up smb user for jtadmin: | ||
| + | < | ||
| + | # smbpasswd -a jtadmin | ||
| + | ... | ||
| + | |||
| + | # chkconfig --list|grep smb | ||
| + | smb 0: | ||
| + | # chkconfig --list|grep nmb | ||
| + | nmb 0: | ||
| + | </ | ||
| + | |||
| + | Update jtadmin profile - then switch to jtadmin user: | ||
| + | < | ||
| + | $ vi .bash_profile | ||
| + | # .bash_profile | ||
| + | |||
| + | # Get the aliases and functions | ||
| + | if [ -f ~/.bashrc ]; then | ||
| + | . ~/.bashrc | ||
| + | fi | ||
| + | |||
| + | # User specific environment and startup programs | ||
| + | |||
| + | export JAVA_HOME=/ | ||
| + | export ANT_HOME=/ | ||
| + | export PATH=$PATH: | ||
| + | </ | ||
| + | |||
| + | Check as ~jtadmin... | ||
| + | < | ||
| + | $ java -version | ||
| + | java version " | ||
| + | Java(TM) SE Runtime Environment (build 1.6.0_31-b04) | ||
| + | Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing) | ||
| + | $ ant -version | ||
| + | Apache Ant(TM) version 1.8.3 compiled on February 26 2012 | ||
| + | </ | ||
| + | |||
| + | NOTE: Also need to disable firewall (iptables) which appears to be enabled by | ||
| + | default. | ||
| + | |||
| + | < | ||
| + | # yum install system-config-firewall | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Then disable the firewall via the installed GUI. | ||
| + | |||
| + | |||
| + | LATE NOTES: | ||
| + | |||
| + | Have disabled SELinux for now (though probably didn't need to - as the Apache | ||
| + | issue below wasn't about SELinux). | ||
| + | |||
| + | |||
| + | |||
| + | ===Set-up ~jtadmin environment...=== | ||
| + | |||
| + | < | ||
| + | $ vi ~/ | ||
| + | . ~jtadmin/ | ||
| + | . ~jtadmin/ | ||
| + | $ chmod 755 springboard.env | ||
| + | </ | ||
| + | |||
| + | Add this script to bash profile... | ||
| + | |||
| + | < | ||
| + | $ vi ~/ | ||
| + | # Java (also appears in ~/ | ||
| + | #export JAVA_HOME=/ | ||
| + | #export ANT_HOME=/ | ||
| + | #export PATH=$PATH: | ||
| + | export JRE_HOME=$JAVA_HOME/ | ||
| + | |||
| + | # Tomcat | ||
| + | export CATALINA_HOME=/ | ||
| + | export CATALINA_BASE=$CATALINA_HOME | ||
| + | export CATALINA_PID=$CATALINA_BASE/ | ||
| + | export CATALINA_OPTS=' | ||
| + | -Dspringboard.inst.name=local | ||
| + | -Dspringboard.base.dir=/ | ||
| + | -Dspringboard.data.dir=/ | ||
| + | -Duser.language=en | ||
| + | -Duser.country=GB | ||
| + | -Dfile.encoding=UTF-8 | ||
| + | -Dcom.sun.management.jmxremote | ||
| + | -Dcom.sun.management.jmxremote.port=8010 | ||
| + | -Dcom.sun.management.jmxremote.ssl=false | ||
| + | -Dcom.sun.management.jmxremote.authenticate=false ' | ||
| + | |||
| + | export JPDA_ADDRESS=8787 | ||
| + | export JPDA_TRANSPORT=dt_socket | ||
| + | export SPRINGBOARD_DIST=http:// | ||
| + | export SPRINGBOARD_HOME=/ | ||
| + | export SPRINGBOARD_DATA=/ | ||
| + | export CVSSERVER=172.20.0.216 | ||
| + | export DISABLE_UPDATES=0 | ||
| + | export PS1=' | ||
| + | |||
| + | $ chmod 755 system.env | ||
| + | |||
| + | $ vi ~/user.env | ||
| + | export CVSROOT=: | ||
| + | export DISABLE_UPDATES=1 | ||
| + | export HOLDING= | ||
| + | $ chmod 755 user.env | ||
| + | </ | ||
| + | |||
| + | Create basic directories, | ||
| + | < | ||
| + | $ mkdir ~/projects | ||
| + | $ mkdir ~/ | ||
| + | |||
| + | $ vi ~/ | ||
| + | # build properties | ||
| + | jboss.home=${env.SPRINGBOARD_HOME} | ||
| + | dev.root.dir=/ | ||
| + | static-web.dir=${env.SPRINGBOARD_HOME}/ | ||
| + | local.httpd.port=80 | ||
| + | |||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | build.override.type=aw | ||
| + | junit.outputtofile=yes | ||
| + | junit-report.dir=/ | ||
| + | junit.format=xml | ||
| + | javac.source.version=1.6 | ||
| + | javac.target.version=1.6 | ||
| + | |||
| + | $ vi / | ||
| + | ... | ||
| + | $ vi / | ||
| + | ... | ||
| + | |||
| + | $ sudo cp ~/ | ||
| + | $ sudo cp / | ||
| + | $ sudo cp ~/ | ||
| + | |||
| + | $ cvs checkout build | ||
| + | $ cvs checkout Fulcrum | ||
| + | $ cvs checkout libs | ||
| + | $ cvs checkout Springboard | ||
| + | $ cvs checkout SpringboardCommon | ||
| + | $ cvs checkout SpringboardWebApp | ||
| + | </ | ||
| + | |||
| + | Will work thorough a copy of the clean script... | ||
| + | < | ||
| + | $ cp projects/ | ||
| + | </ | ||
| + | |||
| + | Run database scripts... | ||
| + | < | ||
| + | $ mysql --default-character-set=utf8 -u root -ppassword < / | ||
| + | $ mysql springboard --default-character-set=utf8 -u root -ppassword < / | ||
| + | $ mysql springboard --default-character-set=utf8 -u root -ppassword < / | ||
| + | $ mysql springboard --default-character-set=utf8 -u root -ppassword < / | ||
| + | $ mysql springboard --default-character-set=utf8 -u root -ppassword < / | ||
| + | </ | ||
| + | |||
| + | All OK - but note... | ||
| + | < | ||
| + | # Should not include database in use for first script | ||
| + | # Also have issue with nagios user, could update SQL to include | ||
| + | # GRANT USAGE ON *.* TO ' | ||
| + | # before DROP USER | ||
| + | # | ||
| + | # Script also expects user springboard to already exist... | ||
| + | # grant all privileges on *.* to " | ||
| + | </ | ||
| + | |||
| + | Ensure correct folders and symlinks exist... | ||
| + | < | ||
| + | $ mkdir --parents $SPRINGBOARD_HOME/ | ||
| + | $ mkdir --parents $SPRINGBOARD_HOME/ | ||
| + | $ mkdir --parents $SPRINGBOARD_HOME/ | ||
| + | $ mkdir --parents $SPRINGBOARD_HOME/ | ||
| + | $ mkdir --parents $SPRINGBOARD_HOME/ | ||
| + | $ mkdir --parents $SPRINGBOARD_DATA/ | ||
| + | |||
| + | $ ln -s /var/run ~jtadmin/ | ||
| + | $ ln -s / | ||
| + | $ ln -s / | ||
| + | $ ln -s / | ||
| + | $ ln -s $SPRINGBOARD_HOME/ | ||
| + | $ ln -s $SPRINGBOARD_HOME/ | ||
| + | $ ln -s $SPRINGBOARD_HOME/ | ||
| + | $ ln -s $SPRINGBOARD_HOME/ | ||
| + | $ ln -s $SPRINGBOARD_HOME/ | ||
| + | $ ln -s $SPRINGBOARD_HOME/ | ||
| + | $ ln -s $SPRINGBOARD_HOME/ | ||
| + | $ ln -s $SPRINGBOARD_HOME/ | ||
| + | $ ln -s $SPRINGBOARD_DATA/ | ||
| + | </ | ||
| + | |||
| + | Add Solr... | ||
| + | < | ||
| + | $ cd $SPRINGBOARD_HOME | ||
| + | $ curl -O http:// | ||
| + | ... | ||
| + | $ ln -s $SPRINGBOARD_HOME/ | ||
| + | </ | ||
| + | |||
| + | Build springboard-all | ||
| + | |||
| + | Apache conf issues?? | ||
| + | Some modules missing on Centos 6 so removed from config... | ||
| + | < | ||
| + | #LoadModule file_cache_module modules/ | ||
| + | #LoadModule mem_cache_module modules/ | ||
| + | </ | ||
| + | |||
| + | Also log folder needs changing as default config runs Apache as jtadmin... | ||
| + | < | ||
| + | # chown jtadmin.jtadmin / | ||
| + | </ | ||
| + | |||
| + | Needs cronolog install/ | ||
| + | < | ||
| + | $ curl -LO http:// | ||
| + | # rpm --import http:// | ||
| + | # rpm -K ~jtadmin/ | ||
| + | # rpm -ivh ~jtadmin/ | ||
| + | |||
| + | # yum install cronolog | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Springboard expects a different cronolog location... | ||
| + | < | ||
| + | # ln -s / | ||
| + | </ | ||
| + | |||
| + | Also the previous PID file location stopped Apache restarting properly - have | ||
| + | changed this to... | ||
| + | < | ||
| + | PidFile / | ||
| + | </ | ||
| + | |||
| + | Start Apache... | ||
| + | < | ||
| + | $ sudo service httpd restart | ||
| + | </ | ||
| + | |||
| + | Tomcat config: | ||
| + | < | ||
| + | $ cp / | ||
| + | $ vi / | ||
| + | ... | ||
| + | shared.loader=${catalina.base}/ | ||
| + | ... | ||
| + | |||
| + | $ cp / | ||
| + | $ vi / | ||
| + | ... | ||
| + | <Server port=" | ||
| + | ... | ||
| + | <!-- Define an AJP 1.3 Connector on port 8009 --> | ||
| + | < | ||
| + | | ||
| + | ... | ||
| + | <Engine name=" | ||
| + | ... | ||
| + | <Host name=" | ||
| + | | ||
| + | | ||
| + | ... | ||
| + | |||
| + | $ cp / | ||
| + | $ vi / | ||
| + | ... | ||
| + | < | ||
| + | <role rolename=" | ||
| + | <role rolename=" | ||
| + | <role rolename=" | ||
| + | |||
| + | <user name=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Context config appears to have been deployed in the build... | ||
| + | < | ||
| + | $ ls -l / | ||
| + | total 16 | ||
| + | -rw-rw-r--. 1 jtadmin jtadmin | ||
| + | -rw-------. 1 jtadmin jtadmin 1148 Jan 6 19:21 host-manager.xml | ||
| + | -rw-------. 1 jtadmin jtadmin 1303 Jan 6 19:21 manager.xml | ||
| + | -rw-rw-r--. 1 jtadmin jtadmin | ||
| + | </ | ||
| + | |||
| + | Needs local host name set-up | ||
| + | < | ||
| + | # vi /etc/hosts | ||
| + | 127.0.0.1 | ||
| + | |||
| + | $ / | ||
| + | </ | ||
| + | |||
| + | Seems to work... | ||
| + | |||
| + | Try project (AFT)... | ||
| + | < | ||
| + | $ ./wbuild.sh aft checkout | ||
| + | ... | ||
| + | $ ./wbuild.sh aft deploy | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | restart... | ||
| + | |||
| + | Cool! | ||
| + | |||
| + | |||
| + | ===TODO:=== | ||
| + | |||
| + | - SAMBA! | ||
| + | - Scripted set-up? | ||
