728x90

출처

Jenkins 도커 이미지 다운로드

orangepi@orangepi5:~$ docker pull jenkins/jenkins:lts
lts: Pulling from jenkins/jenkins
c3e6129b48b6: Pull complete 
Digest: sha256:f8b19176b7d4f62cc40ae8605fbbfb2abc6ed7aec9f36989fc7b3e616371b956
Status: Downloaded newer image for jenkins/jenkins:lts
docker.io/jenkins/jenkins:lts

Jenkins 도커 이미지 실행 (브릿지모드)

orangepi@orangepi5:~$ docker run --name jenkins-docker \
  -p 7979:8080 \
  -p 50000:50000 \
  -d -v /var/run/docker.sock:/var/run/docker.sock \
  -v jenkins_home:/var/jenkins_home \
  -u root jenkins/jenkins:lts
7892e850a3702ee25690e80a84ae661619cd459a116164d80d2874472526a199

Jenkins 실행 확인

orangepi@orangepi5:~$ docker ps -a
CONTAINER ID   IMAGE                       COMMAND                  CREATED         STATUS                 PORTS                                                                                      NAMES
7892e850a370   jenkins/jenkins:lts         "/usr/bin/tini -- /u…"   3 minutes ago   Up 3 minutes           0.0.0.0:50000->50000/tcp, :::50000->50000/tcp, 0.0.0.0:7979->8080/tcp, :::7979->8080/tcp   jenkins-docker

Jenkins 어드민 암호 확인

orangepi@orangepi5:~$ docker logs jenkins-docker
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
 
... 생략 ...
 
2023-01-24 09:51:37.750+0000 [id=40]    INFO    jenkins.install.SetupWizard#init: 
 
*************************************************************
*************************************************************
*************************************************************
 
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
 
6a5f9d0833fe467da39d124d93547dab
 
This may also be found at: /var/jenkins_home/secrets/initialAdminPassword
 
*************************************************************
*************************************************************
*************************************************************
 
2023-01-24 09:51:55.013+0000 [id=40]    INFO    jenkins.InitReactorRunner$1#onAttained: Completed initialization
2023-01-24 09:51:55.051+0000 [id=24]    INFO    hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running
2023-01-24 09:51:55.947+0000 [id=58]    INFO    h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
2023-01-24 09:51:55.948+0000 [id=58]    INFO    hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1

Jenkins 접속

접속주소 : http://192.168.1.26:7979/

728x90
728x90

출처

리눅스 확인

orangepi@orangepi5:~$ uname -a
Linux orangepi5 5.10.110-rockchip-rk3588 #1.1.0 SMP Fri Jan 6 14:00:53 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
orangepi@orangepi5:~$ cat /proc/version
Linux version 5.10.110-rockchip-rk3588 (root@test) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #1.1.0 SMP Fri Jan 6 14:00:53 CST 2023
orangepi@orangepi5:~$ uname -r
5.10.110-rockchip-rk3588
orangepi@orangepi5:~$ uname -m 
aarch64
orangepi@orangepi5:~$ cat /etc/issue
Orange Pi 1.1.0 Jammy \l 
 
orangepi@orangepi5:~$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
## PLEASE DO NOT EDIT THIS FILE
BOARD=orangepi5
BOARD_NAME="Orange Pi 5"
BOARDFAMILY=rockchip-rk3588
BUILD_REPOSITORY_URL=https://github.com/orangepi-xunlong/orangepi-build
BUILD_REPOSITORY_COMMIT=1e88c5d82-dirty
DISTRIBUTION_CODENAME=jammy
DISTRIBUTION_STATUS=supported
VERSION=1.1.0
LINUXFAMILY=rockchip-rk3588
ARCH=arm64
IMAGE_TYPE=user-built
BOARD_TYPE=conf
INITRD_ARCH=arm64
KERNEL_IMAGE_TYPE=Image
IMAGE_UUID=7307ac30-03ec-42b9-ac3a-10244aa27a85
## PLEASE DO NOT EDIT THIS FILE
BOARD=orangepi5
BOARD_NAME="Orange Pi 5"
BOARDFAMILY=rockchip-rk3588
BUILD_REPOSITORY_URL=https://github.com/orangepi-xunlong/orangepi-build
BUILD_REPOSITORY_COMMIT=1e88c5d82-dirty
DISTRIBUTION_CODENAME=jammy
DISTRIBUTION_STATUS=supported
VERSION=1.1.0
LINUXFAMILY=rockchip-rk3588
ARCH=arm64
IMAGE_TYPE=user-built
BOARD_TYPE=conf
INITRD_ARCH=arm64
KERNEL_IMAGE_TYPE=Image
BRANCH=legacy
PRETTY_NAME="Orange Pi 1.1.0 Jammy"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

도커 버전 확인

orangepi@orangepi5:~$ docker version
Client: Docker Engine - Community
 Version:           20.10.23
 API version:       1.41
 Go version:        go1.18.10
 Git commit:        7155243
 Built:             Thu Jan 19 17:33:18 2023
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true
 
Server: Docker Engine - Community
 Engine:
  Version:          20.10.23
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.10
  Git commit:       6051f14
  Built:            Thu Jan 19 17:31:30 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.15
  GitCommit:        5b842e528e99d4d4c1686467debf2bd4b88ecd86
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

mysql 이미지 받아오기 (pull)

orangepi@orangepi3b:~$ docker pull mysql/mysql-server:5.7
5.7: Pulling from mysql/mysql-server
d70f3c0cccba: Pull complete 
e7dc89aa39f7: Pull complete 
76cc4215b650: Pull complete 
25b0bb53e492: Pull complete 
349b52643cc3: Pull complete 
62ddcf4a4134: Pull complete 
c91c597e717d: Pull complete 
c7e93886e496: Pull complete 
Digest: sha256:1178cdd375f758968cd834ac4057bae41307e64b7c69a9e145896e7b11f48064
Status: Downloaded newer image for mysql/mysql-server:5.7
docker.io/mysql/mysql-server:5.7

mysql 도커 이미지 실행 (브릿지모드)

orangepi@orangepi5:~$ docker run -d \
  -p 3306:3306 \
  -e MYSQL_ROOT_PASSWORD=password \
  --name mysql-server \
  -v /exthdd/dockerData/mysql:/var/lib/mysql mysql/mysql-server:latest \
  --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
b51f212af1a497b5ac6de8c5cdccd7ba4f0e40390eb7e036806a9464c27553f9

mysql 실행 확인

orangepi@orangepi5:~$ docker ps -a
CONTAINER ID   IMAGE                       COMMAND                  CREATED              STATUS                        PORTS                                                        NAMES
b51f212af1a4   mysql/mysql-server:latest   "/entrypoint.sh --ch…"   About a minute ago   Up About a minute (healthy)   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060-33061/tcp   mysql-server

MySQL 접속, root 외부 접속 계정 생성

Docker로 mysql-server 컨테이너 접속

orangepi@orangepi5:~$ docker exec -it mysql-server /bin/bash
bash-4.4# whoami
root

MySQL 접속

bash-4.4# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 8.0.32 MySQL Community Server - GPL
 
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
 
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>

mysql 데이터베이스로 이동

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

현재 계정 확인

mysql> select host, user, authentication_string from user;
+-----------+------------------+------------------------------------------------------------------------+
| host      | user             | authentication_string                                                  |
+-----------+------------------+------------------------------------------------------------------------+
| localhost | healthchecker    | $A$005$+o%8u   V&V5A01J/aCWOrIjMG.NNcTxQAqUkzIu9vZanJ07NooGg1O45EbB |
| localhost | mysql.infoschema | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.session    | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.sys        | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | root             | $A$005$6wQait7{        _\4vz,0OhQhCJkeGInRJt8/bv2BUvcnAj/izDj.00Zuob8458 |
+-----------+------------------+------------------------------------------------------------------------+
5 rows in set (0.00 sec)

외부 접속이 가능한 root 계정 생성

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.06 sec)
 
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.04 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)

생성된 root 계정 확인

mysql> select host, user, authentication_string from user;
+-----------+------------------+------------------------------------------------------------------------+
| host      | user             | authentication_string                                                  |
+-----------+------------------+------------------------------------------------------------------------+
| %         | root             | $A$005$s%:wO_,UA0W%f+BtL6iODgWvpDzbLfAxYRM169ckvJPVwgjc79mxY7LKK4 |
| localhost | healthchecker    | $A$005$+o%8u   V&V5A01J/aCWOrIjMG.NNcTxQAqUkzIu9vZanJ07NooGg1O45EbB |
| localhost | mysql.infoschema | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.session    | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | mysql.sys        | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |
| localhost | root             | $A$005$6wQait7{        _\4vz,0OhQhCJkeGInRJt8/bv2BUvcnAj/izDj.00Zuob8458 |
+-----------+------------------+------------------------------------------------------------------------+
6 rows in set (0.00 sec)

MySQL 포트 확인

orangepi@orangepi5:~$ netstat -nao | grep 3306
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp6       0      0 :::3306                 :::*                    LISTEN      off (0.00/0/0)
unix  3      [ ]         STREAM     CONNECTED     33067    /run/user/1000/bus
unix  3      [ ]         STREAM     CONNECTED     33065    /run/user/1000/bus
728x90
728x90

Orange PI Zero

출처 : 스터디메이크 :: 오렌지파이 제로 보드 간단 사용기
Xunlong Orange Pi Zero

OS 설치

OS 다운로드 - Orange Pi Zero – armbian

vi 설치

$ sudo apt-get install vim

Orange PI Zero 와이파이 설정

출처 : 오렌지파이 제로 무선인터넷 설정 1.2 암비안 와이파이 설정

$ sudo nmtui

SD 확장

SD 확장전 용량확인

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       1.6G  1.2G  349M  78% /
devtmpfs        168M     0  168M   0% /dev
tmpfs           224M     0  224M   0% /dev/shm
tmpfs           224M  8.5M  216M   4% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           224M     0  224M   0% /sys/fs/cgroup
tmpfs           224M  4.0K  224M   1% /tmp
/dev/mmcblk0p1   63M  4.6M   59M   8% /media/boot
tmpfs            45M     0   45M   0% /run/user/107
tmpfs            45M     0   45M   0% /run/user/1000

SD FDisk

orangepi@OrangePizero:~$ sudo fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000b04ea

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1       40960  172031  131072   64M  b W95 FAT32
/dev/mmcblk0p2      172032 3514367 3342336  1.6G 83 Linux


Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2048-15523839, default 2048): 172032
Last sector, +sectors or +size{K,M,G,T,P} (172032-15523839, default 15523839): 

Created a new partition 2 of type 'Linux' and of size 7.3 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

orangepi@OrangePizero:~$ sudo shutdown -r now

SD 확장

$ sudo resize2fs /dev/mmcblk0p2
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/mmcblk0p2 is now 1918976 (4k) blocks long.

SD 확장 확인

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.3G  1.2G  5.8G  17% /
devtmpfs        168M     0  168M   0% /dev
tmpfs           224M     0  224M   0% /dev/shm
tmpfs           224M  8.5M  216M   4% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           224M     0  224M   0% /sys/fs/cgroup
tmpfs           224M  4.0K  224M   1% /tmp
/dev/mmcblk0p1   63M  4.6M   59M   8% /media/boot
tmpfs            45M     0   45M   0% /run/user/107
tmpfs            45M     0   45M   0% /run/user/1000

vnc 설치

출처 : Armbian: Access the Remote Desktop of Orange Pi with VNC

vnc 설치

$ sudo apt-get update && apt-get upgrade
$ sudo apt-get install tightvncserver

vnc 사용자 추가

$ su - 
# adduser vnc
Adding user `vnc' ...
Adding new group `vnc' (1001) ...
Adding new user `vnc' (1001) with group `vnc' ...
Creating home directory `/home/vnc' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for vnc
Enter the new value, or press ENTER for the default
        Full Name []: VNCuser
        Room Number []: 
        Work Phone []: 
        Home Phone []: 
        Other []: 
Is the information correct? [Y/n] 

vnc 사용자 추가

# gpasswd -a vnc sudo
Adding user vnc to group sudo

vnc 서버 실행

# su - vnc
$ vncserver :1
 
You will require a password to access your desktops.
 
Password: 
Verify:   
Would you like to enter a view-only password (y/n)? 
*** buffer overflow detected ***: vncpasswd terminated
xauth:  file /home/vnc/.Xauthority does not exist
 
New 'X' desktop is OrangePizero:1
 
Creating default startup script /home/vnc/.vnc/xstartup
Starting applications specified in /home/vnc/.vnc/xstartup
Log file is /home/vnc/.vnc/OrangePizero:1.log

JDK 설치

$ sudo apt install -t jessie-backports openjdk-8-jre openjdk-8-jre-headless openjdk-8-jdk openjdk-8-jdk-headless ca-certificates-java

JAVA_HOME 환경변수 추가

$ sudo vi /etc/profile

내용 추가 export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-armhf

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-armhf
728x90

+ Recent posts