Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012

Size: px
Start display at page:

Download "Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012"

Transcription

1 Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, The person installing the VC is knowledgeable of the Linux file system and can upgrade, deploy JAVA, Firefox, RPM packages, etc. The Virtual Coordinator (VC) requires JAVA and the browser requires recognizing JAVA. Some Linux flavors allows to log as root others, only allows you as a user and in order to have access to files system, the user must be part of the sudo list to execute command. As Linux administrators or users, you will know how to add yourself and have the proper rights if you cannot log as root. GENERAL INSTALLATION GUIDE USING RPM The VC is installed automatically but the user must have right to the Root system files either add the account to the Sudo users or Logging as a root The VC and files are installed in a single directory Make Backup of the entire directory wifi_vc found under /usr/bin/wifi_vc if there is already an installation and running. The Data and Configuration files are found in the following directories. a. Current Readings and Status data /usr/bin/wifi_vc/sys/data b. Units Configurations data /usr/bin/wifi_vc/sys/config c. Archive data /usr/bin/wifi_vc/webapps/examples/archive After re-installation, you may want to copy back these directories to recover the old data TIP: The latest virtual coordinator is usually at this URL. a.) Copy the tar file wifi_vc fc17.i686.rpm to the user home directory, and run it from there (some system do not run directly from the mounted USB flash card) Enter the root password when prompted and continue the installation

2 You must enable the required Ports from the firewall 2 The Virtual coordinator (VC) IP should use a Static IP (No DHCP) and open Ports 80 services and 21 for FTP when upgrading the WIFI units; in addition, Enable port 50002/udp, 50006/tcp, 2000/tcp, 21/tcp, 80/tcp on the firewall. (Refer to the section: Installation: services and Ports for Server/Desktop) FIREWALL AND ETHERNET SERVICES (for Servers Refer to the Section: Installation: Services and Ports for Server/Desktop) Use the GUI to enable the FTP and WWW services as well as the ports 2000/tcp, 50006/tcp, 50002/udp, and for static IP DHCP, edit the GUI interface of the network connections Menu: System\Administration\Firewall Menu: System\Preferences\Network connections Chose the em1 or what you have for Wire Connections to edit the file to set the Static IP parameters

3 3 b.) The RPM installations does what it takes to configure manually (explained in the General guidelines at the end of this Document. The wifi_vc folder is created under the directory /usr/bin During the RPM installation as well as other links to run the Java scrips described under the Manual Installations Virtual Coordinator Files are under /usr/bin/ For the FTP firmware upgrade, the nine files must reside under the Public Subfolder (*.img) To re- installed the same RPM (same revision), you must removed the old one, because system manager will not allow to reinstall an RPM Make a backup of settings and recorded data located /usr/bin/wifi_vc/sys /usr/bin/wifi_vc/webapps /usr/bin/wifi_vc/ftpserver Very Important when Updating, or Installing and reinstalling Make a backup when reinstalling /usr/bin/wifi_vc - Useful Command: #cp -av (for copy) #rm -rf (remove directory) #mkdir -p (create a directory) #mv file1 file 2 (renames file) #rpm -e wifi_vc, (removes the rpm package wifi_vc

4 Installation: Services and Ports for Servers/Desktop 4 The Virtual coordinator (VC) IP should use an Static IP (No DHCP) and uses other ports than 80, Enable port 50002/udp, 50006/tcp, 2000/tcp, 21/tcp, 80/tcp on the firewall. -Port 50002/50006 is used for communication between the transmitter and the VC for data -Port 2000 is the command server. -Port 21 is for firmware upgrade on transmitters. -Port 80 is for the web server IP and Ports Configurations (No GUI Desktop) a). JAVA: Assuming Java (JRE) is preinstalled with RHEL 6, or if none, please Install it $ su -c "yum install java openjdk" b). FIREFOX: Assuming Firefox is preinstalled with RHEL 6, or if none, please Install it. Website for different download Installing from a package manager To install Firefox using the package manager, please refer to the documentation of the Linux distribution you're using. Installing outside of a package manager How do I install firefox in Linux c). Static IP and Firewall for Desktops: Set a static IP to the system. 1.) FOR DESKTOP: Use the GUI to enable the FTP and WWW services as well as the Ports 2000/tcp, 50006/tcp, 50002/udp, etc. For Static IP, edit the GUI interface of the Network Connections Menu: System\Administration\Firewall Menu: System\Preferences\Network connections Chose the em1 or what you have for Wire Connections to edit the file to set the Static IP parameters

5 2.) FOR SERVER CONFIGURATION 5 In terminal #system-config-network Choose the Device configuration and click enter. Choose the network card that you want to configure. Disable DHCP, enter the network information and click OK.

6 6 Once back to the home screen, choose save and quit. Now, edit the network scripts to enable the adapter at boot up. #vi /etc/sysconfig/network-scripts/ifcfg-eth0 Change the line that says "ONBOOT=no" to ONBOOT=yes" and restart the network service. Also check the IP address for eth0 interface. #service network restart #ifconfig eth0 Link encap:ethernet... c.) Start the firewall configuration tool use the command "system-config-firewall". Enable ports 50002(udp), 50006(tcp) and 80(HTTP) on firewall. #system-config-network Choose customize.

7 7 Choose forward to configure the ports. Choose Add Enter the port number and protocol as udp

8 8 Choose forward Mark the interface that you will trust. Also Mark the interface to be masqueraded.

9 9 Choose forward. Choose Close

10 10 When on the home screen, customize again and choose the WWW (HTTP) service in trusted service. Close and go to home screen. Choose OK Choose YES if you want this setting to be written. This will override existing settings.

11 Installing Virtual Coordinator (VC) in Linux Systems Manual Installations that do not use RPM Packages (In case the RPM does not work, even with ROOT privileges) 11 ASSUMPTIONS The person installing the VC is knowledgeable of the Linux flavor used on regards to a.) Moving around the file system in the GUI Interface and command line b.) Be able to install software JAVA and firefox c.) Be able to upgrade their current JAVA and browser d.) You can use these command to find if your system has java or you need to install it For Java Info: $java -version $readlink -f `which java` $readlink -f `which firefox` Install the java, but if you have an old one, upgrade it via the Software Upgrade Center To installed the Openjdkjava follow this link or Install it from the JAVA website followings their instruction under the link all java downloads GENERAL INSTALLATION GUIDE (MANUAL NO RPM) The Virtual Coordinator (VC) requires JAVA and the browser requires to recognize the JAVA. Some Linux flavors allows to log as root others, only allows you as a user and in order to have access to files system, the user must be part of the sudo list to execute command. As Linux administrators or users, you will know how to add yourself and have the proper rights if you cannot log as root. TIP: The latest virtual coordinator is usually at this URL. The VC is installed manually in these Steps a.) Make Backup of the entire directory wifi_vc found under /usr/bin/wifi_vc if there is already an installation and running. The Data and Configuration files are found in the following directories. a. Current Readings and Status data /usr/bin/wifi_vc/sys/data b. Units Configurations data /usr/bin/wifi_vc/sys/config c. Archive data /usr/bin/wifi_vc/webapps/examples/archive After re-installation, you may want to copy back these directories to recover the old data b.) Copy the tar file from your media (flash/cd, etc) wifi_vc_ tar.gz to the user home directory, and decompress (do not decompress the tar file it in the flash card and copy its contents) c.) Copy the decompress directory wifi_vc into the system folder /usr/bin/ d.) Create a Symbolic link of the executable Script from the wifi_vc directory in folder /etc/init.d/ $cd /etc/init.d/ $sudo ln -s /usr/bin/wifi_vc/virtualcoordinatorapp virtualcoordinatorapp $sudo ln -s /usr/bin/wifi_vc/virtualcoordinatorwebserver virtualcoordinatorwebserver $sudo ln -s /usr/bin/wifi_vc/ftpserver/bin/virtualcoordinatorftp2 virtualcoordinatorftp2

12 12 e.) Before starting the services, find out the actual path to the java run time environment. $readlink -f `which java` It should say something like: /usr/lib/jvm/java-6-openjdk/jre/bin/java Remove the "bin/java" part and leave only /usr/lib/jvm/java-6-openjdk/jre/ (this is the actual JAVA_HOME. Edit the file and enter this path where it says JAVA_HOME in the files "/etc/init.d/virtualcoordinatorapp", "/etc/init.d/virtualcoordinatorwebserver", "/etc/init.d/virtualcoordinatorftp2" The actual content of the file should look like this # Set this to your Java installation # for example: # JAVA_HOME=/usr/lib/jvm/java openjdk /jre JAVA_HOME= Below the three lines command to modify the three files $cd /etc/init.d/ $sudo vi virtualcoordinatorapp $sudo vi virtualcoordinatorwebserver $sudo vi virtualcoordinatorftp2 TIP: Refer to man pages for the "vi" editor commands used as the default editor for editing files. After making the change, the content should look like this: # Set this to your Java installation # for example: # JAVA_HOME=/usr/lib/jvm/java openjdk /jre JAVA_HOME= /usr/lib/jvm/java-6-openjdk/jre/ f.) Creating an executable Link in the Run Level /rcx.d/ where X is the value given by the command $ /sbin/runlevel to Auto Start during boot $cd etc/rcx.d $sudo ln -s /etc/init.d/virtualcoordinatorapp S98virtualcoordinatorApp $sudo ln -s /etc/init.d/virtualcoordinatorwebserver S97virtualcoordinatorWebServer $sudo ln -s /etc/init.d/virtualcoordinatorftp2 S96virtualcoordinatorFTP2 Note: in some systems the rcx.d is under /etc/ directory, but on other flavors such is under /etc/init.d/ g.) Start the Virtual Coordinator Application, WebServer, and FTP2 services $sudo /etc/init.d/virtualcoordinatorapp start $sudo /etc/init.d/virtualcoordinatorwebserver start $sudo /etc/init.d/virtualcoordinatorftp2 start h.) Copy back the Data, Configuration and Archive data from the directory saved

13 13 Firewall Ports to be Enabled Use the GUI to enable the FTP and WWW services as well as the data ports besides port 80 and 21 In order the virtual coordinator works i.) The Virtual coordinator (VC) uses other ports than 80, so you should be able to disable, enable and create the require ports in your FIREWALL for your Linux Flavor Used either via a GUI interface or Command base, etc. The port numbers are for various operations on the Virtual Coordinator. -Port 50002/udp, 50006/tcp are used for communication between the transmitter and the VC for data -Port 2000/tcp is the command server. -Port 21/tcp is for firmware upgrade on transmitters. -Port 80/tcp is for the web server. j.) To upgrade the WiFi Firmware we need to deploy the 9 image file (*.img) in the FTPserver folder of the wifi_vc directory in order to use the (VC) web menu Setup/TX Configuration/System. When upgrade the Firmware in the End Units. Your FTP ports must be enable correctly (Some systems use Port 20 to send the Payload, and Port 21 for connections) TIP: The latest Firmware Upgrade is usually at this URL. $ cd ~/Downloads/image101 $ cp -av *.img /usr/bin/wifi_vc/ftpserver/res/home/public/