Okay, keeping in mind all the usual warnings about not installing a compile environment on a production server, use CentOS, get an RPM, etc -- here is what I use when I absolutely must have something. Such as a stupid app that the user insists on that insists on being able recompile modules on the fly. Grrrr...
Anyway...
The following two yum commands will establish a basic development environment on SME Server 7.1. Accept the dependencies for both commands.
Note this works for what I need/want to do. You may need to adjust a few packages here and there to suit your purposes. Also note that 7.0 will require you to use --enablerepo= as described in previous posts. But then, everyone is updating to 7.1, right...?
# yum install anaconda anaconda-runtime
# yum install autoconf automake bison cpp e2fsprogs-devel gcc gcc-c++ glibc-devel glibc-headers glibc-kernheaders httpd-devel kernel-devel kernel-smp-devel krb5-devel libacl-devel libattr-devel libstdc++-devel libtermcap-devel libtool m4 ncurses-devel openssl-devel pam-devel readline-devel zlib-devel
After the above there is no need to do the post commands suggested by the SME yum wrapper.
I also happen to need GD for this app, and GD.pm, so to the above "base" I add the following:
# yum install gd gd-devel gd-progs libpng-devl libjpeg-devel freetype-devel
Once that's done you can get GD.pm from here:
http://search.cpan.org/~lds/GD-2.35/GD.pmI've found that the cpan install is problematic, so I build it manually. This is so I can exclude the XPM/X11 support, which of course is not present on SME. So first I extract the GD archive into /tmp/gd, then I run this:
# perl Makefile.PL -options "JPEG,FT,PNG,GIF,ANIMGIF"
This excludes XPM support; however, there is a bug in that this still leaves the -lXpm and -lX11 arguments in the Makefile.
# vi Makefile
And remove the -lX* options.
Now you can run the make / make test / etc as described in the GD.pm docs.
Hope this helps.
Oh, and as Greg pointed out (I don't use these, but if you're building SME packages you'll probably want them):
If it is a smeserver-xxx or e-smith-xxx rpms that you need to rebuild, you just need to install e-smith-lib, e-smith-devtools and any perl rpms that are needed from SME7 on the CentOS4 box.
[/i]