centos 6/7
|__ java 1.7
|__ tomcat 7
| \__ tomcat/webapps
| |__ dsa實體1
| |__ dsa實體2
| \__ ...
以下部分可與上方分開
\__ postgresql 9.2
|__ contrib
| |__ uuid-ossp
| |__ adminpack
| \__ xml2
\__ db : dsa_server
dsa有兩種,掛了那一個service就會變成那種
步驟:
部署dsa實體
java code
#安裝svn
yum install svn
#切換至tomcat目錄
cd /usr/share/tomcat/webapps
#svn把版本庫拉下來
svn co http://update.ischool.com.tw/svn/is4/greening2-production
可能出現
Authentication realm: <http://update.ischool.com.tw:80> Subversion repository
Password for 'root': <<< 按Enter
Authentication realm: <http://update.ischool.com.tw:80> Subversion repository
Username: 輸入svn帳號
Password for '帳號': 輸入svn密碼
#移動資料夾
mv greening2-production/ dsa/
#建立資料夾並改變擁有者及權限
mkdir dsa/WEB-INF/deploy
chown -R tomcat.tomcat dsa/WEB-INF/deploy/
chmod +x dsa/WEB-INF/deploy/
cd dsa/WEB-INF/conf/
cp server.xml.template server.xml
vim server.xml
<?xml version="1.0" encoding="utf-8"?>
<ApplicationServer Type="SharedService" Name="[注a]">
<Property Name="ServerConnection">
<ServerConnection>
<Driver>org.postgresql.Driver</Driver>
<URL>jdbc:postgresql://xxx/dsa_server[注b]</URL>
<UserName>[注c]</UserName>
<Password>[注d]</Password>
</ServerConnection>
</Property>
</ApplicationServer>
欄位name為[注a]
欄位configuration調整部分為以下
<Property Name="UpdateCenter">
<UpdateCenter>
<AppDeploy UserName="update">[注1]</AppDeploy>
<Components UserName="update">[注2]</Components>
</UpdateCenter>
</Property>
<Property Name="LoadBalanceSetup">
<LoadBalanceSetup>
<ServerManagerURL>[注3]</ServerManagerURL>
</LoadBalanceSetup>
</Property>
依種類設定測試