GVKun编程网logo

Docker搭建OpenProject(docker搭建ctf平台)

33

以上就是给各位分享Docker搭建OpenProject,其中也会对docker搭建ctf平台进行解释,同时本文还将给你拓展7.Docker搭建jenkins、Buildfrontendproject

以上就是给各位分享Docker搭建OpenProject,其中也会对docker搭建ctf平台进行解释,同时本文还将给你拓展7.Docker搭建jenkins、Build frontend project into docker、Centos7 使用Docker搭建Oracle测试环境、Centos7阿里云安装OpenProject-亲测等相关知识,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

Docker搭建OpenProject(docker搭建ctf平台)

Docker搭建OpenProject(docker搭建ctf平台)

一、通过docker创建容器

1:docker pull  openproject/community:11

2:sudo mkdir -p /var/lib/openproject/{pgdata,assets}

3:docker run -d -p 8099:80 --name openproject -e SECRET_KEY_BASE=secret -v /var/lib/openproject/pgdata:/var/openproject/pgdata -v /var/lib/openproject/assets:/var/openproject/assets openproject:11

二、查看容器是否创建成功docker ps -a

三、浏览器输入http://你的服务器ip:8099

7.Docker搭建jenkins

7.Docker搭建jenkins

镜像获取

  • 1.从Docker hub上拉取镜像文件

注意官网已经废弃jenkins镜像,请拉取的jenkins:jenkins

  • 2.查看拉取的镜像文件

容器相关

  • 搭建命令
docker run --name myjenkins -itd --network host -v  E:/Docker/jenkins:/var/jenkins_home --env JAVA_OPTS=“-Xmx8192m” jenkins/jenkins```

docker run --name myjenkins -itd -p 8001:8080 -v E:/Docker/jenkins:/var/jenkins_home --env JAVA_OPTS=“-Xmx8192m” jenkins/jenkins
  • 启动容器

在这里插入图片描述

  • 访问容器

浏览器中访问jenkins,输入http://localhost:8001/

密码,先进入到docker容器中的shell命令中:docker exec -it myjenkins /bin/bash

然后cat /var/jenkins_home/secrets/initialAdminPassword获取密码

注意挂载权限sudochown-R 1000:1000 /home/docker/jenkins

  • 停止运行容器

  • 删除容器
    /docker/jenkins```

  • 停止运行容器

  • 删除容器

Build frontend project into docker

Build frontend project into docker

  1. create dockerfile
    1). config frontend project build
    image.png
    2). config nginx
    image.png
  2. create nginx/default.conf
  3. build docker
    sudo docker build -t imageName
  4. run docker
    docker run --rm -d -p80:80 imageName
  5. find docker host and port
    ifconfig
  6. type docker host + post + frontendRoutePath in browser address bar, such as: http://localhost/login
  7. login docker
    docker login
  8. tag docker image
    docker tag imageName:version userName/imageName:version
  9. push image to remote docker hub
    docker push dockerUserName/imageName:version

Centos7 使用Docker搭建Oracle测试环境

Centos7 使用Docker搭建Oracle测试环境

1.更新yum

yum update

2.安装Docker

yum install docker

安装完成后查看Docker的版本:

docker version

查看Docker的信息:

docker info

3.安装完后启动Docker

systemctl start  docker.service
如果启动报错:could not change group /var/run/docker.sock to docker: group docker not found
编辑:vi /etc/fstab 文件并在未尾加入以下内容:
none        /sys/fs/cgroup        cgroup        defaults    0    0
然后再启动Docker
 
开机自启动:
chkconfig docker on
 
4.下载安装Oracle-xe-11g
docker pull wnameless/oracle-xe-11g
下载过程可能要花费一定的时间,下载完成后运行以下命令启动一个Oracle XE容器
docker run -d -p 1521:1521 -p 8080:8080 wnameless/oracle-xe-11g

使用:docker ps a 命令查看docker容器:

 

 开启已经存在的镜像:

docker start containerId 如上面的镜像在重新开机后重新开启:

docker start 3bf11df7b744

 

5.打开端口

firewall-cmd --zone=public --add-port=1521/tcp --permanent
重新加载防火墙
firewall-cmd --reload

6.用PL/SQL Developer连接

Hostname: 192.168.72.100 
Port: 1521 
Sid: XE 
Username: system 
Password: oracle
加入配置文件:
XE =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.72.100)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = XE)
    )
  )

  

Centos7阿里云安装OpenProject-亲测

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/>

今天关于Docker搭建OpenProjectdocker搭建ctf平台的介绍到此结束,谢谢您的阅读,有关7.Docker搭建jenkins、Build frontend project into docker、Centos7 使用Docker搭建Oracle测试环境、Centos7阿里云安装OpenProject-亲测等更多相关知识的信息可以在本站进行查询。

本文标签: