在Ubuntu 22.04服务器上安装OpenOLAT

问题描述 投票:0回答:1

我想在我的 Ubuntu 22.04 上安装开源 OpenOLAT,但每次尝试都失败。

有关安装和开源的更多信息和详细信息可以在这里找到:

https://www.openolat.com/fileadmin/adminwiki/SW5zdGFsbGF0aW9u.html

有人能帮我解决这个问题吗?我已经尝试过各种指示,但没有效果。我不知道这可能是什么原因。

我尝试按照下面提到的手册安装该应用程序: https://www.openolat.com/fileadmin/adminwiki/SW5zdGFsbGF0aW9u.html

我使用的手册如下:

Connect to your Ubuntu Server:

Open PuTTY and enter your server's IP address.
Click "Open" to establish a connection.
Log in with your username and password.
Create a user for OpenOlat:

bash
Copy code
sudo useradd -m -s /bin/bash openolat
Download software:

bash
Copy code
cd && mkdir downloads && cd downloads
wget https://adoptopenjdk.net/releases/17.html -O adoptopenjdk.tar.gz
wget https://tomcat.apache.org/download-10.cgi -O apache-tomcat.tar.gz
wget https://www.openolat.com/releases/openolat_1723.war
Prepare home directory:

bash
Copy code
cd
tar xvf downloads/apache-tomcat-10.1.5.tar.gz
ln -s apache-tomcat-10.1.5 tomcat

tar xvf downloads/adoptopenjdk.tar.gz
ln -s jdk-17.0.6+10 jre

unzip -d openolat-17.2.3 downloads/openolat_1723.war
ln -s openolat-17.2.3 webapp
Create tomcat dirs:

bash
Copy code
mkdir tomcat/bin tomcat/conf tomcat/lib tomcat/run tomcat/logs
Link necessary files:

bash
Copy code
cd ~/tomcat/conf
ln -s ../../tomcat/conf/web.xml web.xml

cd ~/tomcat/bin
ln -s ../../tomcat/bin/catalina.sh catalina.sh

cd
ln -s tomcat/bin/startup.sh start
ln -s tomcat/bin/shutdown.sh stop
Create setenv.sh file:

bash
Copy code
echo 'CATALINA_HOME=~/tomcat
CATALINA_BASE=~
JRE_HOME=~/jre
CATALINA_PID=~/run/openolat.pid
CATALINA_TMPDIR=/tmp/openolat
mkdir -p $CATALINA_TMPDIR

CATALINA_OPTS=" \
-Xmx1024m -Xms512m -XX:MaxMetaspaceSize=512m \
-Duser.name=openolat \
-Duser.timezone=Europe/Zurich \
-Dspring.profiles.active=myprofile \
-Djava.awt.headless=true \
-Djava.net.preferIPv4Stack=true \
-XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=. \
"' >> ~/bin/setenv.sh
Create server.xml file:

bash
Copy code
echo '<?xml version="1.0" encoding="utf-8"?>
<Server port="8085" shutdown="SHUTDOWN">
  <Service name="Catalina">
    <Connector port="8088" protocol="HTTP/1.1" />
    <Engine name="Catalina" defaultHost="localhost">
      <Host name="localhost"  appBase="webapps" />
    </Engine>
  </Service>
</Server>' >> ~/conf/server.xml
Set environment variables:

bash
Copy code
echo 'export CATALINA_BASE=~
export CATALINA_HOME=~/tomcat
export JRE_HOME=~/jre' >> ~/.bashrc

source ~/.bashrc
Test Tomcat:

bash
Copy code
./start
Set up PostgreSQL:

Follow the PostgreSQL setup instructions in the provided guide.
OpenOlat configuration:

bash
Copy code
echo 'db.source=jndi
db.jndi=java:comp/env/jdbc/openolatDS
db.vendor=postgresql
installation.dir=/home/openolat
log.dir=/home/openolat/logs
server.contextpath=/openolat
server.domainname=localhost
server.port=8088
server.port.ssl=0
smtp.host=disabled
tomcat.id=1
userdata.dir=/home/openolat/olatdata' >> ~/lib/olat.local.properties
Create Application context descriptor:

bash
Copy code
mkdir -p ~/conf/Catalina/localhost/
echo '<?xml version="1.0" encoding="UTF-8" ?>
<Context path="" docBase="/home/openolat/webapp" debug="0" reloadable="false" allowLinking="true">
     <Resource name="jdbc/openolatDS" auth="Container" type="javax.sql.DataSource"
         maxTotal="16" maxIdle="4" maxWaitMillis="60000"
         username="oodbu" password="oodbpasswd"
         driverClassName="org.postgresql.Driver"
         validationQuery="SELECT 1" 
         validationQueryTimeout="-1" 
         testOnBorrow="true" 
         testOnReturn="false"
         url="jdbc:postgresql://localhost:5432/oodb"/>
</Context>' >> ~/conf/Catalina/localhost/ROOT.xml
Configure log4j2:

bash
Copy code
echo '<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
   <!-- Insert the log4j2 configuration here as provided in the guide -->
</Configuration>' >> ~/lib/log4j2.xml
Start OpenOlat:

bash
Copy code
./start
Access OpenOlat:

Open your browser and go to http://localhost:8088
Login with username: administrator, password: openolat
Now you should have OpenOlat up and running on your Ubuntu server. Happy testing!
ubuntu installation open-source failed-installation openolat
1个回答
0
投票

尝试使用此处的官方安装指南进行安装:https://docs.openolat.org/manual_admin/installation/installGuide/

您使用的是过时的安装说明。如果您仍然遇到问题,则必须更加具体。究竟是什么不起作用?您的

catalina.out
olag.log
有错误吗?

© www.soinside.com 2019 - 2024. All rights reserved.