NetDirectorInstallation

advertisement
NETDIRECTOR
INSTALLATION
NetDirector is an upcoming and promising Java based GUI for managing services in Linux. It is a
product of EMU Software Inc. (http://www.netdirector.org) and is freely available under liberal
licensing terms known as NetDirector Public License. Like Webmin, NetDirector presents
browser based user interface to interact with. However, unlike Webmin, NetDirector has a
client-server configuration. It can configure multiple servers at a time. Along with this capability
it provides for role-based delegation to manage services and servers. A particular role may be
delegated responsibility to manage varied service(s) on one or more servers. Webmin being
older in age offers a wider range of services to be managed and has a relatively better user
interface.
NetDirector is a client-server system. On the server side, there is a Server Manager and on the
client side there is a Server Agent. Server Manager needs to be installed on one machine and
Server Agent is to be installed on every such machine whose services are required to be
configured through the Server Manager. User interacts with server manager through a browser
based user interface. Download NetDirector Server Manager and Server Agent from
sourceforge.net. At the time of writing a version 3.1.2 of Server Manager is available with Linux
GUI installer. Download netdirector-3.1.2-linux-prod-installer.bin and the stable Server Agent
netdirectoragent-3.1-linux-installer.bin to say, /root/Download/netdirector/ folder.
I NSTALLING N ET D IRECTOR
Check that both these files have execute permissions (chmod +x *.bin). Then begin installation
as follows. Do not login as root in the GNOME console to run the bin file. You may get an error.
First login as an unprivileged user and then su to root to install netdirector.
[gandhi@gnu ~]$ su Password:
[root@gnu ~]# cd Download/netdirector
[root@gnu ~]#chmod +x *.bin
[root@gnu netdirector]#./netdirector-3.1.2-linux-prod-installer.bin
IP address of our this machine is 192.168.1.3. Setup process is straight forward as the following
screen-shots show.
F IG . 1: C LICK F ORWARD TO BEGIN .
F IG . 2: A CCEPT L ICENSE AND CLICK F ORWARD .
In the next screen an installation folder for installing NetDirector is asked. You can specify an
installation folder either under /opt/ folder or under /usr/local/ folder.
F IG . 3: S PECIFY AN INSTALLATION FOLDER OF YOUR CH OICE AND CLICK F ORWARD
Now, as on our machine MySQL server is already installed (hosting databases for some other
applications) we will use this server as the backend of NetDirector. In Fig. 3, select Custom
installation and click Forward.
F IG . 4: S ELECT C USTOM
INSTALLATION AND CLICK
F ORWARD
At this point, open another terminal window and start MySQL server on this machine. You will
have to supply root’s password when asked.
[gandhi@gnu ~]$su - –c ‘service mysqld start’
Next, use mysql client to log-into MySQL server. Create a database netdirector. Create some
user, say mahadev, with password, say, mahadev, and grant him all privileges over this
database from localhost and from 192.168.1.3.
[gandhi@gnu ~]$ mysql –u root –h localhost
-p
We assume that root needs a password to login to MySQL server. Else, login as:
[gandhi@gnu ~]$ mysql -u root -h localhost
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql> create database netdirector;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on netdirector.* to mahadev@192.168.1.3 identified by
'mahadev';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on netdirector.* to mahadev@localhost;
Query OK, 0 rows affected (0.00 sec)
Had you selected Default Installation in Fig. 4, the installer would have installed the database
server itself and created necessary database, user and tables. There would have been no need
to carry out above exercise. In the next screen, select Install Tomcat and click Forward.
F IG . 5: S ELECT ’I NSTALL T OMCAT ’ AND CLICK F ORWARD
F IG . 6: W RITE IP ADDRESS OF HOST NAME
WHERE SERVER IS GETT ING INSTALLED
By default MySQL server listens at port 3306. However, if there is another MySQL server
installed on this machine then both cannot listen at this same port. In that case change the port
number to another unused port number. Look into file, /etc/services, to find out about possible
unused port numbers. You can also use netstat command (see below) to find out which of the
ports listed or not listed in /etc/services are currently being used.
F IG . 7: B Y DEFAULT , M Y SQL SERVER LISTENS AT PORT 3306. L ET DEFAULT STAY FOR NOW
F IG . 8: S UPPLY THE USER ID WHO HAS ALL PRIVILEGES
F IG . 9: S UPPLY THE PASSWORD OF
OVER THE
netdirector DATABASE
THE USER WITH ALL PRIVILEGES OVER
netdirector DATABASE
F IG . 10: C LEAR OUT ANY TABLES / DATA FROM THE netdirector DATABASE
F IG . 11: A CCEPT THE DEFAULT AND CLICK F ORWARD
F IG . 12: S HOULD N ET D IRECTOR SERVER START
AS A SERVICE WHEN SY STEM BOOTS UP .
Y ES .
F IG . 13: C LICK F ORWARD TO BEGIN INST ALLATION
At the end of installation, on clicking the Finish button, NetDirector starts, the default browser
opens up and points to URL: http://127.0.0.1:8080/netdirector. Log in as user admin with
password admin.
F IG . 14: C LICK F INISH TO START N ET D IRECTOR SERVER
F IG . 15: L OG - IN AS 'admin' PASSWORD 'admin'
As soon as you log in, change the password of admin by clicking on Manage Users link in the
top-panel as in Fig. 16.
F IG . 16: S ERVER A DMINISTRATION WINDOW . N OTE THE MENU - LINKS IN THE TOP - PANEL
Server Manager can be stopped/started any time with emuctl.sh script available in its
installation folder. To stop Server Manager, change directory (cd) to installation folder and issue
command as:
[root@gnu netdirector]# ./emuctl.sh stop
Stopping Netdirector Server Manager: netdirectorSM
Using CATALINA_BASE:
/opt/netdirector/jakarta-tomcat
Using CATALINA_HOME:
/opt/netdirector/jakarta-tomcat
Using CATALINA_TMPDIR: /opt/netdirector/jakarta-tomcat/temp
Using JAVA_HOME:
/opt/netdirector/j2sdk
./emuctl.sh : tomcat stopped
Or just run this script to get help
[root@gnu netdirector]# ./emuctl.sh
Usage: ./emuctl.sh help
./emuctl.sh (start|stop|restart)
./emuctl.sh (start|stop|restart) tomcat
./emuctl.sh (start|stop|restart) posgresql
help
start
stop
restart
-
this screen
start the service(s)
stop the service(s)
restart or start the service(s)
[root@gnu netdirector]#
I NSTALLING S ERVER A GENT
Server agent needs to be installed before Server Manager is able to manage any server. It is also
to be installed on localhost. We will install it on machine 192.168.1.2. Begin installation as:
[gandhi@gnu ~]$ su Password:
[root@gnu ~]# cd Download/netdirector
[root@gnu netdirector]# ./netdirectoragent-3.1-linux-installer.bin
F IG . 17: C LICK F ORWARD
F IG . 18: A CCEPT THE LICENSE AGREEMENT AND CLICK F ORWARD
F IG . 19: S PECIFY A FOLDER TO INSTALL N ET D IRECTOR AGENT . T HE FOLDER WILL BE CREATED
F IG . 20: W RITE THE IP ADDRESS OF S ERVER M ANAGER MACHINE
F IG . 21: L ET THE DEFAULT PORT NUMBER (8501) STAY
F IG . 22: W RITE THE IP ADDRESS OF S ERVER A GENT MACHINE
F IG . 23: L ET DEFAULT PORT NUMB ER (8500) STAY
F IG . 24: A GENT DAEMON CAN BE STARTED AT SYSTEM STARTUP . D ECIDE HERE
F IG . 25: S OFTWARE SHALL NOW BE
INSTALLED
F IG . 26: Y OU CAN START SERVER AGENT NOW . C LICK F INISH
Server agent can be started at any time as:
[gandhi@gnu ~]$ su Password:
[root@gnu ~]# bash /opt/netdirectoragent/agent/ndagent.sh start
Starting ndagent
Or as:
[gandhi@gnu ~]$ su -c '/opt/netdirectoragent/agent/ndagent.sh start'
F IREWALL SETTINGS
At the server manager allow incoming packets to reach destination ports 8080, 8500 and 8501.
Keep these ports open. And at the server agent machine keep tcp ports 8500, 8501 open. You
can use netstat command to check if server manager and server agent are started (i.e. listening
at these ports):
[gandhi@gnu ~]$ netstat -aunt
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address
Foreign Address
tcp
0
0 0.0.0.0:3306
0.0.0.0:*
tcp
0
0 0.0.0.0:10000
0.0.0.0:*
tcp
0
0 192.168.1.3:8500
0.0.0.0:*
tcp
0
0 0.0.0.0:22
0.0.0.0:*
tcp
0
0 192.168.1.3:3306
192.168.1.3:50545
tcp
0
0 :::8080
:::*
tcp
0
0 :::8501
:::*
tcp
0
0 :::22
:::*
State
LISTEN
LISTEN
LISTEN
LISTEN
ESTABLISHED
LISTEN
LISTEN
LISTEN
Server Manager and Server Agent listen at ports 8500 and 8501. Tomcat, Java Application
Server, that is bundled with NetDirector listens at port 8080. MySQL server is listening at port
3306. Webmin listens at port 10000 and SSH daemon is listening at port 22. SELinux can be in
enabled mode both at the server manager and the server agent.
**************
Download