软件简介:
系统:win2003 centos5.0 centos5.0和LINUX一样
win2003步骤
下载oracal。win32版的 用讯雷下载,这是在win2003上面安装的!
http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
下载好后解压缩点setup.exe运行画面出来后点高级安装,然后一直下一步一直到所有帐号用同一个密码
点所有帐号用同一个密码,方便管理!这里随便设
安装好以后打开IE。输入http://127.0.0.1:5560/isqlplus
用户名:system
密码:设置你自己的
连接符orcl(安装ORACLE时候的标识)
优化ORACLE 页面进入(优化解决卡验证,修复下数据错误即可)
http://127.0.0.1:1158/em
然后在网页中间空白复制以下四段代码.每复制一段按一下执行,然后删除再复制下一段!
create user tlbb IDENTIFIED BY iernei37d;
create user tl_gameuser IDENTIFIED BY iernei37d;
create user tlbb_read IDENTIFIED BY iernei37d;
以上为第一段:最后面iernei37d分别为后面三个帐号的密码tlbb tl_gameuser tlbb_read
-- Grant/Revoke role privileges
grant connect to TLBB;
grant resource to TLBB;
-- Grant/Revoke system privileges
grant alter session to TLBB;
grant create cluster to TLBB;
grant create database link to TLBB;
grant create sequence to TLBB;
grant create session to TLBB;
grant create synonym to TLBB;
grant create table to TLBB;
grant create view to TLBB;
以上为第二段
-- Grant/Revoke role privileges
grant connect to tl_gameuser;
grant resource to tl_gameuser;
-- Grant/Revoke system privileges
grant alter session to tl_gameuser;
grant create cluster to tl_gameuser;
grant create database link to tl_gameuser;
grant create sequence to tl_gameuser;
grant create session to tl_gameuser;
grant create synonym to tl_gameuser;
grant create table to tl_gameuser;
grant create view to tl_gameuser;
以上为第三段
-- Grant/Revoke role privileges
grant connect to tlbb_read;
grant resource to tlbb_read;
-- Grant/Revoke system privileges
grant alter session to tlbb_read;
grant create cluster to tlbb_read;
grant create database link to tlbb_read;
grant create sequence to tlbb_read;
grant create session to tlbb_read;
grant create synonym to tlbb_read;
grant create table to tlbb_read;
grant create view to tlbb_read;
以上为第四段
然后在win2003下导入dmp文件 开始--运行---输入cmd
Imp tlbb/iernei37d file=d:\tlbb.dmp ignore=y
Imp tl_gameuser/iernei37d file=d:\tl_gameuser.dmp ignore=y
这里我设置是d盘 所以放到d盘 tlbb/后面这是刚才设置的密码你放在E盘tlbb里面就把d:\改成e:\tlbb\
好了 到如成功
然后运行plsqldev
UsersTL_gameuser--Objects--Tables--Userbase 编辑 权限
被授予者tlbb yes yes yes yes
Users--tlbb 编辑
权限
被授予者
tl_gameuser.seq_user_basic_uin yes
tl_gameuser.user_basic yes yes yes yes
然后注销 登陆 tlbb mugua2234
Users--tlbb--OBJECTS--PROcedures
编译下第一个
oracle部分配置完成
or在win 的部分就这么简单。
031版本
ORACLE增加字段
SERVER_STATUSchar(1)'1'
REALNAME_BINDchar(1)'N'
CONFIRM_PROTOCOLchar(1)'N'
密码必须:iernei37d
以下是linux教程
具体步骤
装mysql
装mysqlodbc
解压Linux下的精简版oracle
传WIN2003的X:\oracle\product\10.2.0\db_1\NETWORK\ADMIN里tnsnames.ora到/home/instantclient_10_2文件夹里
加系统变量
传ini两个文件到根目录etc下
配置修改/home/tlbb/Billing
所有文件用scp上传到home目录里(二进制上传)二进制设置:scp里的选项--选项--传输,点二进制,再点确定!
上传好以后用CRT连接LINUX机器装mysql
cd /home ;进入home文件夹
tar xzvf mysql-5.0.45.tar.gz ;解压mysq。。ltar.gz解压这种格式命令tar xzvf 加文件名
cd /home/mysql-5.0.45 ;进入home/mysql-5.0.45文件夹
./configure --prefix=/usr/local/mysql5.0.45 --with-charset=utf8 --with-extra-charsets=all --enable-thread-safe-client ;指定安装路径
make ;时间较长
make install ;时间较长
cp /usr/local/mysql5.0.45/share/mysql/my-small.cnf /etc/my.cnf ;执行后选 Y 覆盖 别管乱码就按Y
用winSCP3返回到根目录找到etc文件夹打开后找到my.cnf编辑加入
在[mysqld] 和 [client]段都加入如下代码:
default-character-set=utf8
再返回到命令
/usr/local/mysql5.0.45/bin/mysql_install_db
/usr/local/mysql5.0.45/bin/mysqld_safe --user=root 启动mysql服务
用winSCP3返回到根目录找到etc文件夹找到re.d打开rc.local 把上面那个启动mysql加入进去!
mysql -u root -p `进入mysql操作 密码为空直接回车确认
use mysql; update user set Password=PASSWORD('bojie1976') where User='root'; `bojie1976为你要设置mysql管理员的密码.请记住
然后 加下面两段代码
insert into mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions, max_updates, max_connections, max_user_connections) value ('%', 'tlbb', PASSWORD('bojie1976'), 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
insert into mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions, max_updates, max_connections, max_user_connections) value ('%', 'tlbbtools', PASSWORD('bojie1976'), 'Y','Y','Y','Y','N','Y','N','N','N','N','N','Y','Y','N','N','N','Y','N','Y','N','N','Y','Y','N','N','N','','','','',0,0,0,0);
flush privileges;
create database tlbbdb;
create database tlbbdb_stat;
insert into mysql.db ( Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Create_tmp_table_priv, Lock_tables_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Execute_priv) value( '%', 'tlbbdb','tlbb', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
insert into mysql.db ( Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Create_tmp_table_priv, Lock_tables_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Execute_priv) value( '%', 'tlbbdb','tlbbtools', 'Y', 'Y', 'Y', 'Y', 'N', 'Y', 'N', 'Y', 'Y', 'N', 'Y', 'N', 'Y', 'Y', 'N', 'N', 'Y');
insert into mysql.db ( Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Create_tmp_table_priv, Lock_tables_priv, Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv, Execute_priv) value( '%', 'tlbbdb_stat','tlbb', 'Y', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N');
输入exit `退出mysql操作
导入数据库:
cd /home
mysql -uroot -pbojie1976 tlbbdb DBInit_0_31_0180_table_mysql.sql ;bojie1976为你的mysql root密码
mysql -uroot -pbojie1976 tlbbdb DBInit_0_31_0180_data_mysql.sql
mysql -uroot -pbojie1976 tlbbdb_stat tlbbdb_stat.sql ;bojie1976为你的mysql root密码
安装到这用sqlyoy企业测试连接!把sqlyoy里原有的连接都删掉,建新连接
主机地址为你linux的IP
帐号:tlbb
密码:bojie1976
测试连接成功!
下面安装下数据源
rpm -ivh mysql-connector-odbc-3.51.25-0.i386.rpm
修改odbc.ini 复制到etc下
接着增加系统变量
用etc打开根目录etc/profile右键编辑在最下面加入下面代码
export PATH=$PATH:/bin:/sbin:/home/instantclient_10_2
export ORACLE_HOME=/home/instantclient_10_2
export TNS_ADMIN=/home/instantclient_10_2
export LD_LIBRARY_PATH=/home/instantclient_10_2:/home/tlbb/Billing:/home/tlbb/Server
重启linux机器。用CRT连接root帐号登陆。输入reboot ;reboot为linux重启命令
重启好,接着配置服务端Billing
用ect打开/home/tlbb/Billing/etc/db_hash.conf
#散列表0:
MAXDBCONNS0 = 5
DBUSER_DB0 = tlbb
DBPASS_DB0 = JC4KQ1EJP ;JC4KQ1EJP 改成你在win机上导入四段代码中第一段第一行最后那个iernei37d
DBTNS_DB0 = ora10g ;ora10g改成win2003上的标识符orcl
#DBUSER_DB1 = tlbb
#DBPASS_DB1 = JC4KQ1EJP ;JC4KQ1EJP 改成你在win机上导入四段代码中第一段第一行最后那个iernei37d
#DBTNS_DB1 = ora10g ;ora10g改成win2003上的标识符orcl
好了,保存.再来下一个文件!
用ect打开/home/tlbb/Billing/etc/gbs.conf
MAXCONNS = 100 #最大连接数 这里改成1000
MAXDBCONNS_BILL = 20
DBUSER_GAMEBILL = tlbb
DBPASS_GAMEBILL = JC4KQ1EJP ;JC4KQ1EJP 改成你在win机上导入四段代码中第一段第一行最后那个iernei37d
DBTNS_GAMEBILL = ora10g ;ora10g改成win2003上的标识符orcl
#
MAXDBCONNS_AUTH = 20
DBUSER_GAMEAUTH = tl_gameuser
DBPASS_GAMEAUTH = SDHRFZVZ5 ;SDHRFZVZ5 改成你在win机上导入四段代码中第一段第二行最后那个iernei37d
DBTNS_GAMEAUTH = ora10g ;ora10g改成win2003上的标识符orcl
好了,保存,再来第三个文件
用ect打开/home/tlbb/Billing/etc/host.lst
打开,把那两行IP改成你Linux的IP。再保存。
然后打开Billing打开etc把所有文件选中右键点属性把下面竖排R W X都钩起来,点确定 (这是给予权限)
再回到Billing把所有文件选中(etc文件夹除外,下一步单独做)右键点属性把下面竖排R W X都钩起来,点确定 (这是给予权限)
打开Billing选中etc文件夹右键点属性把下面竖排R W X都钩起来,点确定
打开Billing打开log所有文件选中右键点属性把下面竖排R W X都钩起来,点确定 (这是给予权限)
打开Billing选中log右键点属性把下面竖排R W X都钩起来,点确定 (这是给予权限)
到这里Billing修改结束!
oracle内存分配
alter system set sga_max_size=1073741824 scope=spfile;
alter system set sga_target=1073741824 scope=spfile;
iptables设置
# Generated by iptables-save v1.3.5 on Wed Sep 24 21:58:37 2008
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [2176:187532]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 3731 -j ACCEP
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 7377 -j ACCEP
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 777 -j ACCEPT
--针对开放
-A RH-Firewall-1-INPUT -s 你的IP -p tcp -m tcp --dport 3306 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP -p tcp -m tcp --dport 1521 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP-p tcp -m tcp --dport 1521 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP -p tcp -m tcp --dport 111 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP -p tcp -m tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP -p tcp -m tcp --dport 1521 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP -p tcp -m tcp --dport 661 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP -p tcp -m tcp --dport 29438 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP-p tcp -m tcp --dport 15680 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP -p tcp -m tcp --dport 2208 -j ACCEPT
-A RH-Firewall-1-INPUT -s 你的IP-p tcp -m tcp --dport 2207 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Wed Sep 24 21:58:37 2008
下载地址:
|