Installing the development version¶
In order to install Pulse2 and it’s plugins you first need to install and configure MMC.
This how to will guide you through the installation and configuration of Pulse2 development environment
Installation form source code¶
Pre-requisites¶
Debian:
# apt-get install git-core build-essential autogen autoconf libtool gettext
python-sqlalchemy python-mysqldb python-ldap python-openssl
python-twisted-web nsis xsltproc docbook-xsl
Centos:
# yum install git-core
Mandriva:
# urpmi git-core
Get the source code¶
The development source code is managed in github https://github.com/mandriva-management-console/mmc.
Clone the github repository:
$ git clone git://github.com/mandriva-management-console/mmc.git
To compile and install all modules run:
$ $ cd pulse2/
$ ./autogen.sh
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
$ make
# make install
You can update by running the following command:
$ git pull origin master
To keep your configuration files intact you may change the configure line to:
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-conf
The option --disable-conf will disable configuration files installation.
OpenLDAP¶
Debian:
# apt-get install slapd ldap-utils
Debconf will ask only ldap root password by default to more granular configuration use:
# dpkg-reconfigure slapd
Using dpkg-reconfigure debconf will ask you for:
- Omit OpenLDAP server configuration?: Choose <No>.
- DNS domain name: Enter you domain name.
- Organization name: Enter organization name.
- Admin password: Enter a password and confirm in next screen.
- Database backend to use: choose HDB.
- Do you want the database to be removed when slapd is purged: Choose <No>.
- Allow LDAPv2 protocol: Choose <NO>.
Centos:
# yum install
Mandriva:
# urpmi
OpenLDAP Schema¶
Old versions¶
The mmc schema is needed to set ACLs on users in the MMC web interface:
# cp /usr/share/doc/python-mmc-base/contrib/ldap/mmc.schema /etc/ldap/schema/
Then in /etc/ldap/slapd.conf include the schema:
include /etc/ldap/schema/mmc.schema
New versions¶
#TODO: Talk more about openldap changes in config and schema new storage.
Copy mmc schema to your current directory:
$ cp /usr/share/doc/python-mmc-base/contrib/ldap/mmc.schema .
Create a file mmc.conf with:
include mmc.schema
Create a folder schemas:
$ mkdir schemas
Convert mcc.schema to ldif:
$ slaptest -f mmc.conf -F schemas/
Edit mmc schema, remove {0} from dn:, cn: and add cn=schema,cn=config to dn
dn: cn=mmc,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: mmc
Remove the following lines at the bottom of that file:
structuralObjectClass: olcSchemaConfig
entryUUID: 0ec2fe60-1381-1031-8f21-f92982aeda45
creatorsName: cn=config
createTimestamp: 20120405153755Z
entryCSN: 20120405153755.316520Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20120405153755Z
Add schema to ldap:
# ldapadd -Y EXTERNAL -H ldapi:/// -f schemas/cn\=config/cn\=schema/cn\=\{0\}mmc.ldif
Restart the slapd daemon.
MySQL¶
Debian:
# apt-get install mysql-server
Debconf will ask mysql root password.
Centos:
# yum install
Mandriva:
# urpmi
Apache HTTP server¶
Debian:
# apt-get install apache2 php5 php5-gd php5-xmlrpc
Centos:
# yum install
Mandriva:
# urpmi
Configuring apache2 and php¶
Enable mmc web site:
# ln -s /etc/mmc/apache/mmc.conf /etc/apache2/sites-enabled/mmc.conf
Restart apache2:
# /etc/init.d/apache2 restart
Pulse setup¶
pulse2-setup will ask:
INFO - Load defaults values from existing config
INPUT - Enable audit module (Y/n): y
INPUT - Enable inventory server (Y/n): y
INPUT - Enable imaging server (Y/n): y
INPUT - Enable package server (proxy) (Y/n): y
INPUT - Server external IP address (default: 10.0.2.15): 172.16.0.4
INFO - Run setup
INPUT - Database host (default: localhost):
INPUT - Database admin user (default: root):
INPUT - Database admin password:
...
INPUT - LDAP uri (default: ldap://127.0.0.1:389):
INPUT - LDAP base DN (default: dc=mandriva, dc=com):
INPUT - LDAP admin DN (default: cn=admin, dc=mandriva, dc=com):
INPUT - LDAP admin password:
...
INPUT - Wake-on-lan tool path (default: /usr/sbin/pulse2-wol):
DHCP Setup¶
The imaging module of Pulse 2 needs PXE functionalities, NFS and TFTP services. For PXE configure the DHCP server on the network to serve the Pulse2 PXE bootmenu.
For example with dhcp3-server in /etc/dhcp3/dhcpd.conf:
subnet 192.168.0.0 netmask 255.255.255.0 {
option broadcast-address 192.168.0.255; # broadcast address
option domain-name "pulse2.test"; # domain name
option domain-name-servers 192.168.0.2; # dns servers
option routers 192.168.0.2; # default gateway
pool {
range 192.168.0.170 192.168.0.180;
filename "/bootloader/pxe_boot";
next-server 192.168.0.237;
}
}
- filename and next-server are the relevant options to set.
You can find an example file for dhcp3 server in or repository.
Imaging client installation¶
Imaging client can run only on i386 compliant machines. It is not run directly on the server, but served through the network to i386 machines. For your convenience, prebuilt binaries are available, so that you can install it on a server which is not i386.
Once you have downloaded prebuilt binaries as pulse2-imaging-client-<version>_i386.tar.gz, simply run the following, as root: $ tar xfC pulse2-imaging-client-<version>_i386.tar.gz /
All files are extracted in /var/lib/pulse2/imaging/ dir.
As to serve the imaging client to the machines, you must then configure the following network services.
NFS setup¶
In /etc/exports file, add the following lines:
/var/lib/pulse2/imaging/computers *(async,rw,no_root_squash,subtree_check)
/var/lib/pulse2/imaging/masters *(async,rw,no_root_squash,subtree_check)
/var/lib/pulse2/imaging/postinst *(async,ro,no_root_squash,subtree_check)
Then reload the new NFS configuration, as root.
Check the export list:
# showmount -e
Export list for imaging:
/var/lib/pulse2/imaging/masters *
/var/lib/pulse2/imaging/postinst *
/var/lib/pulse2/imaging/computers *
TFTP Setup¶
Bootloader and kernel are served to the client with TFTP protocol. We recommend using the atftpd server as it supports multicast..
You must configure the TFTP server to use as base directory:
/var/lib/pulse2/imaging
Note
don’t use inetd.
Then check the configuration:
# atftp localhost
tftp> get /bootloader/pxe_boot
tftp> quit
# rm pxe_boot