To change the heap size for JBoss 5.0.1 Enterprise server I opened a lot of possible xml file candidates. So I’ll just jot down the right one – while I still remember where I found it.
The server refused to boot on my local pc – due to the fact that I didn’t have enough memory available. Hmm. I noticed that the build-in JBoss enterprise server in JBoss Developer Studio had the heap size set a bit lower – m’kay, a *lot* lower. Why would an Enterprise server need that huge amount of memory anyway?
So I matched those exact settings seen in JBoss Developer Studio: -Xms256m -Xmx768m.
The JBoss Enterprise server file to change is run.conf in the bin directory at the root of jboss-as.
Now the server boots okay…
I own a MacBook Pro and have done so for some time. But I only just now discovered KeyRemap4MacBook. Now I can have a proper delete button combo.
Remapped delete to be CTRL+D. Much, much better. Just thought that I’d pass it along…
Uh, it has an Emacs mapping as well.
Graham Dumpleton of all people pointed me in the direction of mod_wsgi instead of mod_python. What are the chances of that? So I had a rather fun time figuring out how to install mod_wsgi.
What I ended up doing was this. First:
wget http://modwsgi.googlecode.com/files/mod_wsgi-3.2.tar.gz
Unpack and cd mod_wsgi root. Then:
./configure --with-apxs=/my/path/to/apache2/bin/apxs --with-python=/my/path/to/python
make
make install
If everything went as planned you should have a mod_wsgi.so in your apache modules folder. Let Apache know about mod_wsgi by inserting the following line in httpd.conf:
LoadModule wsgi_module modules/mod_wsgi.so
Now restart Apache (assuming that it was started in the first place). In your log you should see something like:
mod_wsgi/3.2 Python configured -- resuming normal operations
There’s a nice test of mod_wsgi at arch linux.
Python on Mac OS is per default located in /System/Library/Frameworks/Python.framework/Versions/.
The commands:
where python
and
which python
should both return /usr/bin/python.
You do not want to alter, uninstall or modify this version of Python in any way. Xcode, among other applications, depends on it. And should you upgrade your OS this version will almost certainly be overwritten.
So what do you do, if you want to use and maintain multiple versions of Python? Perhaps even a newer version than the 2.6.1 currently in the system folder? Well, macports is certainly an option. There’s also virtual environments. But you can also configure yourself. I chose to build the newest version of Python 2.6.
First you download the 2.6 source from here. Then you unpack, cd to the python root folder and:
./configure --prefix=/the/path/to/your/future/python2.6
make
make install
This should all go well and install Python in the path where you want it to be. Now you need to modify your .profile with:
export PATH=/path/to/python2.6/bin:$PATH
export PYTHONPATH=/path/to/python2.6/lib/python2.6/site-packages
By putting your Python installation path before PATH you ensure that the system finds your version of Python before any other – at least when you open a Terminal. And by setting PYTHONPATH you ensure that Python knows where to find any imported python modules.
Restart the Terminal and verify that which python is actually returning your installation path to Python.
Next you need to install easy_install. Easy_install is the convenient way to install Python modules. Go to any download folder and do:
wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
Your Python installation should now have an easy_install ready. And which easy_install should return your Python installation path.
You are now able to install Python modules using easy_install like this:
easy_install pylint
Be sure to check that all the eggs goes into the right basket – that is to say the site-packages in your Python installation path.