반응형

1. TTYD 설치

ttyd 는 웹 기반 터미널 애뮬레이터라고 한다.

WebSocket 프로토콜을 사용해서 브라우저와 Linux 터미널 간의 실시간 연결을 제공한다고 한다.

 

사용하는 이유는 docker 로 container 를 만들어서 사용할 경우에 직접 컨테이너 안을 들어가기가 어렵다.

(openshift 나 기타 툴을 사용하면 모를까..)

 

그래서 컨테이너 안에서 잘 작동하고 있는지 터미널을 붙혀보기위해 오늘은 ttyd 를 사용하는 방법을 알아보려한다.

나는 Rocky Linux 9.x 에서 작업한다.

설치하는 방법은 아래 페이지에서 가져왔다. (CentOS)

https://snapcraft.io/install/ttyd/centos

나의 경우 Rocky  Linux 9.x 이기 때문에 yum 명령어 대신 dnf 명령어로 수행한다.

sudo dnf install epel-release

sudo dnf install snapd

systemctl enable --now snapd.socket

sudo ln -s /var/lib/snapd/snap /snap

sudo snap install ttyd --classic

 

마지막 명령어에서 에러가 났다.

[root@hostname ~]$ sudo snap install ttyd --classic
error: too early for operation, device not yet seeded or device model not acknowledged

 

snap 명령어가 승인되지 않았다라고 나온다.

systemctl enable 명령부분에서 start 는 안되는 것 같다. (그냥 서버 재기동 시에 시작되게만 되는 듯)

상태를 확인해보았다.

[root@hostname ~]$ systemctl status snapd
○ snapd.service - Snap Daemon
     Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; preset: disabled)
     Active: inactive (dead) since Tue 2025-04-08 17:29:38 KST; 1min 56s ago
   Duration: 8.004s
TriggeredBy: ● snapd.socket
    Process: 1121447 ExecStart=/usr/libexec/snapd/snapd (code=exited, status=42)
   Main PID: 1121447 (code=exited, status=42)
      Error: 2 (No such file or directory)
        CPU: 96ms

 

해결은 그냥 snap.socket 을 실행시켜주었다.

[root@hostname ~]$ systemctl start snapd
[root@hostname ~]$ systemctl status snapd
● snapd.service - Snap Daemon
     Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; preset: disabled)
     Active: active (running) since Tue 2025-04-08 17:31:43 KST; 1s ago
TriggeredBy: ● snapd.socket
   Main PID: 1121496 (snapd)
      Tasks: 9 (limit: 48912)
     Memory: 16.9M
        CPU: 83ms
     CGroup: /system.slice/snapd.service
             └─1121496 /usr/libexec/snapd/snapd

Active 에 active 로 상태 설정을 잘 확인하길 바란다.

이후에 다시 원래 명령어를 실행했다.

sudo snap install ttyd --classic

알아서 잘 다운받는 것 같다.

snap 이라는 명령어가 어떤 store 에서 다운받아 오는 것 같은데, 다음에 알아봐야겠다.

[root@hostname ~]# snap install ttyd --classic
2025-04-08T17:38:07+09:00 INFO Waiting for automatic snapd restart...
Warning: /var/lib/snapd/snap/bin was not found in your $PATH. If you've not restarted your session
         since you installed snapd, try doing that. Please see https://forum.snapcraft.io/t/9469
         for more details.

ttyd 1.7.4 from tsl0922 installed

installed 라고 해서 warning 은 무시하였다.

( 대충 해석하면 snap 이 설치는 되었는데 OS가 안내려갔다 올라와서 snap 에 대한 PATH 를 못찾았다는 내용 같다...

=> 알아서 뭐 잘 설치 했겠지 ㅎㅎ )

 

2. TTYD 를 이용하여 웹에서 접속해보기

우선 설치가 되었는 지 확인해보자

[root@hostname ~]$ ttyd -v
-bash: ttyd: command not found

나 같은 경우 없다고 나온다.

아마 아까 설치할 때 warning 나왔던 PATH 가 이 문제였나보다.

대충 위치를 가늠해보니 설치할 때 link 를 걸어줬던 /snap 으로 들어가 보았더니 거기 안에 설치가 되어있었다.

[root@hostname bin]$ cd /snap/bin
[root@hostname bin]$ ls -al
total 0
drwxr-xr-x. 2 root root 18  4월  8 17:39 .
drwxr-xr-x. 6 root root 70  4월  8 17:39 ..
lrwxrwxrwx. 1 root root 13  4월  8 17:39 ttyd -> /usr/bin/snap
[root@hostname bin]$ ./ttyd -v
ttyd version 1.7.4-68521f5

아무튼간 설치가 잘 되었다!!

 

기본적으로 ttyd 는 7681 포트로 웹서버를 시작한다고 한다.

-p 옵션으로 포트를 변경할 수 있다.

[root@hostname bin]$ ./ttyd -p 8080 bash
[2025/04/08 17:46:21:5072] N: ttyd 1.7.4-68521f5 (libwebsockets 3.2.0)
[2025/04/08 17:46:21:5072] N: tty configuration:
[2025/04/08 17:46:21:5072] N:   start command: bash
[2025/04/08 17:46:21:5072] N:   close signal: SIGHUP (1)
[2025/04/08 17:46:21:5072] N:   terminal type: xterm-256color
[2025/04/08 17:46:21:5072] N: The --writable option is not set, will start in readonly mode[2025/04/08 17:46:21:5073] N:  Using foreign event loop...

실행하면 알아서 서버가 띄워져있고 client 를 listen 하고 있다.

이제 브라우저를 열어서 접속한다.

{서버IP}:8080 으로 접속하면 된다.

이렇게 접속이 된다.

그리고 서버는 잘 연결되었다고 client 의 정보를 보여준다.

 

이렇게 ttyd 설치해서 사용하면 될 것 같다.

 

반응형
반응형

구글에

오라클 라이브 SQL 을 검색한다.

접속 후 Start Coding 을 누르면 바로 사용 가능하다.

 

설명이 계속 나오는데 계속 다음 step 으로 가면 되고

왼쪽에 네비게이션바 상단에 재생 버튼으로 쿼리를 실행시키고 맨 하단쪽에 결과가 나오는 것만 생각하면 될 지 싶다.

 

반응형
반응형

naver76015082e84d113af1ca4e5f7abe525f.html
0.00MB

 

반응형
반응형

Meet MediCube: Your New BFF for Skincare!

Hey there, beauty enthusiasts! 🌟 If you’re on the hunt for the next big thing in skincare, let me introduce you to the game-changer that is A.P.S. Mediheal’s MediCube line. This Korean skincare brand is all about innovation, and trust me, you’re going to want to add these products to your routine!

What’s the Hype About MediCube?

MediCube isn’t your average skincare brand. Born from the belief that everyone deserves accessible and effective skincare, they’ve curated a collection of products that tackle common skin issues like acne, dryness, and dullness. Plus, they’re super easy to incorporate into your routine—perfect for busy lifestyles!

1. MediCube Red-Spot Cream


Let’s keep it real—who hasn’t dealt with pesky breakouts? The MediCube Red-Spot Cream is your secret weapon. Packed with powerful ingredients like salicylic acid and tea tree oil, it helps reduce inflammation and zap those zits before they even get a chance to shine. Just a dab on the trouble spots and you’re good to go!

2. MediCube Pore Cleaning & Tightening Serum


If your pores are giving you a hard time, this serum is about to become your new best friend. The Pore Cleaning & Tightening Serum works wonders to minimize the appearance of pores while controlling excess oil. Say goodbye to shiny T-zones and hello to that fresh-faced glow!

3. MediCube Aqua Hydrating Gel


No one wants dry, flaky skin—am I right? The Aqua Hydrating Gel is like a tall glass of hydration for your face. Lightweight and super refreshing, it soaks deep into the skin, leaving you with that dewy, hydrated look. It’s perfect for layering under makeup or rocking solo for those no-makeup days!

4. MediCube Anti-Aging Cream


Aging? Nah, we’re putting that on hold! This Anti-Aging Cream is here to help smooth out fine lines and give your skin a firm, youthful bounce. Infused with collagen and antioxidants, it’s perfect for keeping your complexion looking fresh and fabulous.

Why Choose MediCube?

Okay, let’s talk about why MediCube deserves a spot on your shelf. Not only do these products deliver real results, but they’re also dermatologist-tested and cruelty-free! Plus, their sleek packaging makes them a total aesthetic win for your skincare routine.

Ready to Glow?

In a world full of skincare options, MediCube stands out for its commitment to quality and effectiveness. If you’re looking to elevate your skincare game and get that glow, look no further!

So, what are you waiting for? Dive into the world of MediCube and unlock your best skin yet. Trust me; your face will thank you! ✨

 

Available on Amazon

https://www.amazon.com/s?k=medicube&crid=2L0J0K0CJBXL2&sprefix=medicub%2Caps%2C271&ref=nb_sb_noss_2

반응형

'Others > USA' 카테고리의 다른 글

7 Vegan Korean Dishes That Will Change Your Life!  (0) 2025.04.04
반응형

 

7 Vegan Korean Dishes That Will Change Your Life!

Korean food is totally taking over the culinary scene, and guess what? Vegan Korean dishes are leading the pack! With bold flavors and eye-catching presentations, these plant-based options are a must-try. Let's check out some delicious vegan Korean eats that everyone will love!

1. Gimbap (김밥)


Gimbap, or Korean sushi, is super fun to eat! These rolls are filled with rice and all kinds of crunchy veggies like pickled radish and cucumber. Roll it up for a quick, on-the-go snack that’s cute and oh-so-delicious.

 

2. Kimchi (김치)


Kimchi is a staple in Korean cuisine, and there are plenty of vegan versions that omit fish sauce. This fermented napa cabbage is spicy, tangy, and loaded with probiotics—talk about a gut-friendly superfood! Use it as a sidekick for your meals or snack on it straight up for that extra zing.

3. Japchae (잡채)


Japchae is a super tasty stir-fried noodle dish made from sweet potato noodles. Packed with a vibrant mix of sautéed veggies, this dish is all about those sweet and savory vibes. It’s a great option for meal prep too, so you can whip up a big batch for the week!

4. Tofu Jjigae (두부찌개)


Feeling chilly? Tofu jjigae is a cozy stew packed with soft tofu and loads of veggies in a spicy broth. Go for veggie broth to keep it vegan, and throw in some mushrooms and zucchini for extra flavor. It’s the perfect comfort food to warm you up!

5. Bibimbap (비빔밥)


Bibimbap is like the ultimate power bowl! It’s a mix of rice topped with all sorts of fresh veggies like spinach, carrots, and mushrooms, drizzled with spicy gochujang. Swap out the egg and meat to make it vegan, and you’ve got yourself a colorful, nutritious meal that’s ready to satisfy your cravings.

6. Mandu (만두)


Who doesn’t love dumplings? Mandu are Korean dumplings that can be filled with a tasty mix of tofu and veggies. They can be steamed or pan-fried for that crispy goodness, and they’re perfect for sharing (or not!). Dip ‘em in soy sauce for an extra kick.

7. Sweet Potato Bungeoppang (붕어빵)


If you’ve got a sweet tooth, you need to try bungeoppang! These adorable fish-shaped pastries are usually filled with sweet red bean paste, and the vegan versions are just as tasty. Crispy on the outside and soft on the inside, they’re perfect for a treat any time of day.

반응형

'Others > USA' 카테고리의 다른 글

Skincare Secrets from the Pros: How to Get Celebrity-Quality Skin!  (0) 2025.04.04
반응형

그 동안은 git add / commit / log / status 를 주로 사용하였는데 이번에는 작업 되돌리는 restore 를 써보려고한다.

나는 주로 작업 트리에서 백업을 해놓고 수정을 항상 하였기 때문에 restore 은 써보질 않았다...

 

스테이징을 하기 전에 (git add 를 하기 전) 수정하고 싶다면 

사용하는 명령은 아래와 같다.

 git restore <파일명>
 # ex) git restore test.txt

 

 

스테이징이 되어있는 상태를 스테이징 전으로 되돌리려면 

명령은 아래와 같다.

git restore --staged <파일명>
# ex) git restore --staged test.txt

 

 

커밋이 된 상태를 되돌리려면 

명령은 아래와 같다.

git reset HEAD^

이 명령어는 가장 최신의 커밋된 상태로 돌리는 것이다.

커밋도 취소되고 스테이지에서도 내려간다.

 

HEAD^ 는 최신 버전으로 이동한다.

최신이 아니라 특정 버전의 hash 값을 HEAD^ 대신 넣으면 된다.

git reset dfkjaldfieiruieruieradfj0000dfdf

이런 식으로 말이다.

 

하지만 reset 은 이전 기록을 전부 다 삭제하는 것이기 때문에 조심해서 사용해야 한다.

이전 기록을 남기는 revert 를 사용하면 기록을 남길 수 있어 reset 보다는 조금 더 사용이 많을 것 같다.

# 1. log 에서 원하는 버전의 해시를 가져온다.
git log
commit 8aaebc0f4f499e9710da31a282e0092be208dda3

# 2. git revert 명령을 통해 커밋을 취소한다.
git revert 8aaebc0f4f499e9710da31a282e0092be208dda3

 

반응형

'Git > Git 기초 다지기' 카테고리의 다른 글

[Git] 1. 저장소 (Repository)  (0) 2024.12.09
반응형

그 동안 대충 사용하던 Git 을 깊이 있게 공부하려 한다.

하루 왠종일 공부할 것은 아니고 빈 시간에 조금씩 해보려 한다.

책은 "Do it! 5일 만에 끝내는 깃&깃허브" 입문 을 ebook 으로 구매하였다.

 

일단 Git Bash 를 설치하였다. 

설치 방법은 단순하게 Git Page 에서 받아서 거의 Next 만 눌렀다. 

https://git-scm.com/downloads/win

 

Git - Downloading Package

Download for Windows Click here to download the latest (2.47.1) 64-bit version of Git for Windows. This is the most recent maintained build. It was released on 2024-11-25. Other Git for Windows downloads Standalone Installer 32-bit Git for Windows Setup. 6

git-scm.com

 

저 Click here to download 를 클릭해서 다운 받았고 그 외에는 책의 가이드대로 설치하였는데, 

거의 Next 만 눌렀기 때문에 글로 적진 않겠다. (설치보다는 개념을 이해하려고 쓴 글이기 때문에....)

 

저장소 (repository) 를 만드는 방법은 저장소로 만들고 싶은 디렉토리를 생성한다. 

# test 디렉토리 생성
mkdir test;
# test 디렉토리로 이동
cd test;
# 저장소 생성
git init

git init 으로 저장소를 생성한다. 

저장소가 성공적으로 생성이 된 것을 확인하려면 위의 경우 test 디렉토리 안에서 ls -al 명령어로 .git 파일이 있는 지 확인하면 된다.

이 .git 파일이 어떤 것인지 지금부터 기록한다.

 

Git 의 장점 중에 버전 관리가 있는데 이 .git 파일 안에 생긴 것들이 버전 관리를 하게 된다.

버전 관리는 위의 세가지 요소들이 하게 된다.

작업 공간은 실제로 우리가 작업하는 공간이다.

스테이지는 버전으로 만들 파일들이 대기하는 장소이다.

저장소는 대기하던 파일들을 버전으로 만들어 저장하는 곳이다.

 

작업공간에서 git add 명령어를 사용하면 스테이지로 올라간다.

그리고 그 스테이지에서 git commit 명령어를 사용하면 저장소로 옮겨지는 것이였다.

내가 아무생각 없이 commit 하던 내용들이 이런 의미를 내포하고 있었다.

그래서 결국 commit 은 버전을 만드는 것이다.

반응형

'Git > Git 기초 다지기' 카테고리의 다른 글

[Git] 2. 작업 되돌리는 방법 (git restore)  (0) 2024.12.10
반응형

OS 정보 : CentOS 7.9 Version

발생 에러 : yum 으로 설치 시 발생하였음...

에러명 : Errno 256 No more mirrors to try

 

ChatGPT 에 물어봤을 때 나오는 결과

"[Errno 256] No more mirrors to try"는 패키지 관리자가 설치할 수 있는 미러 서버를 모두 시도했지만, 원하는 패키지를 다운로드할 수 없을 때 발생하는 오류입니다. 이 오류는 보통 미러 서버의 문제, 패키지의 경로가 잘못되었거나, 패키지가 서버에서 제거되었을 때 발생합니다. 해결책으로는 레포지토리 설정을 확인하고, 다른 미러 사이트를 사용하거나, 사전 유효성을 확인하는 것이 있습니다. 중요한 정보는 다시 확인하시기 바랍니다.

 

보통은 yum 캐시가 손상되는데, 필자는 그래도 동일한 에러가 나타났다.

네트워크 문제는 아니고 아마 미러 서버가 사라진 듯 하다.

 

cd /etc/yum.repos.d

 

yum repository 의 위치가 /etc/yum.repos.d 에 있다. 

해당 디렉토리에 기존 파일들을 백업 후에 CentOS-Base.repo 파일을 수정해주었다. 

 

# 1. backup 작업
mkdir backup
mv CentOS-* ./backup

# 2. Repo 생성
vi CentOS-Base.repo

# 3. 아래 내용 붙혀넣기
[base]
name=CentOS-$releasever - Base
# original
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
# new
baseurl=http://centos.mirror.cdnetworks.com/7/os/x86_64
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
# original
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
# new
baseurl=http://centos.mirror.cdnetworks.com/7/updates/x86_64
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
# original
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
# new
baseurl=http://centos.mirror.cdnetworks.com/7/extras/x86_64
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
# original
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
# new
baseurl=http://centos.mirror.cdnetworks.com/7/centosplus/x86_64
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

 

그래도 동일한 에러가 나타났다. 

failure: repodata/repomd.xml from pgdg-common: [Errno 256] No more mirrors to try.

오류를 보니 pgdg 라는 것이 문제인 것 같았다.

pgdg는 처음보는 단어라 ChatGPT에 물어보았더니 아래와 같이 대답하였다.

 

pgdg는 PostgreSQL Global Development Group의 약자로, PostgreSQL 데이터베이스 시스템의 개발 및 배포를 담당하는 조직입니다. 주로 다양한 플랫폼에 PostgreSQL을 설치하기 위해 PPA(Personal Package Archive)를 제공하며, 이를 통해 사용자는 Ubuntu와 같은 리눅스 배포판에 PostgreSQL을 쉽게 설치할 수 있습니다.

 

검색해봐도 잘 모르겠다.

뭔가 조금 다른 설명인거 같기도 해서 pgdg-redhat-all.repo 파일에 대해서 물어봤다.

 

pgdg-redhat-all.repo 파일은 PostgreSQL의 Yum 리포지토리를 관리하기 위한 설정 파일로, PostgreSQL 패키지를 Red Hat 계열의 운영 체제에서 설치하고 업데이트할 수 있게 해줍니다. 이 파일을 통해 PostgreSQL을 간편하게 설치할 수 있으며, OS 버전과 관련된 correctly 설정이 필요합니다. 이와 관련하여 GPG 서명 오류와 같은 문제가 발생할 수 있으니 유의해야 합니다.

 

yum 리포지토리 관리 설정파일이다.

아무튼 설정파일 자체에 문제가 있는거 같았다.

아직까지도 추측이나(현재는 해당 현상 해결) PostgreSQL 11버전이 EOS 가 되면서 에러가 나오지 않았을 까 생각한다.

아무튼 이 문제를 해결하기는 어려웠다... 여러 삽질을 했지만 해결이 되지 않았고 아래 블로그에서 기존 pgdg를 삭제하는 방법을 알게되어 그대로 적용해보았다.

https://aegonggang.tistory.com/34

 

CentOS7- Postgresql 14 + postgis 설치하기

postgresql 14 버전을 선 설치 후geometry 타입을 사용하기 위해 postgis 설치가 필요했다. postgis.x86_64 를 설치해서yum list | grep postgis 명령어를 통해 확인했으나, 설치에 문제는 없어 보였다. psql -U postgre

aegonggang.tistory.com

 

1. 기존 사용중인 pgdg 삭제

yum remove pgdg-redhat-repo

 

2. postgresql 14용 pgdg 저장소 설치 

yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

 

3. 저장소 캐시 비우기

yum clean all
yum makecache

 

위와 같이 하였더니 재설치 되면서 에러가 사라졌다.

이제 yum update 시에도 에러가 나지 않으며 정상화 되었다...

반응형

+ Recent posts