리눅스 소스 설치 관련 명령어 정리
·
Development/Linux
쉘 소스 설치시 wget url로 파일 다운로드 후 tar로 압축 해제 /configure /configure configure는 소스 파일에 대한 환경설정을 해주는 명령어이다. configure뒤에 필요한 옵션을 줄 수 있다. --prefix=경로 : 해당 경로에 파일을 설치 configure에서 에러가 발생할 경우, 에러 내용을 확인 후 configure 구성내용을 변경한다. 필요한 프로그램이나 라이브러리가 없는 경우에는 설치해주면 되고, 입력한 경로에서 문제가 발생할 수도 있는데 configure 구성에서 경로가 맞게 설정되어있는지 확인한다. ex. php cofigure ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/..
한글 깨질 때 인코딩 설정하기
·
Development/Linux
locale 이 eucKR로 되어있는데 한글깨짐이 발생해서 utf8로 변경하였다. 현재 locale 확인 locale 확인해보니 모두 etcKR로 되어있다. vi ~/.bash_profile 추가 bash_profile에 환경변수 저장하기. 하단에 아래 코드를 넣는다. export LANG=ko_KR.UTF-8 재접속 후 확인 UTF-8로 변경되었다.
[Docker] 02. 도커 실행 및 이미지 검색
·
Development/Docker
설치할 버전 CentOS Linux 7 (Core) Linux 3.10.0-1160.el7.x86_64 PHP 7.4.16 (cli) / Zend Engine v3.4.0 SQL*Plus: Release 21.0.0.0.0 Apache/2.4.51 (Unix) cmd(명령 프롬프트)를 실행한다. 아래 명령어로 검색할 수 있다. docker search centos 나는 centos 7을 설치할거라서 버전을 지정해서 다운받았다. docker pull centos:7.9.2009 container 생성 (create) docker create -i -t --name centos centos:7 설치한 centos7의 이름을 'centos'로 지정해주었다. 이름은 rename 명령어로 변경할 수 있다. doc..
[Linux] 리눅스 버전 확인하는 방법
·
Development/Linux
/etc/issue # cat /etc/issue # cat /etc/redhat-release # CentOS Linux release 7.9.2009 (Core) # cat /etc/*release* CentOS Linux release 7.9.2009 (Core) Derived from Red Hat Enterprise Linux 7.8 (Source) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://ww..
[Linux] 특정 ip만 접속 허용하기
·
Development
hosts.allow / deny 특정한 클라이언트에게만 서비스를 허용(allow) 또는 차단(deny)할 수 있다. 특정 ip 허용하기 : allow # vi /etc/hosts.allow sshd: 허용할 ip 특정 ip 차단하기: deny # vi /etc/hosts.deny sshd: 차단할 ip sshd: ALL ALL로 차단하고, allow에서 특정 ip만 허용하면 모든 ip차단/허용된ip만 접속 되게 할 수 있다. # # hosts.allowThis file describes the names of the hosts which are #allowed to use the local INET services, as decided #by the '/usr/sbin/tcpd' server. # ss..
[Linux] 환경변수 확인
·
Development
환경변수 확인하기 아래 명령어로 시스템의 환경변수 목록 전체를 볼 수 있다. # export 특정 환경변수만 확인하기 # echo $[환경변수] $환경변수 명으로 검색하면 해당 변수의 값만 볼 수 있다.