## confluence- 工程迁移
```
cd /home/data
zip -r atlassian-confluence-5.10.3.zip atlassian-confluence-5.10.3/*
zip -r confluence-data.zip confluence/confluence-data/*
scp atlassian-confluence-5.10.3.zip root@xx.xx.xx.xx:/datas/server/confluence
scp confluence-data.zip root@xx.xx.xx.xx:/datas/server/confluence
```
## 解压工程
地址:xx.xx.xx.xx
```
/datas/server/confluence
unzip atlassian-confluence-5.10.3.zip
unzip confluence-data.zip
```
## 配置confluence home目录
```
cd /datas/server/confluence/atlassian-confluence-5.10.3/confluence/WEB-INF/classes
vi confluence-init.properties
confluence.home=/datas/server/confluence/confluence-data
```
## 配置数据源到阿里云测试rds 数据库
/datas/server/confluence/confluence-data
```
vi confluence.cfg.xml
```
##去掉storage_engine=inndo 否则无法启动
<property name="hibernate.connection.url">jdbc:mysql://xx.xx.xx.xx/confluence</property>
##替换内网ip到最新的域名
```
sed -i 's/xx.xx.xx.xx/xx.xx.xx.xx/g' entities.xml
```
## 迁移数据库
只用用工具导出即可,导入到线上测试rds,
## 服务启动
/home/data/server/confluence/atlassian-confluence-5.10.3/bin/startup.sh
## 服务停用
/home/data/server/confluence/atlassian-confluence-5.10.3/bin/shutdown.sh
------------------zentao-----------------------
```
yum install php.x86_64
yum install php-fpm.x86_64
yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt
```
## 工程迁移
地址:xx.xx.xx.xx
```
cd /var/www/html/
zip -r pms.zip pms/*
scp pms.zip root@60.205.171.138:/var/www/html
```
## 解压工程
地址:xx.xx.xx.xx
```
cd /var/www/html/
unzip pms.zip
```
## 配置数据源到阿里云测试rds 数据库
vi /var/www/html/pms/config/my.conf
```
$config->installed = true;
$config->debug = true;
$config->requestType = 'GET';
$config->db->host = 'xx.xx.xx.xx';
$config->db->port = '3306';
$config->db->name = 'zentao';
$config->db->user = 'xxx';
$config->db->password = 'xxx';
```
## 迁移数据库
只用用工具导出即可,导入到线上测试rds,
## 配置 apache
/etc/httpd/conf/httpd.conf
```
Listen 82
ServerName localhost:82
DocumentRoot "/var/www/html/pms"
<Directory "/var/www/html/pms">
AllowOverride None
Require all granted
</Directory>
<Directory "/var/www/html/pms">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
```
## 重启apache
```
service httpd restart
```
## apache 日志目录
```
/etc/httpd/logs
```
## 配置 nginx 转发
```
server
{
listen 80;
server_name xxx.xxx.cn;
access_log logs/zentao.access.log main;
index index.php index.htm index.html;
location / {
root html;
proxy_pass http://127.0.0.1:82;
}
}
```
## 重启 nginx
```
nginx -t
nginx -s reload
```
## 服务启动
```
./nginx
service httpd start
```