author :BaiFuyou
date : 2016-6-17
version : 1.1
Functino : 不同的host主机名下的windchill10.2 完全移植手册(包含oracle12c移植).
1.启用命令行,安装oracle的环境依赖包
[root@wcadmin.cn]# su root
[root@wcadmin.cn]# yum -y install binutilscompat-libcap1compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel kshlibgcclibstdc++ libstdc++-devel libaio libaio-devel libXext libXtstlibX11libXau libxcb libXi make sysstat xterm
2.创建相应的oracle操作用户和windchill操作用户和对应的组。(同样在oracle中执行)
#创建用户
[root@wcadmin.cn]# useradd -d /home/oracle-m oracle
[root@wcadmin.cn]# useradd -d/home/windchill -m windchill
#添加用户到组
[root@wcadmin.cn]# groupadd oinstall
[root@wcadmin.cn]# groupadd dba
[root@wcadmin.cn]# usermod -a -G oinstalloracle
[root@wcadmin.cn]# usermod -a -G dba oracle
[root@wcadmin.cn]# groupadd windchill
[root@wcadmin.cn]# usermod -a -G windchillwindchill
3.修改配置文件(在root中执行)
[root@wcadmin.cn]#vi /etc/sysctl.conf
#在末尾添加
#value
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall =33554432
kernel.shmmax = 137438953472
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
#保存
[root@wcadmin.cn]# /sbin/sysctl -p
[root@wcadmin.cn]# vi/etc/security/limits.conf
#在末尾添加
#value
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle stack nproc 16384
#保存
[root@wcadmin.cn]# vi /etc/hosts
#将最后的主机名放到前面
#例如
127.0.0.1 localhost wcadmin.cn.com
#改成
127.0.01 wcadmin.cn.com localhost
#保存
#修改oracle的配置文件
[root@wcadmin.cn]# su oracle
[oracle@wcadmin.cn]# vi ~/.bash_profile
#value for oracle
DISPLAY=:0.0
TMP=/tmp
TMPDIR=$/TMP
PATH=$PATH:.:$ORACLE_HOME/bin
ORACLE_BASE=/home/oracle/plm/u01/app
ORACLE_SID=orcl
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib
export DISPLAY
export LD_LIBRARY_PATH
export ORACLE_HOME
export ORACLE_SID
export ORACLE_BASE
export TMP TMPDIR
export PATH
#保存
#刷新
[oracle@wcadmin.cn]# source ~/.bash_profile
4.解压oracle.tar.gz和windchill.tar.gz压缩包
[oracle@wcadmin.cn]# su root
[root@wcadmin.cn]# tar -xzf oracle.tar.gz-C /home
[root@wcadmin.cn]# tar -xzfwindchill.tar.gz -C /home
5.配置启动oracle
[root@wcadmin.cn]# su oracle
[oracle@wcadmin.cn]#vi/home/oracle/plm/u01/app/product/12.1.0/dbhome_1/network/admin/listener.ora
#将里面的主机名修改成/etc/hostname中的主机名
[oracle@wcadmin.cn]#vi/home/oracle/plm/u01/app/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
#将里面的主机名修改成/etc/hostname中的主机名
#修改之后尝试启动oracle
[oracle@wcadmin.cn]# source ~/.bash_profile
[oracle@wcadmin.cn]# lsnrctl start
[oracle@wcadmin.cn]# netstat -lntp | grep1521 | wc -l
#出现1 代表启动监听成功
[oracle@wcadmin.cn]# sqlplus /nolog
SQL> connect / as sysdba
SQL> startup
#显示Databases opened则启动成功
6.配置启动windchill
[oracle@wcadmin.cn]# source ~/.bash_profile
[oracle@wcadmin.cn]# sqlplus
Enter user-name: wcadmin
Enter password:wcadmin
#修改第一个url 值为/etc/hostname中的主机名
SQL> update site seturl='http://xxx.xxx.com:8080/Windchill/servlet/WindchillGW'whereurl='http://xxx.xxx.com:8080/Windchill/servlet/WindchillGW';
#修改url 值为/etc/hostname中的主机名
SQL> update repositorysetlastKnowndomain='wcadmin..com' where local=1;
SQL>update repository setguid='Ldap. wcadmin..com',lastKnowndomain='Ldap. wcadmin..com ' wherelocal=0;
#修改第一个url 值为/etc/hostname中的主机名
SQL> update fvhost set hostname='wcadmin..com ' wherehostname=' wcadmin..com ';
#提交
SQL> COMMIT;
#切换windchill用户
[windchill@ wcadmin..com]#cd/home/windchill/Windchill102/opt/ptc/Windchill_10.2/WindchillDS/server/bin
#启动LDAP
[windchill@ wcadmin..com]# ./start-ds
[windchill@ wcadmin..com]# netstat -lntp |grep 1389 |wc-l
#如果值为1则表示启动LDAP成功
[windchill@ wcadmin..com]# cd/home/windchill/Windchill102/opt/ptc/Windchill_10.2/Windchill/bin
[windchill@ wcadmin..com]# ./windchillshell
[windchill@ wcadmin..com]# cdadminTools/rehost/
#url 为/etc/hostname中的主机名,两个都是
[windchill@ wcadmin..com]#ant"-Dtarget-ldap=ldap://cn=Manager:wcadmin@ wcadmin..com
:1389/"-Dtarget-domain= wcadmin..com
#接着会让输入skip和y直接输入,等待之后会出现 BUILD SUCCESSFUL则表示执行成功
[windchill@ wcadmin..com]#cd/home/windchill/Windchill102/opt/ptc/Windchill_10.2/HTTPServer/
#下面所有的命令中的url都要修改成/etc/hostname中的主机名
[windchill@ wcadmin..com]# ant-DserverName=wcadmin..com -f config.xml reconfigure
#等待之后会出现 BUILD SUCCESSFUL则表示执行成功
[windchill@ wcadmin..com]# ant -DAJP_HOST= wcadmin..com-f config.xml configureAJPWorkers
#等待之后会出现 BUILD SUCCESSFUL则表示执行成功
[windchill@ wcadmin..com]# ant -fwebAppConfig.xmladdAuthProvider
-DappName=Windchill-DproviderName=AdministrativeLdap"-DldapUrl=ldap://wcadmin..com:1389/ou=people,cn=AdministrativeLdap,cn=Windchill_10.2,o=ptc"-DbindDn="cn=Manager"-DbindPwd="wcadmin"
#等待之后会出现 BUILD SUCCESSFUL则表示执行成功
[windchill@wcadmin..com]# ant -fwebAppConfig.xmladdAuthProvider -DappName=Windchill-DproviderName=EnterpriseLdap"-DldapUrl=ldap://afterloe.yunshen.com:1389/ou=people,cn=EnterpriseLdap,cn=Windchill_10.2,o=ptc"-DbindDn="cn=Manager"-DbindPwd="wcadmin"
#等待之后会出现 BUILD SUCCESSFUL则表示执行成功
#url为/etc/hostname中的主机名
[windchill@wcadmin.cn]# xconfmanager-s"wt.pom.jdbc.host=afterloe.yunshen.com" -t db\db.properties -p
7.重启Apache
[windchill@wcadmin.cn]#cd/home/windchill/Windchill102/opt/ptc/Windchill_10.2/HTTPServer/bin
[windchill@wcadmin.cn]# ./apachectl stop
[windchill@wcadmin.cn]# netstat -lntp |grep 8080 |wc-l
#为0则表示关闭成功
[windchill@wcadmin.cn]# ./apachectl start
#为1则表示打开成功
[windchill@wcadmin.cn]# netstat -lntp |grep 8080 |wc-