1. Oracle Client Enviroment 2. Perl Modules Installation
1. Oracle Client Enviroment 1.1. 从Oracle Server上打包$ORACLE_BASE cd /oracle, tar -cf admin.tar admin, 同目录还有jre,oui,product; gzip product.tar 在89主机上 scp [email protected]:/oracle/jre.tar /oracle/ 解压 groupadd dba; gourpadd oinstall; useradd -d /home/oracle/ -s /bin/bash -g oinstall -G dba -m oracle; chown -R oracle:dba /oracle 1.2. 编辑oracle用户的.bash_profile,加入: ---------.bash_profile------------------------------------ ##########################Add for locale ENV############ PS1="[`/usr/bin/whoami`@`hostname|cut -d. -f1`:`pwd`]=>" export PS1 export LANG=zh_CN.GB18030 export LANGUAGE=zh_CN.GB18030:zh_CN.GB2310:zh_CN export LANGVAR=zh_CN.GB18030 #########################Add for ORACLE_ENV############ export ORACLE_BASE=/oracle export ORACLE_HOME=$ORACLE_BASE/product/9.2.0.4 export ORACLE_SID=vodapp export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK" export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib export PATH=$PATH:$ORACLE_HOME/bin ---------.bash_profile------------------------------------ 1.3. 以oracle用户登陆,察看tnsping vodapp;测试 sqlplus vodapp:xxxx@vodapp, 连接成功!Oracle Client环境配置完毕! 出于后面调试方便考虑,把oracle对应的环境变量也加入到/root/.bash_profile
2. Perl Database Modules Installation 2.1. perl -v 确认版本为5.8x 2.2. DBI-1.37 / DBD-Oracle-1.14 安装 perl Makefile.PL; make ; make install 2.3. 安装mysql-3.23.58.tar.gz , DBD-mysql-2.9002.tar.gz ---------mysql------------------------------------ cd mysql-3.23.58 ./configure --with-unix-socket-path=/var/lib/mysql/mysql.sock 或者:./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql make make install 编译后的mysql执行程序放在/usr/local/bin目录下。 1, groupadd mysql useradd -d /home/mysql -s /bin/bash -g mysql -m mysql 2, # vi /etc/my.cnf ####################### [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid ###################### 3, /usr/local/bin/mysql_install_db Note: create /var/lib/mysql chown -R mysql:mysql /var/lib/mysql 4, /usr/local/bin/safe_mysqld --defaults-file=/etc/my.cnf & 5, vi /etc/rc.d/rc.local 添加 /usr/local/bin/safe_mysqld --defaults-file=/etc/my.cnf & ---------mysql------------------------------------ cd DBD-mysql-2.9002; perl Makefile.PL; make ; make install
|
请发表评论