Building and Installing Xen 4.3 in Fedora 11
This is just one of those things where all the pieces aren’t in one place for and I spent way too long trying to get it to work properly, and now I must share. I have some hardware at the office that requires a newish kernel to not crash and burn due to TCP offloading, and some other things, so here goes:
- Be certain you have dev tools installed: ‘yum install “Development Tools”‘
- You’ll also need: ‘yum install mercurial gitk dev86 vnc-server bridge-utils zlib-devel openssl-devel python-devel libX11-devel ncurses-devel’
Build / Install Xen
- cd /usr/src
- hg clone http://xenbits.xensource.com/xen-3.4-testing.hg
- cd xen-3.4-testing.hg
- make xen
- make install-xen
- make tools
- make install-tools
Build PV Ops Kernel
- cd /usr/src/kernels
- git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
- cd linux-2.6-xen
- git checkout origin/xen-tip/master -b xen-tip/master
- make menuconfig (Check the Xen options, I’m too tired to go over them all)
- make
- make modules_install install
Create a Grub Entry:
title Xen 3.4 / Fedora kernel 2.6.30-rc6-tip kernel /boot/xen-3.4.gz module /boot/vmlinuz-2.6.30-rc6-tip root=/dev/mapper/VolGroup01/vg_fedora11 ro module /boot/initrd-2.6.30-rc6-tip.img
Add Entry to /etc/fstab
none /proc/xen xenfs defaults 0 0
Reboot and there ya go…
I still need to bring up the python tools like virt-install and virsh, maybe after I get a break.
No commentsAPEX in Oracle XE
Oracle XE has a bundled version of Oracle’s Application Express (APEX), which you may or may not find useful. Currently, XE ships with APEX 2.1, and the current version of APEX is 3.2. 3.2 is a complete overhaul of the APEX interface and offers a lot of features 2.1 does not, but installing it can be a PITA. 2.1 is Geocities circa 1998, 3.2 resembles something modern.
Make a backup.
Make sure your user is in the DBA group.
Check your ORACLE_HOME and ORACLE_SID env variables. If sqlplus works, they should work.
Download the latest APEX.
Ignore the upgrade docs on Oracle’s site, they don’t work. Follow the gist of this instead:
mike@krog$ pwd /home/mike/Oracle/ mike@krog$ unzip apex_3.2.zip -- SCROLLING STUFF HERE -- mike@krog$ cd apex mike@krog$ sqlplus / as sysdba SQL> @apexins SYSAUX SYSAUX TEMP /i/ -- LOTS MORE SCROLLING STUFF -- @apxldimg.sql /home/mike/Oracle -- SLIGHTLY LESS SCROLLING THAN LAST TIME -- @apxxepwd.sql mikeisdelicious ^D
Also, keep in mind, that somewhere during all that scrolly stuff this appeared:
Thank you for installing Oracle Application Express. Oracle Application Express is installed in the APEX_030200 schema. The structure of the link to the Application Express administration services is as follows: http://host:port/pls/apex/apex_admin (Oracle HTTP Server with mod_plsql) http://host:port/apex/apex_admin (Oracle XML DB HTTP listener with the embedded PL/SQL gateway) The structure of the link to the Application Express development interface is as follows: http://host:port/pls/apex (Oracle HTTP Server with mod_plsql) http://host:port/apex (Oracle XML DB HTTP listener with the embedded PL/SQL gateway)
It just means that your SYSTEM user now logs into http://host:port/apex/apex_admin for configuration, user adds, etc. now and the schema users login to the same place they always did with the exception that they’ll now be asked for their Workspace as well. A user’s workspace name for users existing prior to upgrade will be the same as their login.
Also note, you don’t login with SYSTEM anymore. You log in to the admin interface with the login “admin” and the password you specified after running @apxxepwd.sql, which if you followed my directions is mikeisdelicious. You fell for it, didn’t you? You’ll be required to reset it to strong password requirements after your initial login.
Tada, now you have a shiny Oracle XE with an upgraded APEX.
mike@krog$
The Five Items of my Sysadmin Warchest
I’ve been sitting on this post for a long time, but thought I’d give it a go today as I’ve been working on some more generic type tasks that would apply outside of my own work environment. These seven things are apps I keep on my laptop to keep it the ultimate fire-fighting machine. Currently, my laptop runs Ubuntu, but most of these applications will run on any platform. While I find many things useful throughout the day, and there are many different applications and systems to use, I’m going to try and focus on portable swiss army knives and abstain from things requiring permanent installations or their own machine. I think that perhaps this list might be of usefulness to people just starting out in the trade as well as the old timer.
So, in no particular order…
Git Version Control
So maybe you don’t do a lot of scripting or coding. Maybe you don’t do any at all. Why would you need version control? The short answer is in the question of “How many times have you made a minor configuration change and wondered how and why it got that way a year down the road?”. The long answer you’ll only find yourself after putting such a system into use. About everything I make a change to gets copied locally and committed into a git repo. Here’s a the rundown of the workflow:
- Copy the file, or the text of the file (say, a crontab entry) to a local file.
- Add it to git with “git add filename.ext”
- Commit to the git repo with an explination as to what it is: git commit -m ‘Adding crontab for oracle user from sys01-db’
- Make the change locally.
- Recommit to git: git commit -a -m ‘made the change for backup periods’
- Do the minor change on the target system.
Now, all your changes, times, and reasons are logged in the git repo. One thing to notice — I keep using the words “minor change”. To translate, you should really find better ways to push configurations that are bigger than small stuff, like the use of packaging and deployment systems. You should probably commit those to version control too.
Now that you’ve got this file of all the things you’ve done, you can trade with your friends! Say a cohort on the other side of the country works with the same system you do. You can use git to prepare an email with a patch of the change that was made without other tools. After you get to using the system for a while, you’ll find all sorts of social ways of sharing the things you’ve done, most of which, are more useful than the personal archive you’ve kept.
Don’t like git for some reason? Try another distributed version control system like mercurial or bzr. They both have their advantages, and I’ve been on the bandwagon for both of them at one time or another.
And the last note: this is absolutely not a replacement for a good backup system. At ALL. Under no circumstances.
A Really Good Editor
Undoubtably, you’re typing a lot. You’re probably repeating things you type a lot. We’re talking text here, not a word processor, not emails. Here are some good things to look for in a text editor:
- Syntax highlighting. If you’re working on a apache config, make things that are particular to that config stand out for different reasons.
- A right margin. No really. Lines that go out over 80 characters can be a total pain on a terminal later.
- Auto-completion or snippets. Typing in a abbreviation and hitting tab as a shortcut for longer text.
- Syntax checking. Missed a closing bracket? Wonder where that closing bracket starts? Click to find out!
Over the years I’ve gone pretty deep with my editors of choice. vi and emacs both do the things above and there’s loads of plugins to accomplish things in them, but here are some of my favorites that I use these days:
- Netbeans. Yup, as an editor. It may be a bit heavy for most work loads, but I find a lot of its features invaluable. Crossplatform.
- Textmate. If you’re on a Mac, this is the way to go. I bought it a few years back and feel like I’m ripping the author off for everything I’ve gotten out of it. It’s everything it needs to be and nothing it doesn’t. I hear good things about the E Text Editor on Windows, which supports Textmate bundles, but I haven’t used it (Windows or the Editor).
- Gedit. The official editor of Gnome. Also a crossplatform tool, I use this in a lot of cases when I don’t feel like loading up the full Netbeans app. It’s pretty useful out of the box, but after you add a few plugins, it becomes amazing. Combined with the rest of Gnome on a *NIX box, it can get pretty out there with options, like editing of remote files, etc.
A Scripting Language That Thinks the Way You Do
If there was a real motivation to writing this post, it’s this right here. Ruby. It’s the glue that ties everything together for me. If you’ve toyed with other scripting languages in the past, this one is nothing like it, but probably takes the best parts of the one you toyed with. If you’re a certified perl monger, you’ll find your oneliners understandable and your regular expression syntax right where you left it. If you’re a python person, you’ll be almost at home.
One of the best parts of Ruby is its fantastic gems library (or not, depending on who you ask). A ruby gem is a program or library you can call on to extend the functionality of the language. Need a simple way to get the mean of a bunch of numbers? There’s a gem for that. Need to send a bunch of emails? Write PDFs? There’s gems for that too. Gems couldn’t be more simple to install and use as well. “gem install rubygemname” installs your gem, and using it is as simple as “require ‘rubygemname’” at the beginning of your script.
Another greate Ruby feature is not so much a feature, but an implimentation: JRuby. It’s a ruby intrepreter that runs on or in the JVM depending on how you see it, meaning any machine with Java can run Ruby. This also means that you can extend Ruby with Java, or if you’re not so inclined use some gems that already do this, like JDBC database connectors and other neato Java applications.
As a Sysadmin, you’ll find yourself doing all sorts of repetitive tasks and solving some not so easy or sometimes even precidented problems. Other languages require you to speak computer. Ruby understands English. You’ll never find it easier to get whats in your head into the computer and back out again.
I could, and would go on with the beauty of the Ruby way of doing things and its community for a really, really long time. But I’ve other things to do. Using Ruby.
A Place to Organize Data Structures
Log parsing, data corelations, pattern recognition, transformations, etc.. You’ll end up doing them all mid-outage looking through gigabyte sized logs. Note: optimizing sorting algorithms in the middle of an outage situation isn’t the best use of ones time.
Even in non-outage situations, perhaps you need to find out some infomation about a node’s activity. Perhaps you want to count a type of certain errors and co-relate them to a different source.
There are many free and commercial apps out there for log parsing (I highly recommend Splunk if you can afford the license), but in a lot of cases they doesn’t apply to to the problem at hand. So:
- Become a regular expression artist.
- Learn awk and grep.
- Find the best way to dump the data in a parseable, workable format.
- Know SQL.
With that said, I’ve currently got three database platforms of choice lately:
- sqlite3. It runs everywhere. It interfaces with everything. It can handle large data sets. It’s self-contained, It’s free. It has some interesting features. No dedicated server required.
- MySQL. Ok, server required, but that’s not a bad thing when it runs on everything for the most part. It’s fast and has some great tools that accompany it.
- Oracle XE. Didn’t think I’d go there, did ya? While there are some limitations, the bundled APEX utility set can be useful for visualizing problems. It has all the connectivity options of its big brother which is another big plus.
So there’s some things to get you started and some toys to play with.
1 commentJeff, Regarding words of Wisdom from Zed Shaw:
(11:48:32 AM) Valore: plus OO hasnt sent over any strippers yet, so till they do, your stuck with MS prods
(11:49:32 AM) Valore: maybe that should be the next opensource initiative. its not enough to have a flock of geeks working for free making rock solid comminity driven code… you need a flock of strippers working for free to promote them too
Week off
I’ve got the week off. We’re all home, the wife and the boy. I figured I might get some time to work on some side projects and some Fedora stuff, but I SERIOUSLY underestimated the energy of a 2.5 year old boy. It’s 11:27AM and I’m ready for a nap. Unfortunately, the boy has taken to not napping now that he’s off of school.
No commentsOverheard at work…
A coworker was working on some audio on his linux box and was having a hard time. The next thing I heard was…
“Man I suck with Audacity!”
No commentsFedora Status
Well, most people have heard that Fedora 11 just got a push back a week on release, which most people are looking at as a good thing. In the meantime I’ve had some thoughts on Fedora as a whole on direction, documentation, and whatnot.
This is a user specific distribution. Really. Most folks who are using Fedora are more likely to use CentOS or Scientific in production environments. As a result of this observation, I would not suggest any engineering specific changes, but it would seem to me as there are two problems that present themselves with this in mind:
- Given the heritage of Fedora, it would appear to me as though the documentation and information portals reflect the standpoint of the heritage rather than its own project. The wiki is a MESS and appears nearly completely random to outsider. The Unity project grew out of the chaos that the several parallel ongoing efforts could not describe in a singular way. Why are any of these needed?
- The project is a social effort. Given my stance in point one, why isn’t there some sort of organizational effort to describe the project in less technical terms — a more social stance on what Fedora is and what people can do to join the social.
So what can I do? I’m thinking about that. This is my notepad.
No commentsTruth from Jeff.
Oracle is like GM… Lets buy up a million little companies, support 89 product lines, reuse “common” parts is a terrible way, deliver a shit product riddled with holes and constant failures, and rely ont he blind faith of idiots to persist our broken business model
1 commentActivescaffold
Activescaffold just saved my rear on a project. The whole project IS an admin interface for which I need relational CRUD, and it’s the shit. Eliminated dozens, if not more, hours on the project. I had a giant activerecord definition and was trying to do exactly what Activescaffold provided. I may have a new love.
No commentsOracle XE in Fedora 11 x86_64
Well, technically it’s not Fedora 11 yet, but regardless of the details, it took me a bit to figure out what was going on when my installation suceeded, but XE failed to work.
The application RPM is i386, and is only available for i386. I had the required libaio installed, but would get complaints when I would try and start the DB from sql*plus as such:
$ sqlplus / as sysdba
SQL> startup
I didn’t save the output, but the complaint was that libaio wasn’t installed. Guess what? Oracle didn’t put the lib in the RPM spec file, let alone the proper one. The tricky part was that it APPEARED as though the configuration step worked per the script output, but in reality, Oracle was not setup.
So, in short, to get Oracle XE running:
# yum install libaio.i586
# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
# service oracle-xe configure
All of this looks ridiculously easy in hindsight, and once I figured it out, it was, but I REALLY hope the pending Sun merger gets some better system people in house for projects like this.
1 comment