OpenFOAM installation

From Supercomputación y Cálculo Científico UIS
Revision as of 21:55, 26 April 2015 by Sgelvez (talk | contribs) (Installation for OpenFOAM 2.3.1 (from sources))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Logo_sc33.png

OpenFOAM Installation

OpenFOAM 2.3.1 over Debian 7.0

Installation

First you need to check the required packages. They can be obtained using aptitude. Here is a complete list for the platform:

aptitude search build-essential
aptitude search flex
aptitude search bison
aptitude search cmake
aptitude search zlib1g-dev
aptitude search libopenmpi-dev
aptitude search openmpi-bin
aptitude search qt4-dev-tools
aptitude search libqt4-dev
aptitude search libqt4-opengl-dev
aptitude search gnuplot
aptitude search libxt-dev
aptitude search freeglut3-dev
aptitude search libqtwebkit-dev
aptitude search libreadline-dev
aptitude search libncurses-dev


Then you must create a folder that is accesible for all the users, like /usr/local or /opt.

mkdir /usr/local/OpenFOAM

In that folder use the wget command to download the source package for both the base OpenFOAM and Third Party Scripts:

wget http://downloads.sourceforge.net/foam/OpenFOAM-2.3.1.tgz
wget http://downloads.sourceforge.net/foam/ThirdParty-2.3.1.tgz}} == Setting-up == 1. Replace ${ADMIN_EMAIL}, ${HOSTNAME}, ${DNS_DOMAIN}, ${IP_ADDR} for the adequate values. 2. Redirect messages from root, postmaster, admin, etc, to the administrator. Edit /etc/mail/aliases {{File|/etc/mail/aliases|<pre><nowiki> ... operator: root admin: root root: ${ADMIN_EMAIL} ... </pre>

Update the aliases database:

/usr/sbin/newaliases

4. Verify that sendmail knows about the different names that the client can have.

Edit /etc/mail/local-host-names

File: /etc/mail/local-host-names
<nowiki>
...
 localhost
 localhost.localdomain
 ${HOSTNAME}
 ${HOSTNAME}.${DNS_DOMAIN}
...
</nowiki>

Verify that the host appears in /etc/hosts

File: /etc/hosts
...
${IP_ADDR}  ${HOSTNAME}.${DNS_DOMAIN}  ${HOSTNAME}
...

Edit /etc/mail/sendmail.mc

File: /etc/mail/sendmail.mc
...
dnl #
dnl # Masquerading options
FEATURE(`always_add_domain')dnl
MASQUERADE_AS(`${HOSTNAME}.${DNS_DOMAIN}')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
dnl #
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
...

5. Activate the new configuration

yes | sendmailconfig

Security

By default Debian installs sendmail enabled only for localhost.
If tcp-wrappers are used, a line similar to the following should be added to /etc/hosts.allow

File: /etc/hosts.allow
...
sendmail: 127.0.0.1

If different filters are used, it's necessary to allow the access to the port localhost:25/tcp from localhost:1025/tcp

Cleaning-up (optional)

Remove ssmtp

aptitude remove ssmtp

If the DNS setup isn't defined in /etc/network/interfaces, remove resolvconf

aptitude remove resolvconf