os:CentOS-7-x86_64-Everything-1511,
ip:10.11.4.186
2. 版本jdk版本(cmdb推荐版本1.8,采用1.8.0_131):
tomcat版本(cmdb推荐版本7.068,采用7.0.79):
postgresql版本(cmdb推荐版本9.3,采用9.6.3):https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
二.Tomcat安装配置 1. 安装jdk 1)下载jdk[root@psql_master ~]# cd /usr/local/src/ [root@psql_master ~]# wget Oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm?AuthParam=1499065226_0efcc513ff7eb3edb189b0ee0eb7f2d1
2)安装jdk#安装完成后可使用"java --version"查看环境是否准备就绪 [root@psql_master ~]# rpm -ivh jdk-8u131-linux-x64.rpm
2. 安装tomcat 1)下载tomcat#注意是下载二进制包,非src包" apache-tomcat-7.0.79-src.tar.gz" [root@psql_master src]# wget
2)解压&设置tomcat[root@psql_master src]# tar -zxvf apache-tomcat-7.0.79.tar.gz -C /usr/local/ [root@psql_master src]# cd /usr/local/ [root@psql_master local]# mv apache-tomcat-7.0.79/ tomcat7/
3)设置环境变量#"tomcat7.sh"中的"tomcat7"部分自定义 [root@psql_master local]# vim /etc/profile.d/tomcat7.sh CATALINA_HOME=/usr/local/tomcat7 export PATH=$PATH:$CATALINA_HOME/bin [root@psql_master local]# source /etc/profile
4)设置iptables#tcp5432是postgresql的监听端口,tcp8080是tomcat的监听端口 [root@psql_master local]# vim /etc/sysconfig/iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 5432 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT [root@psql_master local]# service iptables restart
5)设置开机启动(CentOS7.x) 增加tomcat启动参数#文件名“setenv.sh”固定,catalina.sh启动的时候会调用; #“tomcat.pid”文件会在tomcat启动后生成在$TOMCAT_HOME目录下 [root@psql_master local]# vim /usr/local/tomcat7/bin/setenv.sh #add tomcat pid CATALINA_PID="$CATALINA_BASE/tomcat.pid"
增加tomcat.service#“tomcat.service”中的“tomcat”部分自定义; #或者在/etc/rc.d/rc.local添加启动脚本。 [root@psql_master local]# vim /usr/lib/systemd/system/tomcat.service [Unit] Description=Tomcat After=syslog.target network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/usr/local/tomcat7/tomcat.pid ExecStart=/usr/local/tomcat7/bin/startup.sh ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target [root@psql_master local]# systemctl enable tomcat.service
6)启动&验证tomcat 启动tomcat#或者使用systemctl命令 [root@psql_master local]# catalina.sh start
查看端口[root@psql_master local]# netstat -tunlp
web访问浏览器::8080
三.部署cmdbuild 1. 下载cmdbbuild