Difference between revisions of "AIX tricks"
m (17 revisions) |
|||
(One intermediate revision by one other user not shown) | |||
Line 43: | Line 43: | ||
* screen - it will blow up in misc.c complaining about too few parameters to setenv(). Here's a fix: | * screen - it will blow up in misc.c complaining about too few parameters to setenv(). Here's a fix: | ||
-# if defined(linux) || defined(_convex_) || (BSD >= 199103) | -# if defined(linux) || defined(_convex_) || (BSD >= 199103) | ||
− | +# if defined(linux) || defined(_convex_) || (BSD >= 199103) || defined( | + | +# if defined(linux) || defined(_convex_) || (BSD >= 199103) || defined(_AIX) |
* gettext* are broken because various linker flags are not properly prefixed or AIX ld doesn't understand them. Build with "LDFLAGS=-Wl,-bsvr4" and be happy | * gettext* are broken because various linker flags are not properly prefixed or AIX ld doesn't understand them. Build with "LDFLAGS=-Wl,-bsvr4" and be happy | ||
* perl is broken, patch was filed as PR but not commited yet. | * perl is broken, patch was filed as PR but not commited yet. |
Latest revision as of 21:48, 4 January 2013
AIX is IBM's UNIX. It is weird but delightful. Unlike Solaris it's small, but, also unlike Solaris, it somehow manages to have usefull stuff anyway.
Installing
Install 5.3, then upgrade it to TL7, then to the latest service pack level. Go here: http://www-933.ibm.com/eserver/support/fixes/fixcentral/pfixpacks/53 then download the most recent Technology Level (5300-07-00-0747 currently) then 5300-07-03-0811 or whatever. Warning, huge downloads. TL7 is like 1.8G and 5300-07-03-0811 like 260M.
Many things that are broken in 5.3 are fixed by these updates, like topas(1) and X11 ssh forwarding and various other things you may want to use. So do it.
When installing 5.3 you're asked if you want 64 bit kernel and JFS2 resize support or something and it makes it somehow sound like you might not want this, but you do.
Freeware
(Mostly free software, but SGI and IBM and stuff likes to call it freeware, because they're giving it to you for omgnomoney).
The list they have on their website is outdated, you will find newer versions of some things on this super secret ftp address: ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/
Yes, they're distributed as RPM. No idea either.
SMIT
smit is AIX's management menu system. It can be a bit daunting at first, but it's actually quite useful because most things you might want to do are in there and at any time you can press Esc+6 to see what command it's building. It also makes a log in the current dir of whatever you've done and what commands it has executed so you can know what's going on behind the façade. Smit is both X11 and console, you can force console version by writing smitty instead.
When you install updates and other software distributed as .bff with smit, make sure you change the "accept new licenses" thing from no to yes before launching.
Security
Like most kommerzunices AIX is kinda all over the place when you install it with open ports and weird services listening for everyman and his dog, http://www-03.ibm.com/systems/p/os/aix/whitepapers/aix_security.html is a nice little guide to tighten things up. One word of warning though, it suggests you remove some unused accounts such as uucp and lpd, but don't do this, it'll make software updates poop their pants.
Performance
Something is running much slower than it should and most of the system is idle! What could it be? Well, turns out, AIX ships with very strict user limitations (see ulimit -a), like 32k size for processes, etc. This makes it pagefault a lot and run large processes slowly. The remedy is to allow your user more space, the canonical way being with chuser(1). chuser rss=1048575 stian for example will allow stian to have processes with RSS up to 512 MB.
Various things learned
- IBM's proprietary compiler is called XL and costs ~$1000, they won't do you a hobbyist license but there's a 60 day trial version that blows itself up. I haven't bothered with it since I don't like to feel like James Bond defusing a bomb.
- If you prefer a normal top(1) to topas(1), http://www.unixtop.org/ works fine.
- #aix on freenode has some people in it, some of them seem to know a thing or two.
- The amount of statistics and system information AIX will give you is truly astonishing, try stuff like netstat -p tcp, netstat -D, no -a, netstat -m, prtconf, lscfg -vp, etc, etc, etc.
- If you install on JFS2 with 64 bit kernel, and you feel one of the file systems are too large or too small, no problem! chfs -a size=+100M /home etc will adjust things on the fly. smit will auto-grow file systems that are too small when installing software, as well.
- To find out what actual patch level your os is on, oslevel -s.
- The list of valid shells (those that chsh(1) will let you use) can be edited in /etc/security/login.cfg (usw stanza)
pkgsrc & building software in general
- screen - it will blow up in misc.c complaining about too few parameters to setenv(). Here's a fix:
-# if defined(linux) || defined(_convex_) || (BSD >= 199103) +# if defined(linux) || defined(_convex_) || (BSD >= 199103) || defined(_AIX)
- gettext* are broken because various linker flags are not properly prefixed or AIX ld doesn't understand them. Build with "LDFLAGS=-Wl,-bsvr4" and be happy
- perl is broken, patch was filed as PR but not commited yet.
- for various tips (about broken cstdio etc) see article in NetBSD wiki
- glib2 fails because of conflicting declarations of HEADER in /usr/include/arpa/nameser_compat.h and onameser_compat.h. What worked for me was to temporarily comment out the #include <arpa/onameser_compat.h> at the end of <arpa/nameser.h>
- when you try to build any X app, it will fail on x11-links not finding the X11 headers. Just set X11BASE=/usr/lpp/X11 in mk.conf
- freetype2 - this helped me get past zlib problems
- archivers/unzip - compile with CFLAGS="-DNO_LCHMOD"