Linux/centos2020. 12. 14. 14:36

/etc/inittab이 안되서 찾아보니

systemctl set-default 명령을 통해서 바꾸면 된다.

 

# systemctl get-default
graphical.target

# systemctl set-default multi-user.target
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/multi-user.target.

# systemctl get-default
multi-user.target

# systemctl list-units -t target -a
  UNIT                      LOAD      ACTIVE   SUB    DESCRIPTION
  basic.target              loaded    active   active Basic System
  cryptsetup.target         loaded    active   active Local Encrypted Volumes
  emergency.target          loaded    inactive dead   Emergency Mode
  getty-pre.target          loaded    inactive dead   Login Prompts (Pre)
  getty.target              loaded    active   active Login Prompts
  graphical.target          loaded    inactive dead   Graphical Interface
  initrd-fs.target          loaded    inactive dead   Initrd File Systems
  initrd-root-device.target loaded    inactive dead   Initrd Root Device
  initrd-root-fs.target     loaded    inactive dead   Initrd Root File System
  initrd-switch-root.target loaded    inactive dead   Switch Root
  initrd.target             loaded    inactive dead   Initrd Default Target
  local-fs-pre.target       loaded    active   active Local File Systems (Pre)
  local-fs.target           loaded    active   active Local File Systems
  multi-user.target         loaded    active   active Multi-User System
  network-online.target     loaded    active   active Network is Online
  network-pre.target        loaded    active   active Network (Pre)
  network.target            loaded    active   active Network
  nfs-client.target         loaded    active   active NFS client services
  nss-lookup.target         loaded    inactive dead   Host and Network Name Lookups
  nss-user-lookup.target    loaded    active   active User and Group Name Lookups
  paths.target              loaded    active   active Paths
  remote-fs-pre.target      loaded    active   active Remote File Systems (Pre)
  remote-fs.target          loaded    active   active Remote File Systems
  rescue.target             loaded    inactive dead   Rescue Mode
  rpc_pipefs.target         loaded    active   active rpc_pipefs.target
  rpcbind.target            loaded    active   active RPC Port Mapper
  shutdown.target           loaded    inactive dead   Shutdown
  slices.target             loaded    active   active Slices
  sockets.target            loaded    active   active Sockets
  sound.target              loaded    active   active Sound Card
  sshd-keygen.target        loaded    active   active sshd-keygen.target
  swap.target               loaded    active   active Swap
  sysinit.target            loaded    active   active System Initialization
● syslog.target             not-found inactive dead   syslog.target
  time-sync.target          loaded    inactive dead   System Time Synchronized
  timers.target             loaded    active   active Timers
  umount.target             loaded    inactive dead   Unmount All Filesystems

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

37 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.

[링크 : https://www.linuxfork.com/how-to-change-the-run-level-on-rhel-centos-7-8/]

 

+

아래는 안되는 왜 한지 모르겠는 뻘짓

 

--force를 주고도 한번에 안되서 여러번을 하고 나서야 되네..

stop 하고 나서 된건진 잘 모르겠다.

그리고 여전히 gui로 켜지는건 달라지지 않았다 ㅠㅠ

]# systemctl list-units -t target -a
  UNIT                      LOAD      ACTIVE   SUB    DESCRIPTION
  basic.target              loaded    active   active Basic System
  cryptsetup.target         loaded    active   active Local Encrypted Volumes
  emergency.target          loaded    inactive dead   Emergency Mode
  getty-pre.target          loaded    inactive dead   Login Prompts (Pre)
  getty.target              loaded    active   active Login Prompts
  graphical.target          loaded    active   active Graphical Interface
  initrd-fs.target          loaded    inactive dead   Initrd File Systems
  initrd-root-device.target loaded    inactive dead   Initrd Root Device
  initrd-root-fs.target     loaded    inactive dead   Initrd Root File System
  initrd-switch-root.target loaded    inactive dead   Switch Root
  initrd.target             loaded    inactive dead   Initrd Default Target
  local-fs-pre.target       loaded    active   active Local File Systems (Pre)
  local-fs.target           loaded    active   active Local File Systems
  multi-user.target         loaded    active   active Multi-User System
  network-online.target     loaded    active   active Network is Online
  network-pre.target        loaded    active   active Network (Pre)
  network.target            loaded    active   active Network
  nfs-client.target         loaded    active   active NFS client services
  nss-lookup.target         loaded    inactive dead   Host and Network Name Lookups
  nss-user-lookup.target    loaded    active   active User and Group Name Lookups
  paths.target              loaded    active   active Paths
  remote-fs-pre.target      loaded    active   active Remote File Systems (Pre)
  remote-fs.target          loaded    active   active Remote File Systems
  rescue.target             loaded    inactive dead   Rescue Mode
  rpc_pipefs.target         loaded    active   active rpc_pipefs.target
  rpcbind.target            loaded    active   active RPC Port Mapper
  shutdown.target           loaded    inactive dead   Shutdown
  slices.target             loaded    active   active Slices
  sockets.target            loaded    active   active Sockets
  sound.target              loaded    active   active Sound Card
  sshd-keygen.target        loaded    active   active sshd-keygen.target
  swap.target               loaded    active   active Swap
  sysinit.target            loaded    active   active System Initialization
● syslog.target             not-found inactive dead   syslog.target
  time-sync.target          loaded    inactive dead   System Time Synchronized
  timers.target             loaded    active   active Timers
  umount.target             loaded    inactive dead   Unmount All Filesystems

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

37 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.


# systemctl status graphical.target
● graphical.target - Graphical Interface
   Loaded: loaded (/usr/lib/systemd/system/graphical.target; indirect; vendor preset: disabled)
   Active: active since Mon 2020-12-14 00:20:24 EST; 7min ago
     Docs: man:systemd.special(7)

12월 14 00:20:24 localhost.localdomain systemd[1]: Reached target Graphical Interface.

# systemctl disable  graphical.target
Removed /etc/systemd/system/default.target.

# systemctl disable graphical.target --force

# systemctl status graphical.target
● graphical.target - Graphical Interface
   Loaded: loaded (/usr/lib/systemd/system/graphical.target; static; vendor preset: disabled)
   Active: inactive (dead) since Mon 2020-12-14 00:33:58 EST; 8s ago
     Docs: man:systemd.special(7)

12월 14 00:29:09 localhost.localdomain systemd[1]: Reached target Graphical Interface.
12월 14 00:33:58 localhost.localdomain systemd[1]: Stopped target Graphical Interface.

]# systemctl list-units -t target -a
  UNIT                      LOAD      ACTIVE   SUB    DESCRIPTION
  basic.target              loaded    active   active Basic System
  cryptsetup.target         loaded    active   active Local Encrypted Volumes
  emergency.target          loaded    inactive dead   Emergency Mode
  getty-pre.target          loaded    inactive dead   Login Prompts (Pre)
  getty.target              loaded    active   active Login Prompts
  graphical.target          loaded    inactive dead   Graphical Interface
  initrd-fs.target          loaded    inactive dead   Initrd File Systems
  initrd-root-device.target loaded    inactive dead   Initrd Root Device
  initrd-root-fs.target     loaded    inactive dead   Initrd Root File System
  initrd-switch-root.target loaded    inactive dead   Switch Root
  initrd.target             loaded    inactive dead   Initrd Default Target
  local-fs-pre.target       loaded    active   active Local File Systems (Pre)
  local-fs.target           loaded    active   active Local File Systems
  multi-user.target         loaded    active   active Multi-User System
  network-online.target     loaded    active   active Network is Online
  network-pre.target        loaded    active   active Network (Pre)
  network.target            loaded    active   active Network
  nfs-client.target         loaded    active   active NFS client services
  nss-lookup.target         loaded    inactive dead   Host and Network Name Lookups
  nss-user-lookup.target    loaded    active   active User and Group Name Lookups
  paths.target              loaded    active   active Paths
  remote-fs-pre.target      loaded    active   active Remote File Systems (Pre)
  remote-fs.target          loaded    active   active Remote File Systems
  rescue.target             loaded    inactive dead   Rescue Mode
  rpc_pipefs.target         loaded    active   active rpc_pipefs.target
  rpcbind.target            loaded    active   active RPC Port Mapper
  shutdown.target           loaded    inactive dead   Shutdown
  slices.target             loaded    active   active Slices
  sockets.target            loaded    active   active Sockets
  sound.target              loaded    active   active Sound Card
  sshd-keygen.target        loaded    active   active sshd-keygen.target
  swap.target               loaded    active   active Swap
  sysinit.target            loaded    active   active System Initialization
● syslog.target             not-found inactive dead   syslog.target
  time-sync.target          loaded    inactive dead   System Time Synchronized
  timers.target             loaded    active   active Timers
  umount.target             loaded    inactive dead   Unmount All Filesystems

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

37 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.

 

[링크 : https://linuxconfig.org/how-to-change-a-runlevel-on-rhel-7-linux-system]

'Linux > centos' 카테고리의 다른 글

centos8 virbr0?  (0) 2020.12.14
centos 8.3-2011 용량이 많이 늘었나?  (0) 2020.12.14
centos stream?  (0) 2020.12.10
centos 8.2 네트워크 설정  (0) 2020.12.02
ls 퍼미션에 .의 의미  (0) 2020.04.01
Posted by 구차니
Linux/centos2020. 12. 14. 12:59

centos8.2는 minimal로 설치해서 그런가 virbr0 가 안생기더니 풀버전으로 설치했더니 생기네.

 

libvirtd 데몬으로 인해서 생기는 녀석이라고 한다.

 

[링크 : https://fliedcat.tistory.com/167]

'Linux > centos' 카테고리의 다른 글

centos8 init level 3로 부팅시키기  (0) 2020.12.14
centos 8.3-2011 용량이 많이 늘었나?  (0) 2020.12.14
centos stream?  (0) 2020.12.10
centos 8.2 네트워크 설정  (0) 2020.12.02
ls 퍼미션에 .의 의미  (0) 2020.04.01
Posted by 구차니
Linux/centos2020. 12. 14. 12:55

 

 

 

8.2-2004 에서는 minimal 버전이라 그랬나 10기가에서도 깔렸는데

8.3-2011 에서는 10GB 밖에 안되니 용량 늘려라고 진행 자체가 안된다

 

그런데 8.2 에서는 minimal이 있었는데

8.3 에서는 왜 minimal을 제공하지 않는 걸까?

 

+

virtual box 에서 centos8.3 설치하니 네트워크가 아노딘다.

virbr0가 잡히고 enp3s 어쩌구는 ip를 못받아온다. 멀까?

 

+

그래픽 컨트롤러가 원래 VMSVGA 였던가?

'Linux > centos' 카테고리의 다른 글

centos8 init level 3로 부팅시키기  (0) 2020.12.14
centos8 virbr0?  (0) 2020.12.14
centos stream?  (0) 2020.12.10
centos 8.2 네트워크 설정  (0) 2020.12.02
ls 퍼미션에 .의 의미  (0) 2020.04.01
Posted by 구차니
Linux/centos2020. 12. 10. 10:27

centos project가 centos Stream으로 집중하기로 결정(전환)

[링크 : https://lists.centos.org/pipermail/centos-announce/2020-December/048208.html]

 

redhat의 입장

[링크 : https://www.redhat.com/en/blog/centos-stream-building-innovative-future-enterprise-linux]

 

centos stream의 시작

[링크 : https://www.redhat.com/en/blog/transforming-development-experience-within-centos]

 

centos FAQ

[링크 : https://centos.org/distro-faq/]

 

 

-

간단하게 요약(?) 하자면

 

실험적 버전인 Fedora core

사용 서버 버전인 RHEL

RHEL의 GPL 소스 공개 빌드 버전인 Centos 가 있었는데

 

centos를 redhat/ibm에서

RHEL 이전의 단계로 흡수하면서 관리 하게 되어, RHEL 의 clone 으로서 centos는 사라진다는 의미가 되려나?

'Linux > centos' 카테고리의 다른 글

centos8 virbr0?  (0) 2020.12.14
centos 8.3-2011 용량이 많이 늘었나?  (0) 2020.12.14
centos 8.2 네트워크 설정  (0) 2020.12.02
ls 퍼미션에 .의 의미  (0) 2020.04.01
centos7 minimal / X11 사용하기  (0) 2020.02.04
Posted by 구차니
Linux/centos2020. 12. 2. 10:29

minimal 버전으로 설치하긴 했는데 네트워크 넘겼는지 기억이 나지 않는다 -_ㅠ

virtual box에서 NAT로 설정하고 설치를 했는데 네트워크가 잡히지 않아서 확인해보니

nmcli유틸을 이용해서 네트워크를 올려주어야 한다.

$ sudo nmcli connection down enp1s0 && sudo nmcli connection up enp1s0

[링크 : https://linuxconfig.org/rhel-8-configure-static-ip-address]

 

위에대로 하면 1회성에 한해 네트워크 설정이 잡히는데

다시 설정 파일을 보니 ONBOOT=no로 되어있었다.

 

 

$ sudo vi /etc/sysconfig/network-script/ifcfg-enp0s3
ONBOOT=yes
#ONBOOT=no

[링크 : https://www.lesstif.com/system-admin/centos-network-centos-static-ip-13631535.html]

 

아니 이런건 기본값이 yes로 해달란 말이야.. ㅠㅠ

'Linux > centos' 카테고리의 다른 글

centos 8.3-2011 용량이 많이 늘었나?  (0) 2020.12.14
centos stream?  (0) 2020.12.10
ls 퍼미션에 .의 의미  (0) 2020.04.01
centos7 minimal / X11 사용하기  (0) 2020.02.04
리눅스 로그인 실패 로그  (2) 2019.07.07
Posted by 구차니
Linux/centos2020. 4. 1. 16:59

drwr-xr-x. 이라고 표시되는 게 있는데

selinux security context가 있을 경우 . 으로 표기 된다고 한다.

+로 표기 되는건 다른 alternate access method의 조합이 있을 경우라는데 그게 어떤 의미인진 모르겠다.

setfacl로 세부 조정된 내용이 있으면 +가 뜨는 걸까?

 

from info coreutils 'ls invocation' under Linux

GNU `ls' uses a `.' character to indicate a file with an SELinux
     security context, but no other alternate access method.

A file with any other combination of alternate access methods is
     marked with a `+' character.

[링크 : https://stackoverflow.com/.../what-does-the-dot-at-the-end-of-the-permissions-in-the-output-of-ls-lah-mean]

'Linux > centos' 카테고리의 다른 글

centos stream?  (0) 2020.12.10
centos 8.2 네트워크 설정  (0) 2020.12.02
centos7 minimal / X11 사용하기  (0) 2020.02.04
리눅스 로그인 실패 로그  (2) 2019.07.07
centos7 USB 설치 중 /dev/root dose not exist 에러  (0) 2019.07.02
Posted by 구차니
Linux/centos2020. 2. 4. 12:57

패키지 설치

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=6979708]

 

 

sshd_config 설정

[링크 : https://stackoverflow.com/questions/38961495/x11-forwarding-request-failed-on-channel-0]

AllowTcpForwarding yes 
#GatewayPorts no 
X11Forwarding yes 
X11DisplayOffset 10 
#X11UseLocalhost no 
#PermitTTY yes 
PrintMotd no 
PrintLastLog yes 
TCPKeepAlive yes 
#UseLogin no 
UsePrivilegeSeparation sandbox 

[링크 : https://sonumb.tistory.com/79]

[링크 : https://harryp.tistory.com/684]

'Linux > centos' 카테고리의 다른 글

centos 8.2 네트워크 설정  (0) 2020.12.02
ls 퍼미션에 .의 의미  (0) 2020.04.01
리눅스 로그인 실패 로그  (2) 2019.07.07
centos7 USB 설치 중 /dev/root dose not exist 에러  (0) 2019.07.02
httpd + php + selinux..  (0) 2019.03.20
Posted by 구차니
Linux/centos2019. 7. 7. 14:28

centos7 에서는

/var/log/secure에 존재하네

 

로그인 시도가 보이는데 fail2ban을 해놔야 하려나..

 

[링크 : https://www.tecmint.com/find-failed-ssh-login-attempts-in-linux/]

'Linux > centos' 카테고리의 다른 글

ls 퍼미션에 .의 의미  (0) 2020.04.01
centos7 minimal / X11 사용하기  (0) 2020.02.04
centos7 USB 설치 중 /dev/root dose not exist 에러  (0) 2019.07.02
httpd + php + selinux..  (0) 2019.03.20
'abrt-cli status' timed out  (0) 2019.03.01
Posted by 구차니
Linux/centos2019. 7. 2. 16:37

결론은.. USB 미디어 잘못이거나 잘못 구워서 다시 잘 구워쓰세요.. 인가?

 

그나저나.. 회사에서 싸게 구매한 샌디스크 USB3.0 32GB 이녀석 하나는

인식도 안되게 날아가더니 얘는 이렇게 이미지가 깨졌나 (한번 설치한적은 있으니 장기간 보관문제?)

설치 미디어가 좀 불안하네

그게 아니라면.. rufus iso 모드로 해서 그런걸까?

 

[링크 : https://blog.naver.com/unsutilizer/221033311684]

[링크 : https://wnsgp.tistory.com/12]

[링크 : https://unix.stackexchange.com/questions/147426/dev-root-does-not-exist-in-centos-7]

'Linux > centos' 카테고리의 다른 글

centos7 minimal / X11 사용하기  (0) 2020.02.04
리눅스 로그인 실패 로그  (2) 2019.07.07
httpd + php + selinux..  (0) 2019.03.20
'abrt-cli status' timed out  (0) 2019.03.01
centos nfs client  (0) 2019.02.27
Posted by 구차니
Linux/centos2019. 3. 20. 10:59

언제나 그렇듯 selinux는 만악의 근원이구만?


80번 포트가 아닌 다른 포트를 쓰려고 할때 httpd 데몬이 실행안되는 경우

(아래는 5000번 포트를 웹 서버로 쓰려고 할 경우)

# semanage port -m -t http_port_t -p tcp  5000

# semanage port -a -t http_port_t -p tcp  5000

[링크 : http://egloos.zum.com/dochi575/v/4867779]

[링크 : https://stackoverflow.com/questions/17079670/]


php 페이지가 열리지 않을 경우

# ls -Z

# sudo chcon -t httpd_sys_content_t /var/www/html -R

[링크 : https://blog.lysender.com/2015/07/centos-7-selinux-php-apache-cannot-writeaccess-file-no-matter-what/]


'Linux > centos' 카테고리의 다른 글

리눅스 로그인 실패 로그  (2) 2019.07.07
centos7 USB 설치 중 /dev/root dose not exist 에러  (0) 2019.07.02
'abrt-cli status' timed out  (0) 2019.03.01
centos nfs client  (0) 2019.02.27
centos timezone 변경  (2) 2019.02.23
Posted by 구차니