ホーム » 2020 » 3月

月別アーカイブ: 3月 2020

2020年3月
1234567
891011121314
15161718192021
22232425262728
293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 79,515 アクセス



AS5202T セットアップ – 5

先日 WordPress と Joomla! を入れたので,DS116 からの移行.
比較的簡単そうな Joomla! から.
検索すると J2XML というプラグインが出てくる.
使い方などは次の所に詳しく説明されている.
Joomla! 無料エクステンション『J2XML』で記事やカテゴリをエクスポート/インポート
インポートでうまくできなかった.
Cannot import a super user account [Super User].
Joomla! J2XML インポートエラー
エラーメッセージにある様に「Super User」を「はい」に変更.
Joomla! J2XML インポートの設定
「メニュー」などは反映されないので完全な切替はしばらく先になりそう.


2020/04/02
Synology NAS 側の記事を少し変更.
前回と同様に「エクスポート」,AS5020T の「インポート」でうまくいく.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

AS5202T セットアップ – 4

MariaDB が有効になっていることの確認
MariaDB の確認


WordPress のインストール
WordPress パッケージの選択
WordPress セットアップの開始
WordPress データベース情報の指定
WordPress サイト情報の設定
WordPress インストール完了


Joomla! のインストール
Joomla! パッケージの選択
Joomla! セットアップの開始
Joomla! サイト情報の設定
Joomla! データベースの設定
Joomla! インストール情報の確認
Joomla! インストール完了
Joomla! 言語のインストール
Joomla! 言語の設定
Joomla! Installation フォルダの削除


2021/04/09
1 年前に WordPress を一度入れたが,再セットアップ後は入れていなかった.
WordPres のインストール途中でエラー.
WordPress データベース接続確立エラー
WordPress データベース選択不可
phpMyAdmin で見るとデータベースがなかったので,wordpress の名称で作成.
WordPress  phpMyAdmin でデータベースの作成

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

AS5202T セットアップ – 3

SSH 接続を有効にするための設定
ADM の「サービス」-「端末」の「SSHサービスを有効にする」にチェック.
AS5202T  SSH 接続
Win10 のコマンドプロンプトで次の様に入力 すると入れる.
ssh -l Iwao -p 22 192.168.1.75


Linux 環境でよく使っているコマンド.以前 Synology NAS でも調べたもの.
zip ,unzip ,7z すべて存在する.
convert もあり.
shutdown はない.


Win10 から AS5202T にアクセス
Win10 から AS5202T にアクセス


標準で入る PHP は 5.6 みたい.
App Central で PHP 7 をインストールすることで 7.3 になった.
また「インストール済み」の「PHP 7」の ON/OFF で切り替え可能.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

AS5202T セットアップ – 2

先日の続き.
その後追加したもの.
アンチウィルスの ClamAV
他に Linux Center .使い勝手は思っていたものと少し違った.
マニュアルなどは次の所.
https://www.asustor.com/ja/service/downloads?product_id=61#document
https://www.asustor.com/app_central/?type=&model=52xx,53xx
AS5202T portal
DDNS の設定は ASUSTOR Data Master (ADM) の「設定」-「手動接続」にある.
「設定」-「手動設定」 DDNS
ASUSTOR の標準で用意されているものは「myasustor.com」.
IPv6 での設定はちょっとわからず.
次のリンクの様にアクセスできるようになる.
http://demosite.myasustor.com/


他にもいろいろ設定したいと思うが,場所やアプリがわからない.
Web 関係などはこの NAS 用に注文している HDD がそろってからの予定.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

AS5202T セットアップ

先日届いていた AS5202T .それ用の HDD を注文したら納期がかかるみたい.
それで手元にあった WD Red 1TB を取り付けてセットアップしてみた.
NAS に取り付ける時,斜めになってしまうことがあるので注意が必要.


最初に ASUSTOR コントロールセンター をダウンロードして PC にインストール.
ASUSTOR Control Center
「初期化されていません」を押して,画面の指示に従って ADM をインストール.
AS5202T 初期化 1
AS5202T 初期化 2
AS5202T 初期化 3
AS5202T Portal
Web もセットアップされていた.
AS5202T web


NAS が動作することは確認できたので,メモリを 8GB に取り換え.
電源を入れると,一番上の青いランプが点灯,システムステータスのランプが点滅のままでうまく起動しない.
通常であればネットワークやハードディスクのランプが点滅や点灯するはず.
もう一度メモリを外して元の 2GB の状態にするとうまく起動する.
追加で 1 枚さして 6GB でもうまく起動.
2GB も交換して 4GB x 2 の状態で試すとうまく起動した.
メモリの挿し方が甘かった?


今回この機種を追加した目的の一つが VirtualBox .
App Central から VirtualBox と VirtualBox Extension Pack をインストール.
追加された VirtualBox アイコンをクリックすると新しくブラウザのウィンドウが開く.
AS5202T VirtualBox ログイン
この時のログインの ID がわからなかったが admin と admin で入れる.
https://www.asustor.com/en/online/College_topic?topic=249
https://forest.watch.impress.co.jp/docs/shseri/siranas/1023605.html
https://mdw-note.net/tips/setting-virtualbox-as3102t/
以前 PC で作成した Win10_LTSC.vdi を NAS の Public/VHD/Win10_LTSC にコピー.
それを使用する様に VirtualBox の仮想マシンを追加.
追加した仮想マシンを起動すると右上にプレビューが表示されている.
AS5202T VirtualBox
この仮想マシンは VNC サーバの設定がしてあるので,VNC ビューアから接続.
AS5202T VirtualBox VNC 接続


もう一つ確認したのが gcc .
App Central で entware を追加.
ASUSTOR NAS App Central 「entware」

C:\Users\Iwao\AppData\Local\Temp>ssh -l Iwao -p 22 192.168.1.75
Password:
Iwao@AS5202T:/volume1/home/Iwao $ gcc
-sh: gcc: not found
Iwao@AS5202T:/volume1/home/Iwao $ opkg
opkg must have one sub-command argument
usage: opkg [options...] sub-command [arguments...]
where sub-command is one of:

Package Manipulation:
        update                  Update list of available packages
        upgrade <pkgs>          Upgrade packages
        install <pkgs>          Install package(s)
        configure <pkgs>        Configure unpacked package(s)
        remove <pkgs|regexp>    Remove package(s)
        flag <flag> <pkgs>      Flag package(s)
         <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation)

Informational Commands:
        ...

Iwao@AS5202T:/volume1/home/Iwao $ opkg install gcc
Installing gcc (7.4.0-5) to root...
Downloading http://bin.entware.net/x64-k3.2/gcc_7.4.0-5_x64-3.2.ipk
Installing zlib (1.2.11-3) to root...
Downloading http://bin.entware.net/x64-k3.2/zlib_1.2.11-3_x64-3.2.ipk
Installing libiconv-full (1.11.1-4) to root...
Downloading http://bin.entware.net/x64-k3.2/libiconv-full_1.11.1-4_x64-3.2.ipk
Installing libintl-full (0.19.8.1-2) to root...
Downloading http://bin.entware.net/x64-k3.2/libintl-full_0.19.8.1-2_x64-3.2.ipk
Installing libbfd (2.27-1) to root...
Downloading http://bin.entware.net/x64-k3.2/libbfd_2.27-1_x64-3.2.ipk
Installing libopcodes (2.27-1) to root...
Downloading http://bin.entware.net/x64-k3.2/libopcodes_2.27-1_x64-3.2.ipk
Installing objdump (2.27-1) to root...
Downloading http://bin.entware.net/x64-k3.2/objdump_2.27-1_x64-3.2.ipk
Installing ar (2.27-1) to root...
Downloading http://bin.entware.net/x64-k3.2/ar_2.27-1_x64-3.2.ipk
Installing binutils (2.27-1) to root...
Downloading http://bin.entware.net/x64-k3.2/binutils_2.27-1_x64-3.2.ipk
Configuring zlib.
Configuring libiconv-full.
Configuring libintl-full.
Configuring libbfd.
Configuring libopcodes.
Configuring objdump.
Configuring ar.
Configuring binutils.
Configuring gcc.
There are no *-dev packages in Entware(with few exceptions)!
Please install headers as described in the wiki:
https://github.com/Entware/Entware/wiki
Iwao@AS5202T:/volume1/home/Iwao $
Iwao@AS5202T:/volume1/home/Iwao $ gcc
/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
Iwao@AS5202T:/volume1/home/Iwao $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/lto-wrapper
Target: x86_64-openwrt-linux-gnu
Configured with: /media/ware3/Entware.2020.01/build_dir/target-x86_64_glibc-2.27/gcc-7.4.0/configure --target=x86_64-openwrt-linux --host=x86_64-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix= --program-suffix= --prefix=/opt --exec-prefix=/opt --bindir=/opt/bin --sbindir=/opt/sbin --libexecdir=/opt/lib --sysconfdir=/opt/etc --datadir=/opt/share --localstatedir=/opt/var --mandir=/opt/man --infodir=/opt/info --disable-nls 'CXXFLAGS_FOR_TARGET=-g -O2 -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS' --build=x86_64-pc-linux-gnu --host=x86_64-openwrt-linux-gnu --target=x86_64-openwrt-linux-gnu --enable-languages=c,c++ --with-bugurl=https://dev.openwrt.org/ --with-pkgversion='OpenWrt GCC 7.4.0' --enable-shared --enable-__cxa_atexit --with-default-libstdcxx-abi=gcc4-compatible --enable-target-optspace --with-gnu-ld --with-specs='-Wl,-rpath=/opt/lib -Wl,--dynamic-linker=/opt/lib/ld-linux-x86-64.so.2' --with-boot-ldflags='static-libstdc++ -static-libgcc -Wl,-rpath=/opt/lib -Wl,--dynamic-linker=/opt/lib/ld-linux-x86-64.so.2' --disable-nls --disable-libsanitizer --disable-libvtv --disable-libcilkrts --disable-libmudflap --disable-libmpx --disable-multilib --disable-libgomp --disable-libquadmath --disable-libssp --disable-decimal-float --disable-libstdcxx-pch --with-host-libstdcxx=-lstdc++ --prefix=/opt --libexecdir=/opt/lib --with-local-prefix=/opt --with-stage1-ldflags='-lstdc++ -Wl,-rpath=/opt/lib -Wl,--dynamic-linker=/opt/lib/ld-linux-x86-64.so.2' --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 7.4.0 (OpenWrt GCC 7.4.0)
COMPILER_PATH=/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/:/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/
LIBRARY_PATH=/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/:/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/:/lib/../lib64/:/usr/lib/../lib64/:/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
 /volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/collect2 -plugin /volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/liblto_plugin.so -plugin-opt=/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccm1Y6FA.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/crt1.o /volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/crti.o /volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/crtbegin.o -L/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0 -L/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc -L/lib/../lib64 -L/usr/lib/../lib64 -L/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/../../.. -rpath=/opt/lib --dynamic-linker=/opt/lib/ld-linux-x86-64.so.2 -lgcc_s -lc -lgcc_s /volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/crtend.o /volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/crtn.o
/volume1/.@plugins/AppCentral/entware/opt/bin/../lib/gcc/x86_64-openwrt-linux-gnu/7.4.0/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
Iwao@AS5202T:/volume1/home/Iwao $
Iwao@AS5202T:/volume1/home/Iwao $ ll
total 12
drwxr-xr-x    2 Iwao     users       4.0K Mar 16 18:27 ./
drwxr-xr-x    4 root     root        4.0K Mar 16 15:19 ../
-rw-------    1 Iwao     users        100 Mar 16 18:43 .ash_history
Iwao@AS5202T:/volume1/home/Iwao $ mkdir test
Iwao@AS5202T:/volume1/home/Iwao $ cd test
Iwao@AS5202T:/volume1/home/Iwao/test $ cat > test.cpp
int     main    ()
{
        return  2 ;
        }
Iwao@AS5202T:/volume1/home/Iwao/test $ cat test.cpp
int     main    ()
{
        return  2 ;
        }
Iwao@AS5202T:/volume1/home/Iwao/test $ ls
test.cpp
Iwao@AS5202T:/volume1/home/Iwao/test $ g++ test.cpp
Iwao@AS5202T:/volume1/home/Iwao/test $ ./a.out
Iwao@AS5202T:/volume1/home/Iwao/test $ echo $?
2
Iwao@AS5202T:/volume1/home/Iwao/test $ echo $?
0
Iwao@AS5202T:/volume1/home/Iwao/test $


https://jml.mish.work/various/nas/asustor.html

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

#pragma message (” ~ “) の利用

先日からやっているコードの解析部分を単体テスト用に分割していると,

--------------------構成: prs_frml - Win32 Debug--------------------
コンパイル中...
prs_frml.cpp
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>
cl.exe の実行エラー

prs_frml.exe - エラー 1、警告 0

「パッと見」でわかる時は良いが,今回はわかり難い.
そんな時に私が場所を限定していく手順.
次の様に影響していそうな所に #pragma message (” ~ “) を追加.

#pragma	 message ("pass 1")
#include "StrAryTo.hxx"
#pragma	 message ("pass 2")
#ifdef	 _MSC_VER
	 #ifdef	_AFXDLL
	 #else
		#ifndef	afxDump
		#define	afxDump	std::terr
		#endif
	 #endif
#endif
#pragma	 message ("pass 3")

エラーの場所を特定するために #pragma message を追加
今回は次の様になったので StrAyTo.hxx が原因とわかった.

pass 1
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>

StrAryTo.hxx は CStringArray と std::vector<tstring> を相互変換するコード.
インクルードから外すことで対応.


MFC を使用しているソースなどの対応方法は次の所.
https://dev.mish.work/wordpress/2019/04/05/c1189-windows-h-already-included/

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.