Sakai

SakaiはLMS(Learning Management System)の一種である。

 

https://www.sakaiproject.org/download-sakai
https://confluence.sakaiproject.org/pages/viewpage.action?pageId=106792016
http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html

*サーバ
firewall-cmd –new-service=tomcat –permanent
firewall-cmd –service=tomcat –add-port=8080/tcp –permanent
firewall-cmd –add-service=tomcat –zone=public –permanent
systemctl restart firewalld

*server JRE
tar xzfv server-jre-*-linux-x64.tar.gz*
rm -f server-jre-*-linux-x64.tar.gz*
mv jdk* /usr/local/
ln -s `ls -d /usr/local/jdk*` /usr/local/jre
export JAVA_HOME=/usr/local/jre
export PATH=$JAVA_HOME/bin:$PATH

echo “” >> /etc/bashrc
echo “# JAVA_HOME ENVIRONMENT VARIABLE” >> /etc/bashrc
echo “export JAVA_HOME=$JAVA_HOME” >> /etc/bashrc
echo “export PATH=\$JAVA_HOME/bin:/bin:\$PATH” >> /etc/bashrc

*MySQL

yum install gcc gcc-c++ cmake perl bison ncurses-devel -y

https://dev.mysql.com/downloads/mysql/

curl -O -s https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.20.tar.gz


tar xzfv mysql-*.tar.gz

cd mysql-*
useradd –user-group –no-create-home –shell /sbin/nologin mysql
rm -f /etc/my.cnf
rm -rf /etc/my.cnf.d
export CFLAGS=”-O3 -m64 -march=native”
export CXXFLAGS=$CFLAGS

mkdir -p -m 774 /mysql-data
chown mysql:mysql /mysql-data

yum install boost
yum install boost-devel

/usr/include/c++/4.8.2/bits/boost_concept_check.h
/usr/include/boost
find / -name “*boost*”

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/`pwd | sed “s/.*\///”` -DMYSQL_DATADIR=/mysql-data -DBOOST_INCLUDE_DIR=/usr/include/ -DLOCAL_BOOST_DIR=/usr/include/boost -DLOCAL_BOOST_ZIP=/usr/include/boost

mkdir boost
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/`pwd | sed “s/.*\///”` -DMYSQL_DATADIR=/mysql-data -DDOWNLOAD_BOOST=1 -DWITH_BOOST=./boost

-DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory>

Boost minor version found is 53 we need 59

make | tee make.log

make install | tee make_install.log

ln -s /usr/local/`pwd | sed “s/.*\///”` /usr/local/mysql


export MYSQL_HOME=/usr/local/mysql
export MYSQL_DATA=/mysql-data

export PATH=$MYSQL_HOME/bin:$PATH

echo “” >> /etc/bashrc
echo “# MYSQL_HOME ENVIRONMENT VARIABLE” >> /etc/bashrc
echo “export MYSQL_HOME=$MYSQL_HOME” >> /etc/bashrc
echo “export MYSQL_DATA=$MYSQL_DATA” >> /etc/bashrc
echo “export PATH=\$MYSQL_HOME/bin:/bin:\$PATH” >> /etc/bashrc

echo “[mysqld]” > $MYSQL_HOME/my.cnf

X
cd $MYSQL_HOME
// bin/mysql_install_db –datadir=$MYSQL_DATA –user=mysql

mysqld –initialize

[root@sakai mysql]# mysqld –initialize
2017-12-20T00:26:58.200783Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).
2017-12-20T00:26:58.818250Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-12-20T00:26:58.952088Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-12-20T00:26:59.018966Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 7dc7e8ed-e51c-11e7-a0d5-000c295454a4.
2017-12-20T00:26:59.021726Z 0 [Warning] Gtid table is not ready to be used. Table ‘mysql.gtid_executed’ cannot be opened.
2017-12-20T00:26:59.023524Z 1 [Note] A temporary password is generated for root@localhost: uMk.juB3y2ud

[root@sakai mysql]# cat ~/.mysql_secret
# Password set for user ‘root@localhost’ at 2017-12-20 09:19:31
?yaoeshuuRL,

cat > ~/.mysql_secret << EOT

edspwkS*y7ih
EOT
chown -R mysql:mysql $MYSQL_DATA

mysqld_safe &

パスワード変更は必須
[root@sakai mysql]# mysql_secure_installation

Securing the MySQL server deployment.

Connecting to MySQL server using password in ‘/root/.mysql_secret’

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No: y

There are three levels of password validation policy:

LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: LOW

Invalid option provided.

There are three levels of password validation policy:

LOW Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0
Using existing password for root.

Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : n

… skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.


Normally, root should only be allowed to connect from
‘localhost’. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n

… skipping.
By default, MySQL comes with a database named ‘test’ that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
– Dropping test database…
Success.

– Removing privileges on test database…
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done!

chown -R mysql:mysql $MYSQL_DATA

mysql -u root -p<パスワード>
create database sakaidatabase default character set utf8;
grant all on sakaidatabase.* to sakaiuser@’localhost’ identified by ‘sakaipassword’;
grant all on sakaidatabase.* to sakaiuser@’127.0.0.1′ identified by ‘sakaipassword’;
flush privileges;
quit

*Tomcat
wget http://ftp.yz.yamagata-u.ac.jp/pub/network/apache/tomcat/tomcat-8/v8.5.24/bin/apache-tomcat-8.5.24.tar.gz

tar xvzf apache-tomcat-*.tar.gz
rm -f apache-tomcat-*.tar.gz
mv apache-tomcat-* /usr/local/`ls -d apache-tomcat-* | sed “s/apache-//”`
ln -s `ls -d /usr/local/tomcat-*` /usr/local/tomcat
export TOMCAT_HOME=/usr/local/tomcat
export CATALINA_HOME=$TOMCAT_HOME
export PATH=$TOMCAT_HOME/bin:$PATH

echo “” >> /etc/bashrc
echo “# TOMCAT_HOME ENVIRONMENT VARIABLE” >> /etc/bashrc
echo “export TOMCAT_HOME=$TOMCAT_HOME” >> /etc/bashrc
echo “export CATALINA_HOME=$TOMCAT_HOME” >> /etc/bashrc
echo “export PATH=\$TOMCAT_HOME/bin:/bin:\$PATH” >> /etc/bashrc

rm -f $TOMCAT_HOME/bin/*.bat
rm -rf $TOMCAT_HOME/webapps/*

cd $TOMCAT_HOME

*JDBC
https://dev.mysql.com/downloads/connector/j/5.1.html
wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.45.tar.gz
tar xvzf mysql-connector-java-*.tar.gz
mv mysql-connector-java-*/mysql-connector-java-*-bin.jar $TOMCAT_HOME/lib/
rm -rf mysql-connector-java-*

*sakai
curl -O -s http://source.sakaiproject.org/release/11.4/artifacts/sakai-bin-11.4.tar.gz

$TOMCAT_HOMEで展開
tar xzfv sakai-*.tar.gz

$TOMCAT_HOME/bin/setenv.sh
export JAVA_OPTS=”-server -Xmx1028m -XX:MaxMetaspaceSize=512m -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djava.awt.headless=true -Dcom.sun.management.jmxremote -Dhttp.agent=Sakai -Djava.util.Arrays.useLegacyMergeSort=true -Duser.language=ja -Duser.region=JP -Dsakai.demo=true”

mkdir sakai
curl -o sakai/sakai.properties -s https://source.sakaiproject.org/svn/config/branches/sakai-10.x/configuration/bundles/src/bundle/org/sakaiproject/config/bundle/default.sakai.properties

vi sakai.properties

username@javax.sql.BaseDataSource=sakaiuser
password@javax.sql.BaseDataSource=sakaipassword

## MySQL settings
vendor@org.sakaiproject.db.api.SqlService=mysql
driverClassName@javax.sql.BaseDataSource=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
url@javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakaidatabase?useUnicode=true&characterEncoding=UTF-8
validationQuery@javax.sql.BaseDataSource=select 1 from DUAL
defaultTransactionIsolationString@javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED


vi $TOMCAT_HOME/conf/context.xml
<JarScanner>
<!– This is to speedup startup so that tomcat doesn’t scan as much –>
<JarScanFilter defaultPluggabilityScan=”false”
defaultTldScan=”false”
tldScan=”jsf-impl-*.jar,jsf-widgets-*.jar,myfaces-impl-*.jar,pluto-taglib-*.jar,sakai-sections-app-util-*.jar,spring-webmvc-*.jar,standard-*.jar,tomahawk*.jar,tomahawk-*.jar”/>
</JarScanner>

startup.sh

http://192.168.0.33:8080/portal

問題作成
サイト作成
プロジェクトで作成
テスト・クイズ を有効にする
サイト作成後、サイトにアクセス
メニューからテスト・クイズ


Notice: Trying to get property 'queue' of non-object in /usr/local/wordpress/wp-includes/script-loader.php on line 2876

Warning: Invalid argument supplied for foreach() in /usr/local/wordpress/wp-includes/script-loader.php on line 2876