Linux/Ubuntu2019. 5. 4. 00:31

gnome-tweaks를 설치해서 바로 설정된건지.. 아니면 깔아야 활성화 되는진 모르겠지만

터치패드 3 손가락 터치를 통해 휠 클릭을 흉내낼 수 있다.

(2760p 작은 터치패드에서 하려니 손가락 쥐나는 듯 ㅠㅠ)

 

[링크 : http://ubuntuhandbook.org/index.php/2018/07/touchpad-right-click-not-working-in-ubuntu-18-04/]

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

linux smbus?  (0) 2019.05.04
우분투 창 전환(그룹) 해제하기  (0) 2019.05.04
ubuntu 18.04 kvm 설치하기  (0) 2019.04.30
ubuntu test page 위치  (0) 2018.12.19
epson 프린터 유틸리티 관련  (0) 2018.12.18
Posted by 구차니
Linux/Ubuntu2019. 4. 30. 13:44

귀찮으니 끝판왕을 깔자 ㅋㅋ

 

$ sudo apt install virt-manager
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음의 추가 패키지가 설치될 것입니다 :
  augeas-lenses bridge-utils cpu-checker ebtables gir1.2-appindicator3-0.1 gir1.2-gtk-vnc-2.0 gir1.2-libosinfo-1.0
  gir1.2-libvirt-glib-1.0 gir1.2-spiceclientglib-2.0 gir1.2-spiceclientgtk-3.0 ibverbs-providers ipxe-qemu
  ipxe-qemu-256k-compat-efi-roms libaio1 libaugeas0 libcacard0 libfdt1 libgovirt-common libgovirt2 libgtk-vnc-2.0-0
  libgvnc-1.0-0 libibverbs1 libiscsi7 libnetcf1 libnl-route-3-200 libosinfo-1.0-0 libphodav-2.0-0 libphodav-2.0-common
  librados2 librbd1 librdmacm1 libsdl1.2debian libspice-client-glib-2.0-8 libspice-client-gtk-3.0-5 libspice-server1
  libusbredirhost1 libusbredirparser1 libvirt-clients libvirt-daemon libvirt-daemon-driver-storage-rbd
  libvirt-daemon-system libvirt-glib-1.0-0 libvirt0 libxen-4.9 libxenstore3.0 libxml2-utils msr-tools osinfo-db
  python-asn1crypto python-cairo python-certifi python-cffi-backend python-chardet python-cryptography python-dbus
  python-enum34 python-gi python-gi-cairo python-idna python-ipaddr python-ipaddress python-libvirt python-libxml2
  python-openssl python-pkg-resources python-requests python-six python-urllib3 qemu-block-extra qemu-kvm
  qemu-system-common qemu-system-x86 qemu-utils seabios sharutils spice-client-glib-usb-acl-helper virt-viewer virtinst
제안하는 패키지:
  augeas-doc augeas-tools libosinfo-l10n gstreamer1.0-plugins-bad libvirt-daemon-driver-storage-gluster
  libvirt-daemon-driver-storage-sheepdog libvirt-daemon-driver-storage-zfs numad radvd auditd systemtap nfs-common zfsutils
  pm-utils python-cryptography-doc python-cryptography-vectors python-dbus-dbg python-dbus-doc python-enum34-doc
  python-openssl-doc python-openssl-dbg python-setuptools python-socks python-ntlm samba vde2 sgabios ovmf debootstrap
  sharutils-doc bsd-mailx | mailx ssh-askpass python-guestfs
다음 새 패키지를 설치할 것입니다:
  augeas-lenses bridge-utils cpu-checker ebtables gir1.2-appindicator3-0.1 gir1.2-gtk-vnc-2.0 gir1.2-libosinfo-1.0
  gir1.2-libvirt-glib-1.0 gir1.2-spiceclientglib-2.0 gir1.2-spiceclientgtk-3.0 ibverbs-providers ipxe-qemu
  ipxe-qemu-256k-compat-efi-roms libaio1 libaugeas0 libcacard0 libfdt1 libgovirt-common libgovirt2 libgtk-vnc-2.0-0
  libgvnc-1.0-0 libibverbs1 libiscsi7 libnetcf1 libnl-route-3-200 libosinfo-1.0-0 libphodav-2.0-0 libphodav-2.0-common
  librados2 librbd1 librdmacm1 libsdl1.2debian libspice-client-glib-2.0-8 libspice-client-gtk-3.0-5 libspice-server1
  libusbredirhost1 libusbredirparser1 libvirt-clients libvirt-daemon libvirt-daemon-driver-storage-rbd
  libvirt-daemon-system libvirt-glib-1.0-0 libvirt0 libxen-4.9 libxenstore3.0 libxml2-utils msr-tools osinfo-db
  python-asn1crypto python-cairo python-certifi python-cffi-backend python-chardet python-cryptography python-dbus
  python-enum34 python-gi python-gi-cairo python-idna python-ipaddr python-ipaddress python-libvirt python-libxml2
  python-openssl python-pkg-resources python-requests python-six python-urllib3 qemu-block-extra qemu-kvm
  qemu-system-common qemu-system-x86 qemu-utils seabios sharutils spice-client-glib-usb-acl-helper virt-manager virt-viewer
  virtinst
0개 업그레이드, 79개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.
22.3 M바이트 아카이브를 받아야 합니다.
이 작업 후 102 M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n]

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

우분투 창 전환(그룹) 해제하기  (0) 2019.05.04
우분투 터치패드 휠 클릭 흉내내기  (0) 2019.05.04
ubuntu test page 위치  (0) 2018.12.19
epson 프린터 유틸리티 관련  (0) 2018.12.18
lpstat  (0) 2018.12.18
Posted by 구차니
Linux2019. 4. 25. 10:25

wifi와는 달리 10/100/1000 정도의 선택지 밖에 없는 듯

 

 

# ethtool -s eth0 speed 10 duplex half autoneg off

[링크 : https://www.shellhacks.com/change-speed-duplex-ethernet-card-linux/]

'Linux' 카테고리의 다른 글

diff: memory exhausted  (0) 2019.06.18
plymouth  (0) 2019.06.14
ip별 대역폭 제한하기  (0) 2019.04.25
systemctl restart 시그널  (0) 2019.04.23
ata1 comreset failed (errno=-16)  (0) 2019.04.19
Posted by 구차니
Linux2019. 4. 25. 10:15

iptables나 tc를 이용하여 특정 ip에 대해 대역폭 제한을 걸 수 있는 듯

(DDoS 등에 대한 대처도 가능할 듯)

 

 

 

[링크 : https://serverfault.com/questions/191560/how-can-i-do-traffic-shaping-in-linux-by-ip]

[링크 : https://making.pusher.com/per-ip-rate-limiting-with-iptables/]

 

+

[링크 : http://man7.org/linux/man-pages/man8/tc.8.html]

'Linux' 카테고리의 다른 글

plymouth  (0) 2019.06.14
linux 링크속도 줄이기  (0) 2019.04.25
systemctl restart 시그널  (0) 2019.04.23
ata1 comreset failed (errno=-16)  (0) 2019.04.19
crontab 실행 시간 조절하기  (0) 2019.04.18
Posted by 구차니
Linux2019. 4. 23. 13:29

service나 systemctl 을 통해 restart하는거야..

걍 stop + start 하면 되는데 reload는 어떻게 구현되나 궁금해서 검색중

흐음.. 몇개 찾아보는데 SIGHUP을 보내는건가?

 

ExecReload=
Commands to execute to trigger a configuration reload in the service. This argument takes multiple command lines, following the same scheme as described for ExecStart= above. Use of this setting is optional. Specifier and environment variable substitution is supported here following the same scheme as for ExecStart=.

One additional, special environment variable is set: if known, $MAINPID is set to the main process of the daemon, and may be used for command lines like the following:

/bin/kill -HUP $MAINPID
Note however that reloading a daemon by sending a signal (as with the example line above) is usually not a good choice, because this is an asynchronous operation and hence not suitable to order reloads of multiple services against each other. It is strongly recommended to set ExecReload= to a command that not only triggers a configuration reload of the daemon, but also synchronously waits for it to complete.

ExecStop=
Commands to execute to stop the service started via ExecStart=. This argument takes multiple command lines, following the same scheme as described for ExecStart= above. Use of this setting is optional. After the commands configured in this option are run, it is implied that the service is stopped, and any processes remaining for it are terminated according to the KillMode= setting (see systemd.kill(5)). If this option is not specified, the process is terminated by sending the signal specified in KillSignal= when service stop is requested. Specifier and environment variable substitution is supported (including $MAINPID, see above).

Note that it is usually not sufficient to specify a command for this setting that only asks the service to terminate (for example, by queuing some form of termination signal for it), but does not wait for it to do so. Since the remaining processes of the services are killed according to KillMode= and KillSignal= as described above immediately after the command exited, this may not result in a clean stop. The specified command should hence be a synchronous operation, not an asynchronous one.

Note that the commands specified in ExecStop= are only executed when the service started successfully first. They are not invoked if the service was never started at all, or in case its start-up failed, for example because any of the commands specified in ExecStart=, ExecStartPre= or ExecStartPost= failed (and weren't prefixed with "-", see above) or timed out. Use ExecStopPost= to invoke commands when a service failed to start up correctly and is shut down again. Also note that the stop operation is always performed if the service started successfully, even if the processes in the service terminated on their own or were killed. The stop commands must be prepared to deal with that case. $MAINPID will be unset if systemd knows that the main process exited by the time the stop commands are called.

Service restart requests are implemented as stop operations followed by start operations. This means that ExecStop= and ExecStopPost= are executed during a service restart operation.

It is recommended to use this setting for commands that communicate with the service requesting clean termination. For post-mortem clean-up steps use ExecStopPost= instead.

[링크 : https://www.freedesktop.org/software/systemd/man/systemd.service.html]

[링크 : https://serverfault.com/questions/767360/how-to-configure-systemd-to-kill-and-restart-a-daemon-on-reload]

 

+

$ systemctl cat nginx | grep ExecReload= 
Or by running: 

$ systemctl show nginx.service --property=ExecReload 
On my system, I get: 

ExecReload=/usr/bin/kill -HUP $MAINPID

[링크 : https://superuser.com/questions/710986/how-to-reload-nginx-systemctl-or-nginx-s]

'Linux' 카테고리의 다른 글

linux 링크속도 줄이기  (0) 2019.04.25
ip별 대역폭 제한하기  (0) 2019.04.25
ata1 comreset failed (errno=-16)  (0) 2019.04.19
crontab 실행 시간 조절하기  (0) 2019.04.18
디렉토리내 중복 파일 확인하기  (0) 2019.04.18
Posted by 구차니
Linux2019. 4. 19. 17:36

찾아도 안나오네...

일단 다른 하드를 달아서 해결..

아마도 하드 자체가 망가져서 그런 듯?

 

(검색하다 보니 noapic 이나 ahci 설정 관련으로 인식이 안되는 것도 있었던 듯..)

'Linux' 카테고리의 다른 글

ip별 대역폭 제한하기  (0) 2019.04.25
systemctl restart 시그널  (0) 2019.04.23
crontab 실행 시간 조절하기  (0) 2019.04.18
디렉토리내 중복 파일 확인하기  (0) 2019.04.18
tar 에서 파일 삭제하기  (0) 2019.03.04
Posted by 구차니
Linux2019. 4. 18. 10:48

*/5 로 설정해서 5분 마다 실행하게 했는데

두개를 동시에 해놨더니 공유문제 생겨서 하나는 실행을 못한다고 에러가 잔뜩 쌓였다.

 

그래서 5분 주기로 실행하되, 2분 차이를 두고 해보려니

*은 0-59와 같은 의미이고

 

*/5

3-59/5

이런식으로 두개를 해두면

하나는 정각부터 시작해서 5분 간격

다른 하나는 3분 부터 시작해서 5분 간격으로 된다고 한다.

일단은 걸어놨으니 기다려 봐야 할 듯

[링크 : https://stackoverflow.com/questions/12786410/run-cron-job-every-n-minutes-plus-offset]

'Linux' 카테고리의 다른 글

systemctl restart 시그널  (0) 2019.04.23
ata1 comreset failed (errno=-16)  (0) 2019.04.19
디렉토리내 중복 파일 확인하기  (0) 2019.04.18
tar 에서 파일 삭제하기  (0) 2019.03.04
sparse file 확인하기  (0) 2019.02.25
Posted by 구차니
Linux2019. 4. 18. 10:24

$ sudo yum install fdupes

 

결과 자체는 별건 없고

같은 파일들 끼리 묶어서 출력해준다.

 

[링크 : https://itsfoss.com/find-duplicate-files-linux/]

'Linux' 카테고리의 다른 글

ata1 comreset failed (errno=-16)  (0) 2019.04.19
crontab 실행 시간 조절하기  (0) 2019.04.18
tar 에서 파일 삭제하기  (0) 2019.03.04
sparse file 확인하기  (0) 2019.02.25
cron 실행 및 시간 관련 문제  (0) 2019.02.24
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 구차니
Linux2019. 3. 4. 15:45

설마 없겠냐 했는데 다행히도 있네


$ tar --list --file=collection.tar

blues

folk

jazz

rock

$ tar --delete --file=collection.tar blues

$ tar --list --file=collection.tar

folk

jazz

rock 

[링크 : https://unix.stackexchange.com/questions/68732/remove-files-from-tar-archive]

[링크 : https://www.gnu.org/software/tar/manual/html_node/delete.html]



+

sparse 파일을 건드렸더니

tar: 다음 헤더로 건너 뜀

tar: 아카이브에서 비헤더 부분을 제거함 

이런 에러가 뜨더니 파일을 망가트려버렸다 -_ㅠ

'Linux' 카테고리의 다른 글

crontab 실행 시간 조절하기  (0) 2019.04.18
디렉토리내 중복 파일 확인하기  (0) 2019.04.18
sparse file 확인하기  (0) 2019.02.25
cron 실행 및 시간 관련 문제  (0) 2019.02.24
linux multi core 압축  (0) 2019.02.22
Posted by 구차니