[go: up one dir, main page]

Menu

[r1]: / hlp / Env_install  Maximize  Restore  History

Download this file

116 lines (91 with data), 4.1 kB

1. copy all files in Env_support_software directory to local directory

2. run "tar xzvf Active******" to install ActiveTcl

3. run command below to change PATH
	PATH="/usr/local/ActiveTcl/bin:$PATH"
	export $PAT
	or you can put it in user's .bash_profile.

4.Install and start mysql database (this step is only for Server side)

.You can select to install database and application in one machine.
.Prefer to use Fedora 4 and built-in mysql4.11.

.For Redhat9.0, there is pre-installed mysql3.23, run below command to check:
	#rpm -q mysql
	mysql-3.23.54a-11
 Then don't need install mysql again, just start mysqld service:
	#service mysqld start
	Starting MySQL:                [OK]

.For Fedora 4, there is pre-installed mysql4.11. check and start mysqld by below command
        #service mysqld start
        Starting MySQL:                [OK]

.Create user/password. create user root and set password as 123456
	#/usr/bin/mysqladmin -u root password 123456
.Create a user(test) and setup privillege by mysql_setpermission (built-in application)
	#mysql_setpermission -u root
	then select 7->*->test->y->123456->123456->%->yes->127.0.0.1->no->yes->0

6.Install tcl interface for mysql database
	#rpm -Uvh mysqltcl-3.01-0.i386.rpm

the command will install mysqltcl to build-in Tcl directory. For ActiveTcl, we just need copy the installed file in Tcl8.x directory to ActiveTcl directory.
	#cp /usr/lib/mysqltcl-3.01 /usr/local/ActiveTcl/lib/mysqltcl-3.01/ -r
then it will works in ActiveTcl


	However, if you want to use it with other mysql database version such as 5.0.18.  Then, it is suggested
	that you download the mysqltcl-3.02.tar.gz.
	tar -zxvf mysqltcl-3.02.tar.gz
	(If you are using Fedora Core 5's installation of mysql, then just use the following)
	./configure --with-tcl=/usr/local/ActiveTcl/lib/tcl8.4 --with-tclinclude=/usr/ local/ActiveTcl/include/tcl8.4 --with-mysql-include=/usr/include/mysql --with-mysql-lib=/var/lib/mysql
	make
	make install

	After the install, the file will be installed under /usr/local/ActiveTcl/lib/mysqltcl-3.02.  So, you don't have 
	to copy it from other directory.


7.Checkout env_setup code from SVN server
[root@pc1 hans]# svn checkout --no-auth-cache svn://172.18.7.201/hans/env_setup
A  env_setup/cfg
A  env_setup/cfg/database.cfg
A  env_setup/log
A  env_setup/lib
A  env_setup/lib/tree1.tcl
A  env_setup/lib/lib_from_qingxu.tcl
A  env_setup/lib/textprops.tcl
A  env_setup/lib/common_access.tcl
A  env_setup/lib/proc_lib.tcl
A  env_setup/lib/.common_access.exp.swp
A  env_setup/lib/runtest_lib.tcl
A  env_setup/lib/common_variable.tcl
A  env_setup/data
A  env_setup/main_env_setup.tcl
A  env_setup/tags
Checked out revision 42.

.This command will create an env_setup directory in current directory. all env_setup application file will be saved in this directory.
 
8.Create/Backup database 
	.Create database by mysql application
	# mysql -u root -p
        mysql>create database testdatabase;
        mysql>exit;

	.Import database structure file
        # mysql -u root -p testdatabase <testdatabase_structure.sql
        Enter password:
	
	.Backup database manually
	mysqldump testdatabase -u test --password=123456 -h 127.0.0.1 -c -d>table_structure.sql
	mysqldump testdatabase -u test --password=123456 -h 127.0.0.1 -c -t>table_data.sql
	mysqldump testdatabase -u test --password=123456 -h 127.0.0.1 -c >table_structure_and_data.sql

9.Edit Configuration file
	. edit env_setup/cfg/database.cfg for database connection
		set DB_SERVER "127.0.0.1"
		set DB_USER "test"
		set DB_PASS "123456"
		set DB_NAME "testdatabase"
	. edit env_setup/cfg/options.cfg for operator_ip and operator_name
		set operator_ip "172.18.7.201"
		set operator "hans"


10.Enjoy it
	#cd env_setup
	#wish8.4 main_env_setup.tcl
or      #./main_env_setup.tcl

11.Need help
Please take below steps: 
	1. Read this file again
        2. Read Notes_of_MySQL_and_TCL.doc in this directory (or check lastest version in http://172.18.7.223 )
        3. Come to bother me

Contact: 
	Hans Yin
	Phone:  604-4301063(ext 984)  or 604-4301297(ext 213)
	Email: 	hyin@fortinet.com
	Skype:  hans_yin_vancouver