使用eclipse 建立 OpenCV Java Project
1. 先在 eclipse 建立 Java Project 取名為 HelloOpenCV
2. 選取Project資料夾(HelloOpenCV),按右鍵點選 Build Path > 按 [Add Library...]
3. 選 User Library > 按 [Next] > 勾選 opencv (User Library) 按[Finish]即完成Project的設定.
2018年2月25日 星期日
安裝 Eclipse IDE for Java Developers version
安裝 Eclipse IDE for Java Developers version
下載 Eclipse IDE for Java Developers version
1. Download and Install Eclipse
#curl -O http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/oxygen/1a/eclipse-java-oxygen-1a-linux-gtk-x86_64.tar.gz
# ll
-rw-r--r--. 1 root root 186642081 2月 21 11:51 eclipse-java-oxygen-1a-linux-gtk-x86_64.tar.gz
Extract Eclipse package to your desired directory (Ex. /opt).
# tar -zxvf eclipse-java-oxygen-1a-linux-gtk-x86_64.tar.gz -C /opt
# ll /opt
drwxr-xr-x. 8 root root 4096 10月 10 08:21 eclipse
Symlink Eclipse executable to /usr/bin path.
#ln -s /opt/eclipse/eclipse /usr/bin/eclipse
#ll /opt/eclipse/eclipse
-rwxr-xr-x. 1 root root 71473 10月 9 18:00 /opt/eclipse/eclipse
2. Setup Launcher
Create Gnome launcher.
#vi /usr/share/applications/eclipse-4.7.desktop
Place the following content in the above file.
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse 4.7
Comment=Eclipse Oxygen
Exec=/usr/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0
下載 Eclipse IDE for Java Developers version
1. Download and Install Eclipse
#curl -O http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/oxygen/1a/eclipse-java-oxygen-1a-linux-gtk-x86_64.tar.gz
# ll
-rw-r--r--. 1 root root 186642081 2月 21 11:51 eclipse-java-oxygen-1a-linux-gtk-x86_64.tar.gz
Extract Eclipse package to your desired directory (Ex. /opt).
# tar -zxvf eclipse-java-oxygen-1a-linux-gtk-x86_64.tar.gz -C /opt
# ll /opt
drwxr-xr-x. 8 root root 4096 10月 10 08:21 eclipse
Symlink Eclipse executable to /usr/bin path.
#ln -s /opt/eclipse/eclipse /usr/bin/eclipse
#ll /opt/eclipse/eclipse
-rwxr-xr-x. 1 root root 71473 10月 9 18:00 /opt/eclipse/eclipse
2. Setup Launcher
Create Gnome launcher.
#vi /usr/share/applications/eclipse-4.7.desktop
Place the following content in the above file.
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse 4.7
Comment=Eclipse Oxygen
Exec=/usr/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0
Installing OpenCV for Java
Install OpenCV 3.x under Linux(centos7)
1.Download:下載opencv檔案
http://opencv.org/opencv-3-2.html
The latest version can be downloaded from SourceForge and GitHub:
https://sourceforge.net/projects/opencvlibrary/files/opencv-unix/3.2.0/
#ll
-rw-rw-r--. 1 hen hen 82033498 8月 2 12:15 opencv-3.2.0.zip
#md5sum opencv-3.2.0.zip
bfc6a261eb069b709bcfe7e363ef5899 opencv-3.2.0.zip
2. Require:準備要安裝opencv的環境
#yum install cmake
#yum install ant
3. Make
#mkdir buildjava
#cd buildjava/
#cmake -D BUILD_SHARED_LIBS=OFF -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.2.0/modules ..
-- General configuration for OpenCV 3.2.0
-- Java:
-- ant: /bin/ant (ver 1.9.2)
-- JNI: /usr/lib/jvm/java/include /usr/lib/jvm/java/include/linux /usr/lib/jvm/java/include
-- Java wrappers: YES
-- Java tests: YES
#make -j4
#make -j4 install
1.Download:下載opencv檔案
http://opencv.org/opencv-3-2.html
The latest version can be downloaded from SourceForge and GitHub:
https://sourceforge.net/projects/opencvlibrary/files/opencv-unix/3.2.0/
#ll
-rw-rw-r--. 1 hen hen 82033498 8月 2 12:15 opencv-3.2.0.zip
#md5sum opencv-3.2.0.zip
bfc6a261eb069b709bcfe7e363ef5899 opencv-3.2.0.zip
2. Require:準備要安裝opencv的環境
#yum install cmake
#yum install ant
3. Make
#mkdir buildjava
#cd buildjava/
#cmake -D BUILD_SHARED_LIBS=OFF -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.2.0/modules ..
-- General configuration for OpenCV 3.2.0
-- Java:
-- ant: /bin/ant (ver 1.9.2)
-- JNI: /usr/lib/jvm/java/include /usr/lib/jvm/java/include/linux /usr/lib/jvm/java/include
-- Java wrappers: YES
-- Java tests: YES
#make -j4
#make -j4 install
在eclipse 安裝 OpenCV Java 作業環境 (centos7)
在eclipse 安裝 OpenCV Java 作業環境 (centos7)
Set up OpenCV for Java in Eclipse (centos7)
1. 執行eclipse
Command line:
#eclipse
or GUI:
Application >> Programming >> Eclipse.
2. 點選 Window(Menu) > Preferences > Build Path > User Libraries
3. 點選 New... 按鈕
輸入一個名稱 opencv ,按下OK完成後
4. 點選 opencv 後,再點選 [Add External JARs...] 按鈕
並且點選 opencv-320.jar 的資料夾,
(我的是放在 /usr/local/share/OpenCV/java)加入 jar 檔.
5. 加入 jar 檔後
點選 Native library location 再點選 [Edit]按鈕
6. 點選[External Folder...]按鈕,加入Location Path:/usr/local/share/OpenCV/java
Set up OpenCV for Java in Eclipse (centos7)
1. 執行eclipse
Command line:
#eclipse
or GUI:
Application >> Programming >> Eclipse.
2. 點選 Window(Menu) > Preferences > Build Path > User Libraries
3. 點選 New... 按鈕
輸入一個名稱 opencv ,按下OK完成後
4. 點選 opencv 後,再點選 [Add External JARs...] 按鈕
並且點選 opencv-320.jar 的資料夾,
(我的是放在 /usr/local/share/OpenCV/java)加入 jar 檔.
5. 加入 jar 檔後
點選 Native library location 再點選 [Edit]按鈕
6. 點選[External Folder...]按鈕,加入Location Path:/usr/local/share/OpenCV/java
2017年9月24日 星期日
vim顯示顏色設定
- 「.vimrc」檔案:
執行vim時會先去執行使用者家目錄下的「.vimrc」檔案(~/.vimrc)。
- 顏色方案(colorscheme):
vim內建顏色方案功能,可以使用「colorscheme」指令來設定vim的配色主題。
vim內建顏色方案,存在「/usr/share/vim/vim??/colors」(「??」是vim的版本號碼)目錄中,副檔名為「.vim」。
$ ll /usr/share/vim/vim74/colors/
總計 72
-rw-r--r--. 1 root root 2476 12月 22 2016 blue.vim
-rw-r--r--. 1 root root 2990 12月 22 2016 darkblue.vim
-rw-r--r--. 1 root root 548 12月 22 2016 default.vim
-rw-r--r--. 1 root root 2399 12月 22 2016 delek.vim
-rw-r--r--. 1 root root 2812 12月 22 2016 desert.vim
-rw-r--r--. 1 root root 1666 12月 22 2016 elflord.vim
-rw-r--r--. 1 root root 2476 12月 22 2016 evening.vim
-rw-r--r--. 1 root root 3476 12月 22 2016 koehler.vim
-rw-r--r--. 1 root root 2460 12月 22 2016 morning.vim
-rw-r--r--. 1 root root 2006 12月 22 2016 murphy.vim
-rw-r--r--. 1 root root 1037 12月 22 2016 pablo.vim
-rw-r--r--. 1 root root 2673 12月 22 2016 peachpuff.vim
-rw-r--r--. 1 root root 2311 12月 22 2016 README.txt
-rw-r--r--. 1 root root 1393 12月 22 2016 ron.vim
-rw-r--r--. 1 root root 2720 12月 22 2016 shine.vim
-rw-r--r--. 1 root root 2445 12月 22 2016 slate.vim
-rw-r--r--. 1 root root 1629 12月 22 2016 torte.vim
-rw-r--r--. 1 root root 1840 12月 22 2016 zellner.vim
- 挑一個內建的顏色方案來看看:
$ cat .vimrc
colorscheme torte
結果:
2017年9月15日 星期五
myOpenCV_Win10_Visual studio 2015
作業系統:Windows 10
開發工具:Visual Studio 2015
OpenCV版本:3.3.0 (opencv-3.3.0-vc14.exe 安裝位置為C:\opencv)
1. 修改環境變數
本機 → 內容 → 進階系統設定 → 環境變數 → path → 編輯
新增以下資料:
C:\OpenCV3.3\opencv\build\x64\vc14\bin
2. 開啟 Visual Studio 2015 並且新增專案
新增專案 → 左側「Visual C++」 → Win32 主控台應用程式→ 輸入專案名稱 → 確定 → 下一步 → 完成
3. 點選上方的「專案」→「屬性」→ 調整「平台」為“x64”
4. 對「VC++目錄」與「連結器」進行調整
設定VC++目錄 →在「Include目錄」增加“C:\OpenCV3.3\opencv\build\include”
設定VC++目錄 →在「程式庫目錄」增加“C:\OpenCV3.3\opencv\build\x64\vc14\lib”
設定連結器 →「輸入」 →在「其他相依性」增加
“opencv_world330d.lib”
5. 調整專案平台為「x64」
6. 新增 Visual C++檔於專案
「專案」 →「加入新項目」 →「C++檔(.cpp)」 →「新增」
7. 測試是否連結成功
撰寫一開啟圖檔的程式碼來測試是否連結成功
開發工具:Visual Studio 2015
OpenCV版本:3.3.0 (opencv-3.3.0-vc14.exe 安裝位置為C:\opencv)
1. 修改環境變數
本機 → 內容 → 進階系統設定 → 環境變數 → path → 編輯
新增以下資料:
C:\OpenCV3.3\opencv\build\x64\vc14\bin
2. 開啟 Visual Studio 2015 並且新增專案
新增專案 → 左側「Visual C++」 → Win32 主控台應用程式→ 輸入專案名稱 → 確定 → 下一步 → 完成
3. 點選上方的「專案」→「屬性」→ 調整「平台」為“x64”
4. 對「VC++目錄」與「連結器」進行調整
設定VC++目錄 →在「Include目錄」增加“C:\OpenCV3.3\opencv\build\include”
設定VC++目錄 →在「程式庫目錄」增加“C:\OpenCV3.3\opencv\build\x64\vc14\lib”
設定連結器 →「輸入」 →在「其他相依性」增加
“opencv_world330d.lib”
5. 調整專案平台為「x64」
6. 新增 Visual C++檔於專案
「專案」 →「加入新項目」 →「C++檔(.cpp)」 →「新增」
7. 測試是否連結成功
撰寫一開啟圖檔的程式碼來測試是否連結成功
2017年9月6日 星期三
MariaDB基本安全性設定
MariaDB基本安全性設定:
安裝好 MariaDB 後,可執行 mysql_secure_installation 安全性設定工具:
mysql_secure_installation
設定 root 密碼、移除匿名登入帳號、禁止 root 從遠端登入、移除測試用的資料庫。
使用 root 帳號登入 MariaDB 伺服器:
mysql -u root -p
2017年9月5日 星期二
yum repolist - 基本 指令 用法與範例說明
列出所有的套件庫(repository)
yum repolist
yum -v repolist | less
列出所有 EPEL 中的套件
yum --disablerepo="*" --enablerepo="epel" list available
搜尋 EPEL 中的套件
yum --disablerepo="*" --enablerepo="epel" search mongodb
安裝 EPEL 中的套件
yum --disablerepo="*" --enablerepo="epel" install mongodb
--disablerepo="*" 與 --enablerepo="epel" 參數
停用所有其他的套件庫,只使用 EPEL
yum repolist
yum -v repolist | less
列出所有 EPEL 中的套件
yum --disablerepo="*" --enablerepo="epel" list available
搜尋 EPEL 中的套件
yum --disablerepo="*" --enablerepo="epel" search mongodb
安裝 EPEL 中的套件
yum --disablerepo="*" --enablerepo="epel" install mongodb
--disablerepo="*" 與 --enablerepo="epel" 參數
停用所有其他的套件庫,只使用 EPEL
Installing MariaDB with YUM 安裝 指令
Installing MariaDB with YUM:
1. Adding the MariaDB YUM repository
2. Installing MariaDB with YUM
3. start MariaDB
[root@localhost hen]# systemctl start mariadb
[root@localhost hen]# mysql
================
1. Adding the MariaDB YUM repository
[root@localhost hen]# vi /etc/yum.repos.d/MariaDB.repo
[root@localhost hen]# cat /etc/yum.repos.d/MariaDB.repo
# MariaDB 10.2 CentOS repository list - created 2017-09-06 03:11 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
================
2. Installing MariaDB with YUM
[root@localhost hen]# yum install MariaDB-server MariaDB-client
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
epel/x86_64/metalink | 6.4 kB 00:00
epel | 4.3 kB 00:00
extras | 3.4 kB 00:00
mariadb | 2.9 kB 00:00
mongodb-org-3.4 | 2.5 kB 00:00
updates | 3.4 kB 00:00
(1/5): epel/x86_64/group_gz | 170 kB 00:00
(2/5): epel/x86_64/updateinfo | 817 kB 00:00
(3/5): extras/primary_db | 191 kB 00:00
(4/5): mariadb/primary_db | 21 kB 00:00
(5/5): epel/x86_64/primary_db | 4.8 MB 00:00
Loading mirror speeds from cached hostfile
* epel: mirror2.totbb.net
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.2.8-1.el7.centos will be installed
--> Processing Dependency: MariaDB-common for package: MariaDB-client-10.2.8-1.el7.centos.x86_64
---> Package MariaDB-server.x86_64 0:10.2.8-1.el7.centos will be installed
--> Processing Dependency: galera for package: MariaDB-server-10.2.8-1.el7.centos.x86_64
--> Running transaction check
---> Package MariaDB-common.x86_64 0:10.2.8-1.el7.centos will be installed
--> Processing Dependency: MariaDB-compat for package: MariaDB-common-10.2.8-1.el7.centos.x86_64
---> Package galera.x86_64 0:25.3.20-1.rhel7.el7.centos will be installed
--> Processing Dependency: libboost_program_options.so.1.53.0()(64bit) for package: galera-25.3.20-1.rhel7.el7.centos.x86_64
--> Running transaction check
---> Package MariaDB-compat.x86_64 0:10.2.8-1.el7.centos will be obsoleting
---> Package boost-program-options.x86_64 0:1.53.0-26.el7 will be installed
---> Package mariadb-libs.x86_64 1:5.5.52-1.el7 will be obsoleted
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
MariaDB-client x86_64 10.2.8-1.el7.centos mariadb 48 M
MariaDB-compat x86_64 10.2.8-1.el7.centos mariadb 2.8 M
replacing mariadb-libs.x86_64 1:5.5.52-1.el7
MariaDB-server x86_64 10.2.8-1.el7.centos mariadb 108 M
Installing for dependencies:
MariaDB-common x86_64 10.2.8-1.el7.centos mariadb 155 k
boost-program-options x86_64 1.53.0-26.el7 base 156 k
galera x86_64 25.3.20-1.rhel7.el7.centos mariadb 8.0 M
Transaction Summary
================================================================================
Install 3 Packages (+3 Dependent packages)
Total download size: 168 M
Is this ok [y/d/N]:
Is this ok [y/d/N]: y
Downloading packages:
警告:/var/cache/yum/x86_64/7/mariadb/packages/MariaDB-10.2.8-centos7-x86_64-com mon.rpm: 表頭 V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
Public key for MariaDB-10.2.8-centos7-x86_64-common.rpm is not installed
(1/6): MariaDB-10.2.8-centos7-x86_64-common.rpm | 155 kB 00:01
(2/6): MariaDB-10.2.8-centos7-x86_64-compat.rpm | 2.8 MB 00:11
(3/6): boost-program-options-1.53.0-26.el7.x86_64.rpm | 156 kB 00:00
(4/6): MariaDB-10.2.8-centos7-x86_64-client.rpm | 48 MB 00:03:16
(5/6): galera-25.3.20-1.rhel7.el7.centos.x86_64.rpm | 8.0 MB 00:00:34
(6/6): MariaDB-10.2.8-centos7-x86_64-server.rpm | 108 MB 00:07:29
------------------------------------------------------------------------------------
Total 371 kB/s | 168 MB 07:42
Retrieving key from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Importing GPG key 0x1BB943DB:
Userid : "MariaDB Package Signing Key <package-signing-key@mariadb.org>"
Fingerprint: 1993 69e5 404b d5fc 7d2f e43b cbcb 082a 1bb9 43db
From : https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Is this ok [y/N]:
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : MariaDB-common-10.2.8-1.el7.centos.x86_64 1/7
Installing : MariaDB-compat-10.2.8-1.el7.centos.x86_64 2/7
Installing : MariaDB-client-10.2.8-1.el7.centos.x86_64 3/7
Installing : boost-program-options-1.53.0-26.el7.x86_64 4/7
Installing : galera-25.3.20-1.rhel7.el7.centos.x86_64 5/7
Installing : MariaDB-server-10.2.8-1.el7.centos.x86_64 6/7
chown: 無效的使用者: ‘mysql’
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
'/usr/bin/mysql_secure_installation'
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.
Please report any problems at http://mariadb.org/jira
The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
Erasing : 1:mariadb-libs-5.5.52-1.el7.x86_64 7/7
Verifying : MariaDB-compat-10.2.8-1.el7.centos.x86_64 1/7
Verifying : MariaDB-client-10.2.8-1.el7.centos.x86_64 2/7
Verifying : boost-program-options-1.53.0-26.el7.x86_64 3/7
Verifying : galera-25.3.20-1.rhel7.el7.centos.x86_64 4/7
Verifying : MariaDB-server-10.2.8-1.el7.centos.x86_64 5/7
Verifying : MariaDB-common-10.2.8-1.el7.centos.x86_64 6/7
Verifying : 1:mariadb-libs-5.5.52-1.el7.x86_64 7/7
Installed:
MariaDB-client.x86_64 0:10.2.8-1.el7.centos
MariaDB-compat.x86_64 0:10.2.8-1.el7.centos
MariaDB-server.x86_64 0:10.2.8-1.el7.centos
Dependency Installed:
MariaDB-common.x86_64 0:10.2.8-1.el7.centos
boost-program-options.x86_64 0:1.53.0-26.el7
galera.x86_64 0:25.3.20-1.rhel7.el7.centos
Replaced:
mariadb-libs.x86_64 1:5.5.52-1.el7
Complete!
================
3. start MariaDB
systemctl start mariadb
[root@localhost hen]# systemctl start mariadb
[root@localhost hen]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.2.8-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]> use test
Database changed
MariaDB [test]> SHOW TABLES;
Empty set (0.00 sec)
MariaDB [test]>
1. Adding the MariaDB YUM repository
2. Installing MariaDB with YUM
3. start MariaDB
[root@localhost hen]# systemctl start mariadb
[root@localhost hen]# mysql
================
1. Adding the MariaDB YUM repository
[root@localhost hen]# vi /etc/yum.repos.d/MariaDB.repo
[root@localhost hen]# cat /etc/yum.repos.d/MariaDB.repo
# MariaDB 10.2 CentOS repository list - created 2017-09-06 03:11 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
================
2. Installing MariaDB with YUM
[root@localhost hen]# yum install MariaDB-server MariaDB-client
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
epel/x86_64/metalink | 6.4 kB 00:00
epel | 4.3 kB 00:00
extras | 3.4 kB 00:00
mariadb | 2.9 kB 00:00
mongodb-org-3.4 | 2.5 kB 00:00
updates | 3.4 kB 00:00
(1/5): epel/x86_64/group_gz | 170 kB 00:00
(2/5): epel/x86_64/updateinfo | 817 kB 00:00
(3/5): extras/primary_db | 191 kB 00:00
(4/5): mariadb/primary_db | 21 kB 00:00
(5/5): epel/x86_64/primary_db | 4.8 MB 00:00
Loading mirror speeds from cached hostfile
* epel: mirror2.totbb.net
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.2.8-1.el7.centos will be installed
--> Processing Dependency: MariaDB-common for package: MariaDB-client-10.2.8-1.el7.centos.x86_64
---> Package MariaDB-server.x86_64 0:10.2.8-1.el7.centos will be installed
--> Processing Dependency: galera for package: MariaDB-server-10.2.8-1.el7.centos.x86_64
--> Running transaction check
---> Package MariaDB-common.x86_64 0:10.2.8-1.el7.centos will be installed
--> Processing Dependency: MariaDB-compat for package: MariaDB-common-10.2.8-1.el7.centos.x86_64
---> Package galera.x86_64 0:25.3.20-1.rhel7.el7.centos will be installed
--> Processing Dependency: libboost_program_options.so.1.53.0()(64bit) for package: galera-25.3.20-1.rhel7.el7.centos.x86_64
--> Running transaction check
---> Package MariaDB-compat.x86_64 0:10.2.8-1.el7.centos will be obsoleting
---> Package boost-program-options.x86_64 0:1.53.0-26.el7 will be installed
---> Package mariadb-libs.x86_64 1:5.5.52-1.el7 will be obsoleted
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
MariaDB-client x86_64 10.2.8-1.el7.centos mariadb 48 M
MariaDB-compat x86_64 10.2.8-1.el7.centos mariadb 2.8 M
replacing mariadb-libs.x86_64 1:5.5.52-1.el7
MariaDB-server x86_64 10.2.8-1.el7.centos mariadb 108 M
Installing for dependencies:
MariaDB-common x86_64 10.2.8-1.el7.centos mariadb 155 k
boost-program-options x86_64 1.53.0-26.el7 base 156 k
galera x86_64 25.3.20-1.rhel7.el7.centos mariadb 8.0 M
Transaction Summary
================================================================================
Install 3 Packages (+3 Dependent packages)
Total download size: 168 M
Is this ok [y/d/N]:
Is this ok [y/d/N]: y
Downloading packages:
警告:/var/cache/yum/x86_64/7/mariadb/packages/MariaDB-10.2.8-centos7-x86_64-com mon.rpm: 表頭 V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
Public key for MariaDB-10.2.8-centos7-x86_64-common.rpm is not installed
(1/6): MariaDB-10.2.8-centos7-x86_64-common.rpm | 155 kB 00:01
(2/6): MariaDB-10.2.8-centos7-x86_64-compat.rpm | 2.8 MB 00:11
(3/6): boost-program-options-1.53.0-26.el7.x86_64.rpm | 156 kB 00:00
(4/6): MariaDB-10.2.8-centos7-x86_64-client.rpm | 48 MB 00:03:16
(5/6): galera-25.3.20-1.rhel7.el7.centos.x86_64.rpm | 8.0 MB 00:00:34
(6/6): MariaDB-10.2.8-centos7-x86_64-server.rpm | 108 MB 00:07:29
------------------------------------------------------------------------------------
Total 371 kB/s | 168 MB 07:42
Retrieving key from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Importing GPG key 0x1BB943DB:
Userid : "MariaDB Package Signing Key <package-signing-key@mariadb.org>"
Fingerprint: 1993 69e5 404b d5fc 7d2f e43b cbcb 082a 1bb9 43db
From : https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Is this ok [y/N]:
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : MariaDB-common-10.2.8-1.el7.centos.x86_64 1/7
Installing : MariaDB-compat-10.2.8-1.el7.centos.x86_64 2/7
Installing : MariaDB-client-10.2.8-1.el7.centos.x86_64 3/7
Installing : boost-program-options-1.53.0-26.el7.x86_64 4/7
Installing : galera-25.3.20-1.rhel7.el7.centos.x86_64 5/7
Installing : MariaDB-server-10.2.8-1.el7.centos.x86_64 6/7
chown: 無效的使用者: ‘mysql’
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
'/usr/bin/mysql_secure_installation'
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.
Please report any problems at http://mariadb.org/jira
The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
Erasing : 1:mariadb-libs-5.5.52-1.el7.x86_64 7/7
Verifying : MariaDB-compat-10.2.8-1.el7.centos.x86_64 1/7
Verifying : MariaDB-client-10.2.8-1.el7.centos.x86_64 2/7
Verifying : boost-program-options-1.53.0-26.el7.x86_64 3/7
Verifying : galera-25.3.20-1.rhel7.el7.centos.x86_64 4/7
Verifying : MariaDB-server-10.2.8-1.el7.centos.x86_64 5/7
Verifying : MariaDB-common-10.2.8-1.el7.centos.x86_64 6/7
Verifying : 1:mariadb-libs-5.5.52-1.el7.x86_64 7/7
Installed:
MariaDB-client.x86_64 0:10.2.8-1.el7.centos
MariaDB-compat.x86_64 0:10.2.8-1.el7.centos
MariaDB-server.x86_64 0:10.2.8-1.el7.centos
Dependency Installed:
MariaDB-common.x86_64 0:10.2.8-1.el7.centos
boost-program-options.x86_64 0:1.53.0-26.el7
galera.x86_64 0:25.3.20-1.rhel7.el7.centos
Replaced:
mariadb-libs.x86_64 1:5.5.52-1.el7
Complete!
================
3. start MariaDB
systemctl start mariadb
[root@localhost hen]# systemctl start mariadb
[root@localhost hen]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.2.8-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
MariaDB [(none)]> use test
Database changed
MariaDB [test]> SHOW TABLES;
Empty set (0.00 sec)
MariaDB [test]>
Install vCenter Server 6.5 for Windows - 安裝 指令
安裝VMware vCenter Sever 6.5 步驟紀錄筆記:
Log in to vCenter Server by Using the vSphere Web Client:
https://10.1.1.1/vsphere-client
https://10.1.1.1/ui
2017年9月3日 星期日
Install MongoDB Community Edition - 安裝 指令
Install MongoDB Community Edition
mySOP:
1. Configure repository:
Create an /etc/yum.repos.d/mongodb-org-3.4.repo
2. yum install -y mongodb-org
3. Start MongoDB:
systemctl start mongod
Ref:
mySOP:
1. Configure repository:
Create an /etc/yum.repos.d/mongodb-org-3.4.repo
[root@localhost ~]# cat /etc/yum.repos.d/mongodb-org-3.4.repo [mongodb-org-3.4] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc |
2. yum install -y mongodb-org
3. Start MongoDB:
systemctl start mongod
Ref:
[root@localhost ~]# date 四 8月 10 22:32:50 CST 2017 [root@localhost ~]# yum install -y mongodb-org Loaded plugins: fastestmirror, langpacks base | 3.6 kB 00:00:00 epel/x86_64/metalink | 5.5 kB 00:00:00 epel | 4.3 kB 00:00:00 extras | 3.4 kB 00:00:00 mongodb-org-3.4 | 2.5 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/3): epel/x86_64/updateinfo | 809 kB 00:00:00 (2/3): mongodb-org-3.4/7/primary_db | 36 kB 00:00:00 (3/3): epel/x86_64/primary_db | 4.8 MB 00:00:36 Loading mirror speeds from cached hostfile * epel: mirror01.idc.hinet.net Resolving Dependencies --> Running transaction check ---> Package mongodb-org.x86_64 0:3.4.7-1.el7 will be installed --> Processing Dependency: mongodb-org-tools = 3.4.7 for package: mongodb-org-3.4.7-1.el7.x86_64 --> Processing Dependency: mongodb-org-shell = 3.4.7 for package: mongodb-org-3.4.7-1.el7.x86_64 --> Processing Dependency: mongodb-org-server = 3.4.7 for package: mongodb-org-3.4.7-1.el7.x86_64 --> Processing Dependency: mongodb-org-mongos = 3.4.7 for package: mongodb-org-3.4.7-1.el7.x86_64 --> Running transaction check ---> Package mongodb-org-mongos.x86_64 0:3.4.7-1.el7 will be installed ---> Package mongodb-org-server.x86_64 0:3.4.7-1.el7 will be installed ---> Package mongodb-org-shell.x86_64 0:3.4.7-1.el7 will be installed ---> Package mongodb-org-tools.x86_64 0:3.4.7-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================== Package Arch Version Repository Size ======================================================================================================== Installing: mongodb-org x86_64 3.4.7-1.el7 mongodb-org-3.4 5.8 k Installing for dependencies: mongodb-org-mongos x86_64 3.4.7-1.el7 mongodb-org-3.4 12 M mongodb-org-server x86_64 3.4.7-1.el7 mongodb-org-3.4 20 M mongodb-org-shell x86_64 3.4.7-1.el7 mongodb-org-3.4 11 M mongodb-org-tools x86_64 3.4.7-1.el7 mongodb-org-3.4 49 M Transaction Summary ======================================================================================================== Install 1 Package (+4 Dependent packages) Total download size: 91 M Installed size: 258 M Downloading packages: 警告:/var/cache/yum/x86_64/7/mongodb-org-3.4/packages/mongodb-org-3.4.7-1.el7.x86_64.rpm: 表頭 V3 RSA/SHA1 Signature, key ID a15703c6: NOKEY Public key for mongodb-org-3.4.7-1.el7.x86_64.rpm is not installed (1/5): mongodb-org-3.4.7-1.el7.x86_64.rpm | 5.8 kB 00:00:00 (2/5): mongodb-org-mongos-3.4.7-1.el7.x86_64.rpm | 12 MB 00:00:14 (3/5): mongodb-org-server-3.4.7-1.el7.x86_64.rpm | 20 MB 00:00:21 (4/5): mongodb-org-shell-3.4.7-1.el7.x86_64.rpm | 11 MB 00:00:12 (5/5): mongodb-org-tools-3.4.7-1.el7.x86_64.rpm | 49 MB 00:00:30 -------------------------------------------------------------------------------------------------------- Total 1.7 MB/s | 91 MB 00:00:52 Retrieving key from https://www.mongodb.org/static/pgp/server-3.4.asc Importing GPG key 0xA15703C6: Userid : "MongoDB 3.4 Release Signing Key <packaging@mongodb.com>" Fingerprint: 0c49 f373 0359 a145 1858 5931 bc71 1f9b a157 03c6 From : https://www.mongodb.org/static/pgp/server-3.4.asc Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : mongodb-org-server-3.4.7-1.el7.x86_64 1/5 Created symlink from /etc/systemd/system/multi-user.target.wants/mongod.service to /usr/lib/systemd/system/mongod.service. Installing : mongodb-org-shell-3.4.7-1.el7.x86_64 2/5 Installing : mongodb-org-mongos-3.4.7-1.el7.x86_64 3/5 Installing : mongodb-org-tools-3.4.7-1.el7.x86_64 4/5 Installing : mongodb-org-3.4.7-1.el7.x86_64 5/5 Verifying : mongodb-org-tools-3.4.7-1.el7.x86_64 1/5 Verifying : mongodb-org-mongos-3.4.7-1.el7.x86_64 2/5 Verifying : mongodb-org-shell-3.4.7-1.el7.x86_64 3/5 Verifying : mongodb-org-3.4.7-1.el7.x86_64 4/5 Verifying : mongodb-org-server-3.4.7-1.el7.x86_64 5/5 Installed: mongodb-org.x86_64 0:3.4.7-1.el7 Dependency Installed: mongodb-org-mongos.x86_64 0:3.4.7-1.el7 mongodb-org-server.x86_64 0:3.4.7-1.el7 mongodb-org-shell.x86_64 0:3.4.7-1.el7 mongodb-org-tools.x86_64 0:3.4.7-1.el7 Complete! |
訂閱:
文章 (Atom)
2026 馬躍新春 圍爐宴
【麗寶福容大飯店】2026 馬躍新春 圍爐宴 早鳥優惠 10人份圍爐桌菜NT$20,000 。 6人半桌圍爐桌菜NT$13,800 。 早鳥優惠須加原價一成服務費用。 早鳥優惠須於2025.11.30前預定並全額付款。 洽詢專線 : 04-2556-0768 新春 圍爐...
-
「.vimrc」檔案: 執行vim時會先去執行使用者家目錄下的「.vimrc」檔案(~/.vimrc)。 顏色方案(colorscheme): vim內建顏色方案功能,可以使用「colorscheme」指令來設定vim的配色主題。 vim內建顏色方案,存...
-
Ref: https://en.wikipedia.org/wiki/Key_derivation_function https://en.wikipedia.org/wiki/PBKDF2 The most common use of KDFs is the passw...