Различия

Здесь показаны различия между двумя версиями данной страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
dev:ubuntu:setupsvr [2016/04/04 12:03]
denis [redmine]
dev:ubuntu:setupsvr [2017/10/17 09:59] (текущий)
denis
Строка 153: Строка 153:
 cd /​opt/​redmine/​apps/​redmine/​htdocs ​ cd /​opt/​redmine/​apps/​redmine/​htdocs ​
 /​opt/​redmine/​ruby/​bin/​ruby bin/rake db:migrate RAILS_ENV=production /​opt/​redmine/​ruby/​bin/​ruby bin/rake db:migrate RAILS_ENV=production
 +</​code>​
 +  - copy from the old installation
 +    - ''/​opt/​redmine/​apps/​redmine/​htdocs/​files'' ​
 +    - ''/​opt/​redmine/​apps/​redmine/​htdocs/​plugins''​
 +    - ''/​opt/​redmine/​apps/​redmine/​htdocs/​public/​themes''​
 +  - <​code>​
 +cd /​opt/​redmine/​apps/​redmine/​htdocs ​
 +/​opt/​redmine/​ruby/​bin/​ruby bin/rake redmine:​plugins RAILS_ENV=production
 +/​opt/​redmine/​ruby/​bin/​ruby bin/rake tmp:​cache:​clear
 +/​opt/​redmine/​ruby/​bin/​ruby bin/rake tmp:​sessions:​clear
 +/​opt/​redmine/​ctlscript.sh restart
 </​code>​ </​code>​
  
  
 +
 +==== iptable ====
 +Свой адрес - 192.168.2.190. Слушать порт 2223 и отправлять на 192.168.0.7:​80:​
 +  iptables -t nat -A PREROUTING -p tcp -d 192.168.2.190 --dport 2223 -j DNAT --to-destination 192.168.0.7:​80
 +
 +==== mount windows share for rsync operation ====
 +
 +  sudo apt-get install cifs-utils
 +
 +Создать файл ''/​data/​jroboplc/​backup'':​
 +<code bash>
 +#!/bin/bash
 +
 +# setup
 +targetdir=/​data/​jroboplc
 +sharehost=//​192.168.2.40/​promauto-src1
 +backupdir=.
 +
 +# code (do not change)
 +if [ "​$EUID"​ -ne 0 ]
 +  then echo "​Please run as root"
 +  exit
 +fi
 +mntdir=/​mnt/​wnd-share-tmp
 +if [ ! -d "​$mntdir"​ ]; then
 +  mkdir $mntdir
 +fi
 +mount $sharehost -t cifs -o uid=1000,​gid=1000,​username=guest,​password=''​ $mntdir
 +if ! grep $sharehost /​proc/​mounts;​ then
 +  echo "​Unable to mount share directory"​
 +  exit
 +fi
 +cd $mntdir
 +mkdir -p $backupdir
 +rsync -avzh $targetdir $mntdir/​$backupdir
 +cd /
 +sleep 1
 +umount $sharehost
 +</​code>​
 +
 +Настройка cron:
 +  sudo crontab -e
 +
 +  0 * * * * /​data/​jroboplc/​backup
  
   ​   ​
 +==== timezone ====
 +
 +  sudo dpkg-reconfigure tzdata
   ​   ​
 +Отключение и включение синхронизации времени в сети:  ​
 +  timedatectl set-ntp 0
 +  timedatectl set-ntp 1
 +
  
dev/ubuntu/setupsvr.1459760617.txt.gz · Последние изменения: 2016/04/04 12:03 — denis
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0