Started my first attempt at building Jenkins2 with my desktop VirtualBox. Steps:
- Created a new Ubuntu 64-bit VM with 2GB of RAM and an expanding 25GB HD.
- Booted and installed from a downloaded 64-bit PC (AMD64) server install CD ISO.
- Let the installer determine the partitioning (it used LVM and created three partitions).
- ERRONEOUSLY chose the "Tomcat Java Server" option to start with. Note that this is not necessary; in fact Tomcat gets in the way, and I had to uninstall it later.
- Rebooted after install, did updates, and then installed
curl
. - Downloaded and installed the Oracle JDK (downloaded it locally, put it on a server, and curled it to the VM). NOTE: There are Sun Java packages in the repos, I think; it would probably be better to install them, but I couldn't quite figure out how and I was in a rush. I think I could have done
sudo apt-get install sun-java6-jre
andsudo apt-get install sun-java6-jdk
. - Created
/usr/local/java
, copied the JDK binary there, made it executable and executed it. - Added the following to
/etc/profile
:JAVA_HOME=/usr/local/java/jdk1.6.0_25
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
- Configured Java through update-alternatives:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.6.0_25/bin/java" 1
sudo update-alternatives --set java /usr/local/java/jre1.6.0_25/bin/java
- Rebooted and tested with
java -version
that the JDK is now default the Java VM. - Tried to do waiting updates with apt-get, but they were held back, so did them with aptitude. Why is this necessary?
- Couldn't find Tomcat, so did
sudo apt-get install tomcat6
, and installed it. This seemed to update theopenjdk
too, but it didn't mess with the configuration of the Oracle Java. - After reading around a bit, I decided I'd rather use Tomcat7, so I created
/usr/local/apache-tomcat-7.0.12
, and usedwget
to download thetar.gz
file, and then didtar xvzf
to unwrap it. - Added my usual
utf8_startup.sh
. - Ran Tomcat and confirmed it was working by curling
127.0.0.1:8080
.
Next I wanted to find a convenient way to access the VM's Tomcat from the host, so I ran this in a terminal on the host, after shutting down the vm:
VBoxManage modifyvm "Jenkins2" --natpf1 "tomcat,tcp,,9090,,8080"
This should set up port forwarding between the host desktop port 9090
and the Tomcat running on port 8080
in the VM.
The port-forwarding worked like a charm, but in the process I discovered that Tomcat 6 is set to run as a service. So I have Tomcat 7 available, but I'll stick with Tomcat 6 from the repos for the moment, unless I find a reason to abandon it.
NOTE: All of the Tomcat stuff was unnecessary, but the Sun/Oracle Java is required.
- Added the Jenkins key and repo as explained here, and installed Jenkins.
- Having done that, I realized that it's actually starting by itself on port
8080
; it doesn't need to run inside Tomcat. So I edited its script in /etc/init.d/jenkins to add this to the arguments:--httpPort=8081
. This should make it start on 8081 and not conflict with Tomcat. - Then I shut down the VM and ran this on the host:
VBoxManage modifyvm "Jenkins2" --natpf1 "jenkins,tcp,,9091,,8081"
which should let me see Jenkins on 9091 on the host, without having to turn off Tomcat for the moment. However, in future, we should probably just leave Tomcat out of it. - Despite my re-configuration, Jenkins kept trying to start on
8080
. Meanwhile, I got sick of the limited terminal available in the headless vm, so I didsudo apt-get install openssh
, and tested it, then shut down the VM and ran this:VBoxManage modifyvm "Jenkins2" --natpf1 "guestssh,tcp,,2222,,22"
ssh -l hcmc -p 2222 localhost
which means I can easily copy/paste from browsers, use a larger terminal, etc. - So then I went back and got rid of Tomcat (
sudo apt-get remove --purge tomcat6
), and then copied my backup of the/etc/init.d/jenkins
back over the edited one to remove the attempt to reconfigure thehttpPort
. Then a restart gave me.... A WORKING JENKINS on port8080
.
Next, install texlive
and friends:
- In the user's home directory,
mkdir texlive
, thencd texlive
andwget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
. tar xvfz install-to-unx.tar.gz
cd install.....
sudo ./install-tl
Texlive installed. Then I had to do sudo apt-get install subversion
, because I'll be needing that.
Next, I followed my own instructions to get TEI installed.
Then in trunk/P5 I did make dependencies
, and then sudo apt-get install
[the list of dependencies].
However, an attempt to build P5 failed:
make Checking you have running XML tools and Perl before trying to run transform... Perl:/usr/bin/perl xmllint:make: *** [check.stamp] Error 1
Turns out xmllint is in libxml2-utils, so had to sudo apt-get install libxml2-utils
. Now a make is proceeding as expected.
Next, I wanted to do some cleanup -- on login, there was a message to the effect that there were packages available for upgrade, but the message was wrong (see discussion here). So I did sudo rm /etc/motd.tail
.
Next, I tried make pdf
, which is one of the targets that failed for me on my desktop due to the absence of TeXLive 2010. It failed again for the same reason; although I've installed TeXLive 2010, the system has at least one symbolic link (from /usr/bin/xelatex
to /usr/bin/xetex
) which are from the old Debian 2009 Tex package.
So the instruction on the TEI wiki page for installing packages, which includes texlive, is wrong; that shouldn't be installed. I've now removed it (sudo apt-get remove texlive
). Then I added the install location of the 2010 to my path, by doing sudo nano /etc/profile
, and adding PATH=$PATH:/usr/local/texlive/2010/bin/x86_64-linux
to it.
Then I tried make pdf
again, and got the same error, so it's not caused by the texlive version after all. Although the error message suggests that the error is caused by a space in a font name, I think it's actually caused by the absence of the font. Reported this to SR, who modified the source so that the Minion Pro and Myriad Pro fonts are no longer required (they're proprietary anyway). Now I can build a PDF, but I'm still getting an error at the end.
Looking in job$.log (after deleting it, and re-running the make pdf to be sure it's fresh), I see that it still starts with this:
hcmc@Jenkins2:~/tei/trunk/P5$ more job\$.log kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro/B', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro/I', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro/BI', contains ' ' kpathsea: Invalid fontname `Myriad Pro:', contains ' '
The rest of the file consists mainly of
** WARNING ** Failed to convert input string to UTF16...
but there are two more Myriad Pro errors towards the end, and finally there's this:
kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A/B', contains ' ' kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A/I', contains ' ' kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A/BI', contains ' ' kpathsea: Invalid fontname `HAN NOM A:', contains ' '
with lots more instances of the same thing. So I suspect there are still references to Myriad Pro in the code, and there's also this other font, which I've never heard of. It doesn't seem to be available in the repos either, as far as I can tell (there's no ttf-hannom, although Arch Linux seems to have one). Waiting to hear from SR where he got it from.