본문 바로가기

server/linux

(14)
ubuntu 20.04에서 riscv-gnu-toolchain 설치 에러 해결 우분투 20.04에서 riscv-gnu-toolchain 메뉴얼을 따라하다보면 아래와같은 에러와 마주친다.test@test:~/riscv-gnu-toolchain$ git submodule update --init --recursiveerror: Server does not allow request for unadvertised object beb2cdbcda911764b2bed5e57921fe90493260bdFetched in submodule path 'binutils', but it did not contain beb2cdbcda911764b2bed5e57921fe90493260bd. Direct fetching of that commit failed.  Error Fetching Submodul..
빌드를 위한 유저 추가 및 root 권한, 패스워드 생략 설정 root@test:~# adduser --force-badname me.user #유저명에 특수문자포함때문에 옵션 추가 Allowing use of questionable username. Adding user `me.user' ... Adding new group `me.user' (1000) ... Adding new user `me.user' (1000) with group `me.user' ... Creating home directory `/home/me.user' ... Copying files from `/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user ..
[Ubuntu] TFTP 설정 신규 이미지 공유서버를 신설했는데, 장비에서 계속 timeout 발생. wget으로 다운받다보니 TFTP설정을 깜빡함. 1) 패키지 설치 sudo apt-get install xinetd tftp tftpd 2) tftp 설정 vi /etc/xinetd.d/tftp service tftp { socket_type = dgram protocol = udp wait = yes user = nobody port = 69 server = /usr/sbin/in.tftpd server_args = /tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 } vi /etc/default/tftpd-hpa # /etc/default/tftpd-hpa TFTP_..
[Ubuntu] Ubuntu 20.04 절전모드 해제 서버가 자꾸 떨어진다고해서 확인중에 알게된 사실. 우분투 20.04(GUI)부터 절전모드에 진입하면 네트워크 통신을 정지한다. 그래서 따로 해제 설정을 해야한다. root@build$ sudo systemctl mask sleep.target suspend.target hibernate.target hybird-sleep.target Created symlink /etc/systemd/system/sleep.target → /dev/null. Created symlink /etc/systemd/system/suspend.target → /dev/null. Created symlink /etc/systemd/system/hibernate.target → /dev/null. Created symlink /e..
[make] 멀티코어 컴파일 멀티 스레드를 지원하는 CPU 환경에서 지원 make -j # ex) make -j8 CPU 전체 코어 확인 grep "cpu cores" /proc/cpuinfo | tail -1
[CentOS6] Error: Cannot find a valid baseurl for repo: base OS : CentOS 6.8 [root@localhost ~]# yum update Loaded plugins: fastestmirror Setting up Update Process Loading mirror speeds from cached hostfile YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. Invalid release/repo/arch combination/ removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt Error: Cannot find a valid baseurl for repo: base CentO..
포어그라운드와 백그라운드 (nohup) 포어그라운드 백그라운드 백그라운드는 평소에 유튜브 프리미엄 홍보에서도 자주 사용된다. 쉽게 설명하면 실행 시켜놓고 내가 다른일을 할 수 있기 위함이다. 포어그라운드는 딱 그 반대 개념으로써, 지금 내가 포커싱 하고있는 프로세스이다. ssh로 접속을 하게되면 세션을 종료할때 접속하면서 실행했던 프로세스들이 왠만하면 같이 종료된다. 챗봇이나, 내 업무에서는 빌드가 n시간 단위로 걸리기 때문에 이를 활용 할 수 있다. 내가 필요했던 이유는, 스트레스 테스트를 위해 며칠 단위로 시뮬레이터를 돌려야하는데 시뮬레이터 서버는 서버대로 돌고 나는 나대로 컴퓨터 리부팅을 해야해서 찾아낸 방법. nohup & 확인은 jobs 명령어를 통해 가능하다. 나같은 경우 시뮬레이터가 무한으로 돌기 때문에 nohup 명령어를 통해 ..
특정 기간의 디렉토리를 이동하는 방법 OS : Ubuntu 10.04 LTS mv `find . ! \( -type d -path './OLD_Dir' -prune \) -type d -mtime +200` ./OLD_Dir/ 이렇게 하면 200일이 지난 디렉토리만 OLD_Dir로 이동시킵니다. 1) find 명령어 . : 현재 위치에서 찾습니다. ! \( -type d -path './OLD_Dir' -prune \) : (예외처리) OLD_Dir에 검색된 디렉토리들을 이동시킬것이기 때문에, 검색에서 제외시킵니다. -type : 파일 유형을 찾습니다. (d: 디렉토리, f: 일반 파일) -prune : 하위 디렉토리까지 검색하지 않습니다. -mtime : 기간 지정을 정합니다. (+num: num일이 지난 파일, num: num일째 된 파..

728x90