Centos7阿里雲安裝OpenProject-親測


10/18
2019年10月18日
13:50
 
參考 <https://ywnz.com/linuxyffq/4085.html>
說在前頭:網上有各種教程,包括官方自己的教程,在阿里雲服務器上安裝的時候遇到各種錯誤,
另外數據庫只能用他官方推薦的PostgreSQL,官網給出很明白的說明
Can I use MySQL instead of PostgreSQL?
Briefly: no. OpenProject has traditionally supported both MySQL and PostgreSQL, but in order to optimize for performance and SQL functionality, it is unfeasible to support both DBMS that are becoming more and more disjunct when trying to use more modern SQL features. This shift has started some years ago when full-text search was added for PostgreSQL, but at the time MySQL did not yet support it - and as of yet many distributions still do not support MySQL 8 natively.
This led us to the path of removing support in the upcoming stable releases of OpenProject in order to focus on these goals. Please see our blog post on the matter for additional notes.
 
來自 <https://www.openproject.org/download-and-installation/#configuration>
記得最后安裝完開啟端口,然后重啟網絡服務還有重啟服務器
/sbin/iptables -I INPUT -p tcp --dport 端口號 -j ACCEPT #開啟端口
service network restart
 
 
更新系統
在安裝之前請更新系統軟件包到最新的版本:
sudo yum -y update
添加OpenProject存儲庫
接下來是通過在終端中執行以下命令來添加OpenProject Repository:
sudo yum -y install wget(阿里雲應該是不需要執行這個)
sudo wget -O /etc/yum.repos.d/openproject-ce.repo https://dl.packager.io/srv/opf/openproject-ce/stable/8/installer/el/7.repo
sudo wget -O /etc/yum.repos.d/openproject.repo \   https://dl.packager.io/srv/opf/openproject/stable/10/installer/el/7.repo
安裝OpenProject Community Edition包
項目主頁:https://github.com/opf/openproject-ce(本文所介紹的安裝方法不需要你另外去下載)
添加OpenProject存儲庫並為OpenProject配置數據庫后,在CentOS 7/Fedora 29上安裝OpenProject Community Edition軟件包。
sudo yum -y install openproject
在CentOS 7上配置OpenProject
OpenProject安裝向導支持MySQL數據庫的自動設置,OpenProject包是通過傳遞給openproject用戶的ENV參數配置的。
運行以下命令讀取當前ENV參數:
$ openproject run env
附:重新配置OpenProject的方法
如果你想重新配置OpenProject,請運行以下命令:
$ openproject reconfigure
上面的命令將再次顯示安裝向導,請注意,它將從頭開始配置/安裝過程。
如果剛剛更新了OpenProject版本,則應運行openproject configure,它將自動重用以前的配置,並且只有在有
新的配置選項可用時才會需要你來確認。
 
 
 
 
擴展緩存
Scaling the number of web workers
Depending on your free RAM on your system, we recommend you raise the default number of workers. The default from 9.0.3 onwards is four worker processes. Each worker will take roughly 300-400MB RAM.
We recommend at least four workers. Please check your current worker count with
    sudo openproject config:get OPENPROJECT_WEB_WORKERS
If it returns nothing, the default worker count of 4 applies. To increase or decrease the worker count, call
    sudo openproject config:set OPENPROJECT_WEB_WORKERS=number
Where number is a positive number between 1 and round(AVAILABLE_RAM * 1.5).
After changing these values, call sudo openproject configure to apply it to the web server.
 
 
有關備份
Backup your OpenProject installation
Note: this guide only applies if you've installed OpenProject using our DEB/RPM packages.
We advise to backup your OpenProject installation regularly — especially before upgrading to a newer version.
What should be backed up
In general the following parts of your OpenProject installation should be backed up:
Data stored in the database
Configuration files
Uploaded files (attachments)
Repositories (typically subversion) if applicable
How to backup
The DEB/RPM packages provide a backup tool which can be used to take a snaphsot of the current OpenProject installation. This tool will create a backup of all parts mentioned above. The backup tool is used by executing the following command:
sudo openproject run backup
The command will create backup files in the following location on your system
/var/db/openproject/backup
The content of that directory should look very similar to the following (depending on your used database, you will see a postgresql-dump-` file).
root@test-packager-backup:/opt/openproject# ls -l /var/db/openproject/backup/ total 24 -rw-r----- 1 openproject openproject  117 Apr  8 09:55 attachments-20150408095521.tar.gz -rw-r----- 1 openproject openproject  667 Apr  8 09:55 conf-20150408095521.tar.gz -rw-r----- 1 openproject openproject 8298 Apr  8 09:55 postgresql-dump-20150408095521.sql.gz -rw-r----- 1 openproject openproject  116 Apr  8 09:55 svn-repositories-20150408095521.tar.gz
How to restore
The backup created with the tool consists of four parts which are all compressed using gzip. Except the database dump these parts can be restored by decompressing the *.tar.gz files and copy the content to the proper location. The command to untar and unzip the *.tar.gz files looks like this (using sample file names from above):
tar vxfz attachments-20150408095521.tar.gz
Database
The <dbuser>, <dbhost> and <dbname> variables have to be replaced with the values that are container in the DATABASE_URL setting of your installation. This setting can be seen by running:
openproject config:get DATABASE_URL #=> e.g.: postgresql://dbusername:dbpassword@dbhost:dbport/dbname
PostgreSQL
To restore the PostgreSQL dump please use the pg_restore command utilities.
pg_restore -h <dbhost> -u <dbuser> -W <dbname>
First the dump has to be extracted (unzipped) and then restored. The command used should look very similar to this:
 
Note:
You can find the master document in GitHub. You can propose a change to this guide by creating a pull request on GitHub.
 
來自 <https://www.openproject.org/operations/backup/backup-guide-packaged-installation/>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM