본문 바로가기
Operating System/Linux & Unix

Linux 기본 명령어2 (ubuntu 기준)

by Berasix 2023. 12. 25.
반응형

1. apt-cache search 프로그램명 - apt 목록에서 프로그램 검색하기

 

2. apt list | grep tomcat - apt 목록 전체에서 프로그램 검색하기

 

3. ps -aux | grep 프로그램 - 프로세스 목록에서 프로그램 검색하기

복잡한 경로들과 명령들이 잔뜩있어 당황스럽겠지만,

tomcat 의 PID가 "42400" 으로 되어있음을 확인할 수 있다.

 

**** 여기서 잠깐!!!! AWS 에서 tomcat 포트 오픈하기 ****

(1) EC2 에서 인스턴스 리스트로 진입

EC2 -> 인스턴스

 

(2) 인스턴스의 보안탭으로 진입

 

(3) 인바운드 규칙을 추가하기 위해 보안 그룹으로 진입

TCP 8080 포트를 열고, 규칙 저장

 

4. netstat -nlpt - 포트 상태와 관련 프로세스 보기

 

5. apt remove - 프로그램 삭제

sudo apt remove tomcat9 : 설정파일은 지우지 않음.

sudo apt --purge remove tomcat9 : 환경설정까지 삭제

 

6. apt ppa 저장소 추가하기

 우분투용 개인 저장소 검색 가능한 사이트

https://launchpad.net/ubuntu/+ppas

 

Personal Package Archives : Ubuntu

Ubuntu also includes a wide variety of software through its network of software repositories. Once your system is installed you can simply call up a list of all the existing tools out there and choose any of them for immediate installation over the interne

launchpad.net

tomcat 8.5 검색 예시

위의 명령으로 저장소를 추가할 수 있다.

주의할점은, Published in : 선택박스에서 설치한 ubuntu 의 코드명을 지원하는 저장소를 찾아야한다는 것이다.

 

[[[ 코드명 찾아보기 ]]]

https://ko.wikipedia.org/wiki/%EC%9A%B0%EB%B6%84%ED%88%AC_%EB%B2%84%EC%A0%84_%EC%97%AD%EC%82%AC

 

우분투 버전 역사 - 위키백과, 우리 모두의 백과사전

위키백과, 우리 모두의 백과사전. «Ubuntu Through The Years» (2004-2016) 우분투의 버전은 배포판이 나온 연도와 달로 매긴다. 7.10은 2007년 10월, 8.04는 2008년 4월에 나온 버전이다. 각 버전은 알파벳 순서

ko.wikipedia.org

 

/etc/apt/sources.list.d/ 폴더에 해당 저장소가 추가되어 있고, apt-cache 로 검색도 되는 것을 볼 수 있다.

*** 참고

잘못된 저장소 삭제

$sudo add-apt-repository --remove ppa:ttyrnpuu/tomcat

 

7. lsb_release -a - 우분투 코드이름, 버전 확인하는 명령

 

 

728x90

댓글