# 윈도우에서 WSL 설치
https://cpuu.postype.com/post/10265353
Windows 10에 WSL2 으로 Ubuntu 설치
1. 윈도우 터미널 설치 Microsoft Store에서 windows termial 설치 windows terminal 을 검색한 후 우클릭하여 '관리자 권한으로 실행' 위와 같이 탭에 "관리자"라고 기재되어 있어야 진행 가능 2. wsl 활성화 아
cpuu.postype.com
# WSL2 다운로드 및 설치
WSL 설치
wsl --install 명령을 사용하여 Linux용 Windows 하위 시스템을 설치합니다. Ubuntu, Debian, SUSE, Kali, Fedora, Pengwin, Alpine 등 원하는 Linux 배포판에서 실행되는 Windows 머신에서 Bash 터미널을 사용할 수 있습니
learn.microsoft.com
- 설치 명령어
wsl --install
- 명령 실행
# 에러 해결
https://tigercoin.tistory.com/254
System has not been booted with systemd as init system (PID 1). Can't operate. / WSL Ubuntu 에러 해결방법
sudo systemctl daemon-reload 명령어 실행할 때 아래와 같은 에러가 발생한다. 그럼 아래 명령어로 해결하면 된다. sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig sudo daemonize /usr/bin/un
tigercoin.tistory.com
sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
snap version
# 도커 실행
https://league-cat.tistory.com/347
도커 설치 후 도커 명령어 실행 에러 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the dock
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 위와 같은 명령어가 뜨면 docker service가 실행이 안되어있는것이다. $sudo systemctl status docker 상태를 확인해 봐라 stop일 것
league-cat.tistory.com
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
$sudo systemctl status docker
$sudo systemctl start docker
$sudo systemctl enable docker
# Docker Service 실행
[Docker] 에러 해결법 (ubuntu) : Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon ru
발생 docker 설치 후 아래 명령어를 실행시키려 할때 아래 에러가 발생 $ sudo docker run hello-world docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. 원인 docker 가 실행되
wotres.tistory.com
# Jenkins 다운로드 및 실행
:~$ sudo docker run -d -p 8080:8080 -p 50000:50000 --name jenkins-server --restart=on-failure -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts-jdk11
:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3baf2273d16a jenkins/jenkins:lts-jdk11 "/usr/bin/tini -- /u…" About a minute ago Up About a minute 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:50000->50000/tcp, :::50000->50000/tcp jenkins-server
:~$ sudo docker exec -it 3baf2273d16a /bin/bash
jenkins@3baf2273d16a:/$ cat /var/jenkins_home/secrets/initialAdminPassword
9ef28cce98ce4aa1ab377dd4197174d4
- 실행 화면은 아래와 같다.
localhost:8080 으로 접속하고 기본 라이브러리 까지 설치하면 아래와 같은 계정 설치 화면으로 이동된다.
- 메인 화면은 아래와 같다.
- 새 프로젝트 생성 후 쉘 스크립트 실행하기
젠킨스 대쉬보드 → 새 아이템 → 프리스타일 프로젝트 → 빌드스텝 추가
- 쉘 스크립트 추가
echo "My First Project with Jenskins"
javac --version
- 결과
콘솔 아웃풋 확인
- 컨테이너 접속
접속하면 해당 컨테이너가 가지고 있는 데이터 등을 컨테이너에서 확인 할 수 있다.
sudo docker exec -it 3baf2273d16a /bin/bash
- 끝 -
'로컬 환경 구성 > 로컬 개발환경 구성' 카테고리의 다른 글
6. Ansible Module (0) | 2023.05.09 |
---|---|
5. Ansible 구성 (0) | 2023.05.09 |
4. 현재까지의 구성 살펴보기 (0) | 2023.05.09 |
2. Git, 메이븐 설정, 새 프로젝트 생성 톰캣 연동하기 (0) | 2023.05.08 |
3. Poll SCM 활용 코드 변경 시 자동빌드 및 ssh를 활용한 다른 서버로 복사하기 (0) | 2023.05.08 |