Upload
lamhanh
View
241
Download
0
Embed Size (px)
Citation preview
Crime and Criminal Tracking Network
& Systems
Unit 5:-Steps to Manually Install
Server Offline Application
TCS Confidential
2
Machine Configuration
Server Machine
Memory 4 GB RAM preferred, 2 GB RAM minimum
Storage 60 GB hard disk.
Monitor Any monitor supporting 1024x768 screen resolution.
I/O Devices Compatible key board, mouse, NIC , Network cable.
Operating System Standard Linux platform
3
Pre-requisites
• JDK version 1.6.23, or later. (command to check version java -version)
• MySQL server version 5.5.20 or later. (command to check version mysql
-V)
• “Times New Roman” and “Mangal” font should be installed. (not present
by default, have to be downloaded and installed)
• Command xdg-openshould be available on command prompt (this is by
default present in Ubuntu 12.10 and Fedora 16)
• Software Program for viewing PDF files ( by default Document
Viewerpresent in Ubuntu 12.10 and Fedora 16)
• Monitor screen resolution should be 1024 * 768
4
Steps to configure offline application
•Stop MySQL server, if running.
•Following variables should be set in MySQL configuration file (usually found at /etc/my.cnf) at place shown in the screenshot below.
key_buffer_size = 1000K
max_allowed_packet = 1000M
table_open_cache = 10
sort_buffer_size = 10M
read_buffer_size = 256M
read_rnd_buffer_size = 256M
net_buffer_length = 2K
thread_stack = 256K
myisam_sort_buffer_size = 8M
lower_case_table_names = 1
log_bin_trust_function_creators = 1
character_set_server = utf8
collation-server = utf8_general_ci
max_connections = 500
5
6
•Start MySQL server.
•Create a directory on local file system (I would assume /home/guest)
to store Offline application , using command
•mkdirOffline
•Now copy the two zip files (offline-configure.zip and DbScript.zip) to
the location /home/guest/Offlineand unzip, you should get directory
DbScriptandoffline-configure under directory Offline
•Copy the directory “Linux-Manual-Installation/CCTNSApplication”
from CD toOffline/CCTNSApplicationon local machine.
7
6. Run the database script file using command (I assume the
password for user “root” is “root”.)
mysql -uroot -proot </home/guest/Offline/DbScript/script.sql
and press enter
OR
Login to MySQL command prompt with the command (with
assumption password for user root is root)
mysql -uroot -proot
press enter, then enter command
source/home/guest/Offline/DbScript/script.sql
press enter
Oncethe script execution completes you will get the MySQL prompt.
If you get any error, check the file path of script.sql
8
7. Now come to directory /home/guest/Offline/offline-configure
– Edit file database.properties, and change password of root, as per
your system MySQL password. (if password for user root is root,
no need to change this file)
– Java should be configured in the PATH environmental variable,
i.e. java command should work on command prompt.
– Run the configuration jar file with command
java –jar ConfigureCASOffline.jar
Press enter.
9
You will get a popup to enter details as shown below
Now enter details as show below
10
Significance of the parameters:
•Database Driver class: This is the driver name to be used for
connecting database.
com.mysql.jdbc.Driver
•Database User Name: User name for MySQL database. Use user
cctnsuser
•Database User Password: The password for the user. Use
password cctns
• Database Schema URL: The standard URL of the database.
jdbc:mysql://localhost:3306/cctns_offline_db_sync_proc
• CAS State URL : This is the url of the the CAS state application.
http://10.105.115.28/CCTNSWeb/Login.aspx
•Path of Application : his is the path of directory where CAS offline
application is stored.
/home/guest/Offline/CCTNSApplication
11
•Path of Report Folder : This is the path where fir pdf is created.
It can be any path in file system that has write permissions.
•State :This is the state of Police station in which application is getting
installed.
•District :This is district in which the police station belongs to.
•Police Station :This is the Police Station for the ongoing installation.
12
Setting of path of application
13
After filling all fields it should look like:
Now click on Savebutton you will get a message “Police Station
ID=….”
14
Now click on OK button you will get success message as shown
below
15
16
•Give following permissions:
1.Go to path /home/guest/Offlineand run the following command to
give write access rights to all on this Offline directory chmod +w -R .
2.Go to the path /home/guest/Offline/CCTNSApplication via
command prompt and run the command chmod +x run.sh
•Now run the offline application using following steps
1.Java should be configured in the PATH environmental variable, i.e.
java command should work on command prompt.
2.Go to the path /home/guest/Offline/CCTNSApplication via
command prompt.
3.Now execute command
./run.sh
press enter.
17
Or
Go to the path /home/guest/Offline/CCTNS Application via folder
view and double click on run.sh file, if a popup comes, click on Run
1.Now you should get the Offline application login page
Now configure this police station in Sync, and after Sync is started, you
should be able to login to the offline application with credentials created
(for this police station) in online application.
18
TCS & PLDT Confidential 18
Thank You
www.tcs.com