본문 바로가기

리눅스

우분투 CLI(Command Line Interface) 환경에서 네트워크 설정(고정 IP 할당) 우분투 CLI(Command Line Interface) 환경에서 네트워크 설정(고정 IP 할당) 테스트 환경 $ lsb_release -d Description: Ubuntu 20.04 LTS $ getconf LONG_BIT 64 고정 IP 설정 ip addr 명령으로 네트워크 인터페이스 이름 확인 일반적으로 eth0, eth1, wlan0 등과 같은 인터페이스 이름이 사용됩니다. ip addr $ ip addr 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 ... 2: ens33: mtu 1500 qdisc fq_codel state UP group default qlen 1000 ... 00-installer-config.. 더보기
ifconfig 명령어 ifconfig 명령어 ifconfig 명령어는 네트워크 인터페이스의 정보를 확인하고 구성하는 데 사용되는 유닉스 및 Linux 명령어입니다. 네트워크 인터페이스의 IP 주소, 넷마스크, 브로드캐스트 주소, MAC 주소 등을 표시할 수 있습니다. net-tools 패키지 설치 sudo yum install -y net-tools 기본 구문 ifconfig [옵션] [인터페이스] -a 또는 --all: 모든 인터페이스 정보를 표시합니다. 인터페이스: 지정된 네트워크 인터페이스에 대한 정보를 표시합니다. 예를 들어, eth0, wlan0과 같은 인터페이스명을 사용할 수 있습니다. 인터페이스명을 지정하지 않으면 모든 인터페이스의 정보가 표시됩니다. 주요 옵션 up: 지정된 네트워크 인터페이스를 활성화합니다. .. 더보기
[리눅스] getconf 명령어 getconf 명령어 getconf 명령어는 시스템에서 컴파일된 시스템 상수 및 옵션 값을 출력하는 명령어입니다. 예를 들어, getconf PATH 명령어는 시스템의 PATH 환경 변수 값을 출력합니다. getconf 명령어는 POSIX 표준에서 지정된 시스템 상수 및 시스템 옵션 값을 출력합니다. 따라서 시스템의 컴파일러, 헤더 파일, 라이브러리 등의 정보를 확인할 수 있습니다. getconf 명령어는 다음과 같은 옵션을 사용할 수 있습니다. -a : 모든 시스템 상수 값을 출력합니다. : 지정한 시스템 변수의 값을 출력합니다. 예를 들어, getconf PAGE_SIZE 명령어는 페이지 크기 값을 출력합니다. getconf 명령어를 사용하여 시스템 상수 값을 확인하면, 해당 상수를 사용하는 프로그램.. 더보기
[리눅스] 2TB 이상의 디스크를 사용하기 위한 방법(GPT 파티션 설정) 2TB 이상의 디스크를 사용하기 위한 방법(GPT 파티션 설정) 2TB 이상의 디스크를 사용하기 위해서는 GPT (GUID Partition Table) 파티션 스키마를 사용해야 합니다. MBR (Master Boot Record) 파티션 스키마는 2TB 이상의 디스크를 지원하지 않습니다. 디스크 확인 fdisk -l $ fdisk -l ... Disk /dev/sdb: 6.55 TiB, 7201213407232 bytes, 14064869936 sectors Disk model: LOGICAL VOLUME Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/o.. 더보기
CentOS에서 iptables 규칙을 저장하는 방법(iptables save) CentOS에서 iptables 규칙을 저장하는 방법(iptables save) CentOS에서 iptables 규칙을 저장하려면 iptables의 설정을 iptables-save 명령을 사용하여 저장할 수 있습니다. 1. 규칙 저장 iptables-save 명령을 사용하여 현재 활성화된 iptables 규칙을 파일에 저장합니다. 일반적으로 루트 권한이 필요합니다. 저장할 파일의 경로와 이름을 지정합니다. iptables-save > /etc/sysconfig/iptables 이 명령은 현재의 iptables 설정을 /etc/sysconfig/iptables 파일에 저장합니다. 이 파일은 부팅 시 iptables 설정을 다시 적용하는 데 사용됩니다. 2. 규칙 파일 확인 저장된 규칙 파일을 텍스트 편집기.. 더보기
[리눅스] MySQL innodb 설치 MySQL innodb 설치 2.1 MySQL 계정 생성 [root@sangchul mysql-5.1.56]# useradd -m -c "MySQL Server" -d /usr/local/mysql -s /bin/false -u 27 mysql 2.2 MySQL config(innodb 활성화) [root@sangchul mysql-5.1.49]# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-plugins=innobase,innodb_plugin --with-charset=euckr --with-extra-charsets=all 2.3 MySQL make && make install [root@sang.. 더보기
[error] named: initgroups(): Operation not permitted named 실행 시 아래와 같은 에러가 발생할 경우 [root@dns3 slaves]# service named restart named를 정지 중: [ OK ] named를 시작 중: named: initgroups(): Operation not permitted [실패] [root@dns3 slaves]# vi /var/log/messages Mar 26 21:50:03 dns3 kernel: type=1400 audit(1301143803.811:5): avc: denied { getcap } for pid=1776 comm="named" scontext=root:system_r:named_t:s0 tcontext=root:system_r:named_t:s0 tclass=process enforci.. 더보기
CentOS 6.2 에서 dkms를 설치하는 방법 CentOS 6.2 에서 dkms를 설치하는 방법 $ /etc/init.d/vboxdrv setup Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS[실패] (Failed, trying without DKMS) Recompiling VirtualBox kernel modules [실패] (Look at /var/log/vbox-install.log to find out what went wrong) 1. 터미널을 열고 root 권한으로 로그인합니다. 2. EPEL 저장소(Ext.. 더보기