IT Curation 자세히보기
728x90

2023/06 9

ubuntu 22.04 | nic 이름 변경

규칙 생성 vi /etc/udev/rules.d/70-persistent-net.rules $"{mac address}"에 맥주소 문자열로 교체 NAME 에 원하는 장치명으로 입력 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}==$"{mac address}", NAME="enp1s0" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}==$"{mac address}", NAME="enp2s0" 부팅 설정 vi /etc/default/grub 아래 내용입력 GRUB_CMDLINE_LINUX="net.ifnames=1 biosdevname=0" GRUB업데이트 update-grub ne..

OS/ubuntu 2023.06.24

ubuntu 20.04 | nfs 서버 생성.

서버 구성 패키지설치 # apt update # apt install nfs-kernel-server 폴더 생성 mkdir /nfs/data 권한 설정 chmod 777 -R /nfs exports파일 작성 /etc/exports에 작성하며 전체 허용일때는 *을 입력함. ${directory path} ${ipaddress}(rw,sync) 또는 ${directory path} *(rw,sync) 서비스 재시작 systemctl restart nfs-server 클라이언트 구성 및 연결 클라이언트 설치 # apt update # apt install -y nfs-common 연결 테스트 # mount -t nfs ${nfs-server-addr}:${dir-path} ${mount-dir-path}

OS/ubuntu 2023.06.15

django | 로그인 시 계정 유무 확인 기능 구현

django에 있는 기능을 일부 커스텀해서 구현하는 방법 입니다. LoginView의 get_context_data부분을 수정하여 백엔드 구현 후 템플릿으로 쏘는 방법으로 구현해보았습니다. def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) # -- 내가작성 -- try: user_name = self.request.POST['username'] except: user_name="none" print(user_name) User = get_user_model() # users = User.objects.all().values_list("user") user = list(User.objects.all().val..