IT/linux

리눅스에 프로그램 설치하기

준나이 2018. 10. 16. 16:51

[리눅스에 native 설치하는 3가지 방법]
1) source -> building -> make
2) package t
3) 압축파일 이용

(그외 별도의 가상환경을 생성하는 docker를 이용하는 방법도 있다.)


[package 설치]
package 설치 툴을 이용해서 설치하는 방법으로 root에 설치되서 users에게 상속된다.
ubuntu 는 주로 apt-get이 쓰이고 cent os, redhat 에는 yum이 쓰임.
e.g.) sudo yum install programme


[압축파일]
account 별로 app folder 설치하여 app 정리 (/home/user_name/app)
홈페이지에서 tar.gz / zip 확장자 등으로 끝나는 압축파일을 다운로드 받고, app 폴더 내에서 풀어준다.

(참고)
하지만 bin file내에 위치한 파일을 바로 실행 할 수가 없으므로 app내 bin folder를 path를 설정해줘야 한다. 여기서 압축을 풀었을 때 folder 이름은 programme_name-6.4.0과 같이 버전의 형태로 끝나는 경우가 많은데, ln 명령어를 통해 symbolic link를 만들어 주면 나중에 버전 업그레이드를 해주더라도 하나하나 안바꿔줘도 되서 편하다.

e.g.) ln -s programme_name-6.4.0 programme_name #on_linux
export PATH=$PATH:home/user_name/programme_name/bin #in .profile

#########profle

[SOURCE]

Most UNIX software uses a very similar build process:
1) ./configure : first you configure the build with the install location, where to find any libraries it needs, etc.
2) make : then you compile the software
3) make test : then you test the software
4) sudo make install : then you install the software


'IT > linux' 카테고리의 다른 글

ubuntu에서 python cx_oracle로 oracle 접근  (1) 2019.10.16
Gunicorn X Supervisor  (0) 2018.10.15
chmod /chown  (0) 2018.10.15
Daemon vs. Crontab  (0) 2018.10.15