maple & chicken

適当に垂れ流す。メイプルのエミュ鯖に関する話がメインになるとおもいます。

JCEのインストールとMySQLのインストール

JDKのインストールのときにJCE入れるのを忘れていたのでここで書いておく。

chicken@PiStory:~ $ wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip
chicken@PiStory:~ $ unzip jce_policy-8.zip
Archive:  jce_policy-8.zip
   creating: UnlimitedJCEPolicyJDK8/
  inflating: UnlimitedJCEPolicyJDK8/local_policy.jar
  inflating: UnlimitedJCEPolicyJDK8/README.txt
  inflating: UnlimitedJCEPolicyJDK8/US_export_policy.jar

先程と同じようにDL、解凍。

chicken@PiStory:~ $ cd UnlimitedJCEPolicyJDK8/
chicken@PiStory:~/UnlimitedJCEPolicyJDK8 $ cp US_export_policy.jar local_policy.jar /opt/jdk1.8.0_101/jre/lib/security/

二つのファイルを/opt/jdk1.8.0_101/jre/lib/security/にコピー 他のサイト見てると気が狂ったようにコピーしまくってるが多分この一箇所だけでOK

続いてWZのXMLを置く これも共有フォルダから引っ張ってくる

chicken@PiStory:~ $ cp /mnt/wz.zip wz.zip
chicken@PiStory:~ $ unzip wz.zip -d PiStory

MySQLのインストール

chicken@PiStory:~/PiStory $ sudo apt-get install mysql-server

途中でパスワードの設定がある。

文字コードの設定をする

chicken@PiStory:~/PiStory $ sudo vim /etc/mysql/my.cnf

[client]
default-character-set=utf8
  
[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
  
[mysqldump]
default-character-set=utf8

各所に書き足す。

chicken@PiStory:~/PiStory $ sudo /etc/init.d/mysql restart
[ ok ] Restarting mysql (via systemctl): mysql.service.

リスタートしてから確認する。

chicken@PiStory:~/PiStory $ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.5.52-0+deb8u1 (Raspbian)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> status
--------------
mysql  Ver 14.14 Distrib 5.5.52, for debian-linux-gnu (armv7l) using readline 6.3

Connection id:          37
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.5.52-0+deb8u1 (Raspbian)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 6 min 16 sec

Threads: 1  Questions: 111  Slow queries: 0  Opens: 48  Flush tables: 1  Open tables: 41  Queries per second avg: 0.295
--------------

これでMySQLの設定は完了。 SQLの読み込みを行う。

mysql>source ~/PiStory/SQL/MoopleDEV.sql
mysql>exit

設定いじった後のjarを入れて起動してみる。

chicken@PiStory:~/PiStory $ cp /mnt/MoopleDEV.jar dist/MoopleDEV.jar
chicken@PiStory:~/PiStory $ sh launch.sh
MoopleDEV v83 starting up.

Loading Skills
Skills loaded in 5.086 seconds
Loading Items
Items loaded in 4.672 seconds
Listening on port 8484


Server is now online.

成功。やったぜ。 フルクラもないし接続テストはまた明日。