1. 在Vmware中安装CentOS
使用Vmware建立虚拟机,内存4G,硬盘60G,配置好CentOS 6.3 x64的iso镜像按步骤安装即可,选择Minimal Desktop包,且删除其中的Java包
2. 为自动安装的CentOS添加163的yum源:http://mirrors.163.com/.help/centos.html
3. 安装Oracle安装所需的软件
软件列表如下:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11(32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11(32 bit)
以上软件可通过如下yum语句一次安装完毕:
yum install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat unixODBC unixODBC.i686 unixODBC-devel unixODBC-devel.i686
(2020.4.14: CentOS 7.7 Server With GUI上安装时用如下语句:yum install gcc libaio glibc ompat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf-devel glibc-devel glibc-headers gcc-c++ libaio-devel libaio-devel.i686 ibgcc libstdc++ libstdc++-devel unixODBC unixODBC.i686 unixODBC-devel unixODBC-devel.i686 ksh)
使用 yum install xxx(.i686) 安装,若yum遇到问题,尝试如下方法:
yum clean all
yum makecache
4. 配置用户组和目录
#groupadd oinstall
#groupadd dba
#useradd -g oinstall -G dba oracle
#passwd oracle
#mkdir -p /u01/app/base/oracle
#chown -R oracle:oinstall /u01/app
#chmod -R ug+w /u01/app
5. 修改配置文件
5.1 /etc/sysctl.conf
添加如下内容:
fs.aio-max-nr= 1048576
fs.file-max =6815744
kernel.shmall= 2097152
kernel.shmmax= 2072778752
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
改好后运行#/sbin/sysctl -p
5.2 /etc/security/limits.conf
添加如下内容:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
root soft nproc 2047
root hard nproc 16384
root soft nofile 1024
root hard nofile 65536
5.3 /etc/pam.d/login
添加如下内容:
session required pam_limits.so
5.4 /etc/profile
添加如下内容:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
5.5 /home/oracle/.bash_profile
添加如下内容:
ORACLE_BASE=/u01/app/base
ORACLE_HOME=/u01/app/base/oracle
ORACLE_SID=wind
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
6. 切换到oracle账户登录,然后安装oracle 11gR2 (2020.4.14: CentOS 7.7上安装时发现得加上Java路径,即执行命令./runInstaller -jreLoc /usr/lib/jvm/jre-1.8.0,不然安装时界面会卡死),注意选择Install database software only,Enterprise Edition(取消勾选Select Options中的所有项)
安装完成后,会自动设置如下变量:
ORACLE_OWNER=oracle
ORACLE_HOME=/u01/app/base/oracle
7. 准备安装Windchill
7.1 再次切回root登录,安装xterm: yum install xterm
7.2 执行命令:#xhost +
7.3 启动Oracle Listener:
#su - oracle
#lsnrctl start
8. 安装Windchill
Windchill PSI 的包号为60702,OCU包号为60419
安装过程中的配置可参考如下:
Installation Overview
New Installation
Windchill PDMLink
- Windchill Language Pack
Installing To: /opt/ptc/Windchill_10.1/Windchill
Disk Space Required: 4.95 GB
Java Software Development Kit
Installing To: /opt/ptc/Windchill_10.1/Java
Disk Space Required: 211 MB
Apache Web Server
Installing To: /opt/ptc/Windchill_10.1/Apache
Disk Space Required: 146 MB
Windchill Directory Server
Installing To: /opt/ptc/Windchill_10.1/WindchillDS
Disk Space Required: 483 MB
Oracle Configuration
Installing To: /opt/ptc/Windchill_10.1/ocu
Disk Space Required: 5.09 GB
Base Installation Directory:
/opt/ptc/Windchill_10.1/
Shortcut Folder
Do Not Install
Disk Space Summary of Volume (/):
Required: 10.7 GB
Available: 39.71 GB
Data Loader Settings
Create database schema
Yes
Load base data
Yes
Load demo data
Yes
Web Server and Servlet Engine Settings
Web Server DNS Registered Host Name:
localhost.localdomain
HTTP Port Number:
80
HTTPS Port Number:
443
Servlet Engine Web Server Listener Port Number:
8010
Servlet Engine DNS Registered Host Name:
localhost.localdomain
Language Settings
Base Data Language:
English
Display Languages:
Simplified Chinese
Database Size
Database Size:
Demo/Test (5000 MB)
Database Settings
Multibyte character set storage is required for multibyte languages.
Enable multibyte character set storage
Oracle Server Installation Directory (ORACLE_HOME):
/u01/app/base/oracle
Oracle Database DNS Registered Host Name:
localhost.localdomain
Oracle Database Listener Port Number:
1521
Oracle Database System Identifier (SID):
wind
Oracle 'SYSTEM' Account Password:
ts
Confirm Oracle 'SYSTEM' Account Password:
ts
Oracle User Name for Windchill Installation:
oracle
Oracle User Password for Windchill Installation:
ts
Confirm Oracle User Password for Windchill Installation:
ts
Default Tablespace Name:
USERS
Temporary Tablespace Name:
TEMP
LDAP Server Settings
LDAP Server DNS Registered Host Name:
localhost.localdomain
LDAP Server Port Number:
389
LDAP Server Administrator Distinguished Name:
cn=Manager
LDAP Server Administrator Password:
ts
Confirm LDAP Server Administrator Password:
ts
LDAP Base DN:
o=ptc
LDAP Server Administration Port:
4444
LDAP Server JMX Access Port Number:
1689
Base Distinguished Name for Product Properties:
cn=configuration,cn=Windchill_10.1,o=ptc
Base Distinguished Name for Administrative Users:
ou=people,cn=AdministrativeLdap,cn=Windchill_10.1,o=ptc
Base Distinguished Name for Enterprise Users:
ou=people,cn=EnterpriseLdap,cn=Windchill_10.1,o=ptc
Enable Separate Enterprise LDAP Server
No
JNDI Adapter Settings
Enterprise Repository LDAP Server Host Name:
localhost.localdomain
Enterprise Repository LDAP Server Port:
389
Enterprise Adapter Name
localdomain.EnterpriseLdap
LDAP Connection
Bind as User
Enterprise Repository LDAP User Distinguished Name:
cn=Manager
Enterprise Repository LDAP Password:
ts
Windchill Privileges for Repository
Read, Write
LDAP Service
Other V3 Compliant LDAP
Repository Contains
Users
Core Product Settings
Windchill Site Administrator:
Create New
Windchill Site Administrator User Name
wcadmin
Windchill Site Administrator Password:
ts
Confirm Windchill Site Administrator Password:
ts
Select the Repository Where the Site Administrator is Stored:
Administrative
Web Application Context Root:
Windchill
Info*Engine Server Task Processor Port Number:
10002
Initial Organization Name:
julian
Organization Internet Domain Name:
localhost.localdomain
System Quality Agent
*Environment
Non-Production
Configure to Send and Receive System Information
No
Email Address for Information Exchange, Apache, and System Notifications:
Company Name
PTC
Sales Order Number (SON)
341
Service Contract Number (SCN)
341
9. 启动 Windchill
以root身份登录,然后执行如下命令:
#su - oracle
#lsnrctrl start
#sqlplus "/as sysdba"
#SQL>startup
#SQL>exit
#su
#/opt/ptc/Windchill_10.1/Apache/bin/apachectl start
#/opt/ptc/Windchill_10.1/WindchillDS/server/bin/start-ds
#/opt/ptc/Windchill_10.1/Windchill/bin/windchill start
10. Java的配置
10.1 配置JDK路径
修改/etc/profile,添加如下内容:
JAVA_HOME=/opt/ptc/Windchill_10.1/Java
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME PATH CLASSPATH
10.2 为Firefox配置java
Windchill 中某些功能需要在浏览器中运行java程序,但CentOS默认安装的Firefox并没有配置java,配置方法也很简单,执行如下命令即可:
#cd /usr/lib64/mozilla/plugins
#ln -s /opt/ptc/Windchill_10.1/Java/jre/lib/amd64/libnpjp2.so
11. 其他配置
11.1 语言配置
可根据需要,编辑/etc/sysconfig/i18n,将LANG="zh_CN.UTF-8"修改为LANG="en_US.UTF-8"
然后,也可以在需要中文语言的账户下修改其.bash_profile文件,添加如下语句:
export LANG="zh_CN.UTF-8"
11.2 防火墙配置
如果是完全按照上述步骤配置的话,那么此时CentOS的80端口是禁用的,即无法从其他计算机访问Windchill,需要配置防火墙启用80端口:
方法一:
在控制台执行命令#setup,弹出如下窗口:
选择Firewall configuration>Run Tool,进入如下界面:
此时可以直接按空格键取消Enabled前的 * ,禁用Firewall,然后OK,退出即可
或者选择Customize,进入如下界面:
在Trusted Services列表中,只有SSH是勾选的,而WWW (HTTP)未勾选,此时只要按空格键勾选WWW (HTTP)即可,其他设置不要动,最后退出就可以了
注:不需要重启系统
方法二:
使用命令或直接编辑/etc/rc.d/init.d/iptables来修改防火墙配置,我对这种方法不熟悉,故不在此作叙述