ããŒããã£ã¹ã¯ã®ã¬ã€ã¢ãŠãèšèš
Linuxã€ã³ã¹ããŒã«ã«å¿ èŠãªããŒãã£ã·ã§ã³
-
linuxã€ã³ã¹ããŒã«ã«ã¯å°ãªããšã2ã€å¿ èŠ
-
ã«ãŒãããŒãã£ã·ã§ã³
- ã«ãŒããã¡ã€ã«ã·ã¹ãã
- ã¹ã¯ããé å
-
cat /proc/swaps
Filename Type Size Used Priority
/swapfile file 2097148 0 -2
æ®éãããŒãã£ã·ã§ã³ãåã£ãŠå²ãåœãŠããã£ã¬ã¯ããªçŸ€
- æè»ãªã·ã¹ãã 管ç
-
ãã£ã¹ã¯é害æã®
- 被害ã®äœæž
- ã¹ã ãŒãºãªåŸ©æ§äœæ¥
man 7 hier
ã§åãã£ã¬ã¯ããªã®æå³ãããšãããé²èŠ§ã§ãã
/home
/home On machines with home directories for users,
these are usually beneath this directory,
directly or not. The structure of this direcâ
tory depends on local administration decisions
(optional).
- ãŠãŒã¶å¥ã®ããŒã ãã£ã¬ã¯ããªã眮ããããšã
- ãŠãŒã¶ãŒ
wand
ã®~
ã¯/home/wand/
-
åããŠãããšç°å¢ãåŒãç¶ãã
- ãã£ã¹ããªãã¥ãŒã·ã§ã³ãå€æŽ
- åã€ã³ã¹ããŒã«
/var
/var This directory contains files which may change
in size, such as spool and log files.
- VARiable
-
æŽæ°é »åºŠã®é«ããã¡ã€ã«
- ãã°
- ã¹ããŒã«
-
ã«ãŒããã¡ã€ã«ã·ã¹ãã ã«ãããšãã°ãã®ã¯æçœ
- ãã°ã§ããµãããšãã·ã¹ãã å šäœã«åœ±é¿
/usr
/usr This directory is usually mounted from a sepaâ
rate partition. It should hold only shareable,
read-only data, so that it can be mounted by
various machines running Linux.
-
ç±æ¥ã¯è«žèª¬ãã
- User Services and Routines
- Unix System Routines
- Universal System Resources
-
âIt should hold only shareable, read-only dataâ
- ããã°ã©ã
- ã©ã€ãã©ãª
- ããã¥ã¡ã³ã
-
â~, so that it can be mounted by various machines running Linux.â
- NFS: Network File Systemã䜿ã£ãŠã³ãã³ããããã°ã©ã ãå ±æããããšãæ³å®ãããŠãã
- èªã¿èŸŒã¿å°çšã§ããŠã³ããã
/boot
/boot Contains static files for the boot loader.
This directory holds only the files which are
needed during the boot process. The map inâ
staller and configuration files should go to
/sbin and /etc. The operating system kernel
(initrd for example) must be located in either
/ or /boot.
-
ãã£ã¹ã¯ã®å é æ°100MBçšåºŠãå²ãåœãŠãã»ããããããšããã
- RAID䜿çšæãå
èµããŒããã£ã¹ã¯å
ã«
/boot
ãæã
- RAID䜿çšæãå
èµããŒããã£ã¹ã¯å
ã«
ã¹ã¯ããé å
- ä»®æ³ã¡ã¢ãªé å
-
cat /proc/swaps
ã«ãããš- ä»äœ¿ã£ãŠãããã·ã³ã§ã¯
/swapfile
ãšããååã®ãã -
2GB
- æèŒã¡ã¢ãªã®1-2åããããç®å®ãšããã
cat /proc/meminfo
ããã8GBæèŒãããŠããã ã
- ä»äœ¿ã£ãŠãããã·ã³ã§ã¯
/
- äžèšä»¥å€
- ã«ãŒããã¡ã€ã«ã·ã¹ãã
-
ã§ããã ãå°ãããããã
- é害çºçæã®åŸ©æ§ã®ãã
ããŒãã£ã·ã§ã³ã®ã¬ã€ã¢ãŠãèšèš
-
åæ¡äºé
-
ã·ã¹ãã ã®çšé
- äœäººã§äœ¿ã
- ãªãã®ãµãŒã
- ãã£ã¹ã¯ã®å®¹é
- ããã¯ã¢ããã®æ¹æ³
-
20GBã®ããŒããã£ã¹ã¯ã512MBã¡ã¢ãª
-
åãæ¹
- ã¹ã¯ãã: 512MB
- /: 19GB
- åããã»ã©ãªãããã£ãŠããšããª
200GBã®ããŒããã£ã¹ã¯ã1GBã¡ã¢ãªããŠãŒã¶ãŒ100人ã®ãã¡ã€ã«ãµãŒããŒ
-
åãæ¹
- ã¹ã¯ãã: 1GB
- /boot: 100MB
- /usr: 10GB
- /var: 10GB
- /: 1GB
- /home: æ®ã(圹180GB)
-
èããããš
- ã¹ã¯ãã: ç©çã¡ã¢ãªãšåçšåºŠ
- /boot: å é æ°100MBçšåºŠ
- /: ãªãã¹ãå°ãã
- /home: ãŠãŒã¶ãŒæ°ã®å€ããã¡ã€ã«ãµãŒããŒãªã®ã§äžçªå€ã
100GBã®ããŒããã£ã¹ã¯ã4GBã®ã¡ã¢ãªãWebãµãŒããŒ(Apache)
-
åãæ¹
- ã¹ã¯ãã: 4GB
- /boot: 100MB
- /usr: 10GB
- /var: 20GB
- /var/log: 50GB
- /: 15GB
-
èããããš
- ã¹ã¯ãã: ç©çã¡ã¢ãªãšåçšåºŠ
- /boot: å é æ°çŸMB
- /var/log: ãã°ãã¡ã€ã«ã容éããªãé£ãã®ã§å€ããšã
COLUMN â LVM: Logical Volume Manager(è«çããªã¥ãŒã 管ç)
-
ç©çããªã¥ãŒã ãæããŠä»®æ³ãã£ã¹ã¯ãã€ãã
- ããªã¥ãŒã ã°ã«ãŒã
-
ããªã¥ãŒã ã°ã«ãŒãäžã«ä»®æ³çãªããŒãã£ã·ã§ã³ãåã
- è«çããªã¥ãŒã
ESP: EFI System Partition
- UEFI: Unified Extensible Firmware Interfaceã«æºæ ããã³ã³ãã¥ãŒã¿ã§å¿ èŠãªããŒãã£ã·ã§ã³
-
FAT32ã§ãã©ãŒããããããç©çããŒãã£ã·ã§ã³ã§ããããš
- LVMããœãããŠã§ã¢RAIDã§ã¯ãªã
- UEFIãã¡ãŒã ãŠã§ã¢ã¯ESPã®ãã¡ã€ã«ãèªã¿èŸŒãã§ããŒããè¡ã
/boot/efi
ã«ãã
ããŒãããŒãã®ã€ã³ã¹ããŒã«
- (åºçŸ©ã®)BIOSããåŒã³åºãããã«ãŒãã«ãåŒã³åºã人
-
GRUB: GRand Unified Bootloader ã代衚ç
- å€æ°ã®ãã¡ã€ã«ã·ã¹ãã ãèªèå¯èœ
-
ã·ã§ã«æ©èœæèŒ
- ã³ãã³ãã«ããé«åºŠãªç®¡çãå¯èœ
-
å€ãã®ãšæ°ããã®ããã
- èšå®ãã¡ã€ã«ã®èšå®æ³ãç°ãªã
-
ããŒãã£ã·ã§ã³ã®æ°ãæ¹ãç°ãªã
(hd<ãã£ã¹ã¯çªå·>,<ããŒãã£ã·ã§ã³çªå·>)
GRUB Legacy | GRUB 2 | |
---|---|---|
version | 0.9x | 1.9x |
ãã£ã¹ã¯çªå· | 0ãã | 0ãã |
ããŒãã£ã·ã§ã³çªå· | 0ãã | 1ãã |
GRUBã®ã€ã³ã¹ããŒã«
sudo grub-install /dev/sda
Installing for x86_64-efi platform.
Installation finished. No error reported.
grub-install -V
# ãŸãã¯
# grub-install --version
grub-install (GRUB) 2.02-2ubuntu8.12
- GRUB2ã§ãã
GRUB Legacyã®èšå®
-
/boot/grub/menu.lst
ãŸãã¯/boot/grub/grub.conf
ã§èšå®- æå ã®ubuntuã¯GRUB2ãªã®ã§ããªãã£ã
-
(hd0,0)
ãšãåºãŠãã- äž¡æ¹0å§ãŸã
-
/dev/sda1ã«çžåœ
- aã0, 1ã0ã«å¯Ÿå¿
/boot/grub/device.map
ã§å¯Ÿå¿è¡šãé²èŠ§ã§ããããã
GRUB 2ã®èšå®
cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
- ã觊ããªã
-
èªåçæãã
/etc/default/grub
觊ã-
grub2-mkconfig
ãŸãã¯grub-mkconfig
å©ãupdate-grub
ãšããã®ã
-
/etc/default/grub
GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""
- çæ
sudo grub-mkconfig -o /boot/grub/grub.cfg
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Linux ã€ã¡ãŒãžãèŠã€ããŸãã: /boot/vmlinuz-4.15.0-45-generic
Found initrd image: /boot/initrd.img-4.15.0-45-generic
Linux ã€ã¡ãŒãžãèŠã€ããŸãã: /boot/vmlinuz-4.13.0-46-generic
Found initrd image: /boot/initrd.img-4.13.0-46-generic
Adding boot menu entry for EFI firmware configuration
å®äº
- GRUB2ã§ã¯ããŒãã£ã·ã§ã³ã¯1ããæ°ãããã
ããŒããªãã·ã§ã³ã®èšå®
- ã«ãŒãã«ãã©ã¡ãŒã¿ãšãå¥åãã£ã±ã
- GRUBã®ããŒããªãã·ã§ã³ã®èµ·åã®ä»æ¹ããããããè©Šããªãã£ã
- æžç±çã«ã¯
E
æŒäž - ã·ã³ã°ã«ãŠãŒã¶ãŒã¢ãŒãã§èµ·åããããã°ãã
grub append> ro root=/dev/VolGroup00/LoVol00 rhgb quiet single
- èµ·åæã«æå®ãããã«ãŒãã«ãã©ã¡ãŒã¿èŠã
cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.15.0-45-generic root=UUID=bbddb2bb-7fde-4777-88b4-d762aadc173d ro quiet splash vt.handoff=1
-
root=ããã€ã¹å
(/dev/hda1
ãšã)- ã«ãŒããã¡ã€ã«ã·ã¹ãã ã®æå®
-
init=ããã°ã©ã
- initã®ä»£ããã«å®è¡ãããã€
-
quiet
- ã¡ãã»ãŒãžåºåæå¶
-
debug
- ã¡ãã»ãŒãžåºåãåé·ã«
-
vt.handoff=å€
- ä»®æ³ã¿ãŒããã«ãæå®ããå€ã«åãæ¿ãã
-
s
,single
- ã·ã³ã°ã«ãŠãŒã¶ãŒã¢ãŒãã§èµ·å
-
splash
- ã¹ãã©ãã·ã¥ç»é¢ã衚瀺ãã
-
text
- ããã¹ãã¢ãŒãã§èµ·åãã
-
æ°å
(1-5)- æå®ã®ã©ã³ã¬ãã«ã§èµ·å
-
nousb
- USBããã€ã¹äœ¿çšããªã
å ±æã©ã€ãã©ãªç®¡ç
-
ã©ã€ãã©ãª
- ãã䜿ãããæ©èœããŸãšããåå©çšã§ããããã«ãããã€
-
åé¡
-
éçã©ã€ãã©ãª
- static linkãããã€
-
å ±æã©ã€ãã©ãª
- dynamic linkãããã€
-
ã¹ã¿ãã£ãã¯ãªã³ã¯ãšãã€ãããã¯ãªã³ã¯
- Cèšèªãªã©ã§ã¯ãæŒç®ã»å¶åŸ¡çã®åºæ¬æ©èœä»¥å€ã¯ã©ã€ãã©ãªã䜿ã
-
ãªã³ã¯: ããã°ã©ã æ¬äœããã©ã€ãã©ãªãå©çšã§ããããã«ããããš
-
ã¹ã¿ãã£ãã¯ãªã³ã¯
- ã³ã³ãã€ã«æã«å®è¡ãã¡ã€ã«ã«åã蟌ããã€
- åŒã³åºããããã€: éçã©ã€ãã©ãª
-
ãã€ãããã¯ãªã³ã¯
- åã蟌ãã§ããããå®è¡æã«åŒã³åºããã€
- åŒã³åºããããã€: å ±æã©ã€ãã©ãª
-
lib~.so~
ãšããæãã®åå- so: Shared Object file
libreadline.so.5
ãšã/lib
,/usr/lib
ãšãã«ãã
-
tree -L 1 /usr/lib | grep so
tree -L 1 /usr/lib | grep so
âââ libau.so -> libau.so.2
âââ libau.so.2 -> libau.so.2.10
âââ libau.so.2.10
âââ libgjs.so.0 -> libgjs.so.0.0.0
âââ libgjs.so.0.0.0
âââ libkeybinder.so.0 -> libkeybinder.so.0.1.0
...
å¿ èŠãªå ±æã©ã€ãã©ãªã®ç¢ºèª
-
ldd
ã³ãã³ãã§èª¿ã¹ããã- list dynamic dependencies ã®æå³ããª
ldd
èªèº«ã¯å ±æã©ã€ãã©ãªã䜿ã£ãŠããªãæš¡æ§
ldd /usr/bin/ldd
åçå®è¡ãã¡ã€ã«ã§ã¯ãããŸãã
cat
ãšecho
ã¯åããã®ã䜿ã£ãŠãã¿ãã
/bin/cat:
linux-vdso.so.1 (0x00007ffc209f0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f64ec777000)
/lib64/ld-linux-x86-64.so.2 (0x00007f64ecd71000)
/bin/echo:
linux-vdso.so.1 (0x00007ffdb83be000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc3af11e000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc3af718000)
ld.so
ãªã³ã«ãåçãªã³ã¯ããŠãã*.so
ãæ¢ãå Žæã¯/etc/ld.so.conf
ã§å®çŸ©ãããŠãã/etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
tree /etc/ld.so.conf.d/
/etc/ld.so.conf.d/
âââ fakeroot-x86_64-linux-gnu.conf
âââ libc.conf
âââ x86_64-linux-gnu.conf
- äžèšãã¡ã€ã«çŸ€ã®äžèº«ã¯âŠ
cd /etc/ld.so.conf.d/
cat $(ls /etc/ld.so.conf.d/ | grep .conf)
/usr/lib/x86_64-linux-gnu/libfakeroot
# libc default configuration
/usr/local/lib
# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
- è¿œå ãããå Žåã¯
*.conf
ãã¡ã€ã«ãå¢ãã - ããã°ã©ã ãå®è¡ãããã³ã«äžèšãã¡ã€ã«ãèªãã§
*.so
ãæ€çŽ¢ããŠããïŒâŠåŠ - ãã€ããªã®
ld.so.cache
ãåç §ããã ldconfig
âŠld.so.cache
ã®æŽæ°
sudo ldconfig
-
ç°å¢å€æ°
LD_LIBRARY_PATH
- ä»ã®ãã£ã¬ã¯ããªãæ€çŽ¢å¯Ÿè±¡ã«ããããšãã«è¿œå ãã
ld.so.conf
ãæžã足ãããld.so.conf.d
ã«*.conf
ãè¿œå ãããããæ€çŽ¢ã®åªå 床é«
echo ${LD_LIBRARY_PATH}
- èšå®ãããŠãªãã£ã
- èšå®ãããšãã¯ãããªããã
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/student/mylib
-
åªå 床
LD_LIBRARY_PATH
/etc/ld.so.cache
-
ããã©ã«ãã®ãã¹
/lib
/usr/lib
Debianããã±ãŒãžã®ç®¡ç
-
ããã±ãŒãž
- å®è¡ããã°ã©ã
- èšå®ãã¡ã€ã«
- ããã¥ã¡ã³ã
-
管çã®ä»æ¹ããã£ã¹ããªãã¥ãŒã·ã§ã³ã«ããç°ãªã
-
代衚
-
Debian圢åŒ
- Degian GNU/Linux
-
RPM圢åŒ
- Red Hat Enterprise Linux
-
-
ããã±ãŒãžç®¡çãšã¯
-
ããã±ãŒãžã®ã€ã³ã¹ããŒã«ã»ã¢ã³ã€ã³ã¹ããŒã«ã»ã¢ããããŒãäœæ¥ã容æã«
- ããã±ãŒãžãã©ãã«ã€ã³ã¹ããŒã«ãããŠããã管ç
-
ããã±ãŒãžã®äŸåé¢ä¿ã競åé¢ä¿ãæãªãã€ã³ã¹ããŒã«ãã¢ã³ã€ã³ã¹ããŒã«ã«èŠåãçºãã
-
ããã±ãŒãžã®äŸåé¢ä¿
- ããã±ãŒãžAã®ãã¡ã€ã«ãããã±ãŒãžBã䜿çšãã
-
ããã±ãŒãžéã®ç«¶åé¢ä¿
- ããã±ãŒãžCã«ãã£ãŠã€ã³ã¹ããŒã«ããããã¡ã€ã«Dã
ããã±ãŒãžAã§ãã§ã«ã€ã³ã¹ããŒã«ãããŠãããã¡ã€ã«Dãšç«¶åãã
- ããã±ãŒãžCã«ãã£ãŠã€ã³ã¹ããŒã«ããããã¡ã€ã«Dã
-
- ããã±ãŒãžç®¡ç圢åŒ
Debian圢åŒ(deb圢åŒ) | RPMåœ¢åŒ | |
---|---|---|
ãã£ã¹ã㪠| Debianç³» | Red Hatç³» |
ããã±ãŒãžç®¡çäœæ¥ | ã»dpkgã³ãã³ã ã»APTããŒã« |
ã»rpmã³ãã³ã ã»YUMããŒã« |
-
䞡圢åŒã«äºæã¯ãªã
- alianã³ãã³ãã§çžäºå€æã¯å¯èœ
-
ãã€ããªããã±ãŒãž
- <-> ãœãŒã¹ããã®ã€ã³ã¹ããŒã«
- ã³ã³ãã€ã«æž
-
åäœç°å¢äŸå
- OSã®ãã£ã¹ããªãã¥ãŒã·ã§ã³
- OSã®ããŒãžã§ã³
- CPUã¢ãŒããã¯ãã£
-
ãè泚ããªããžããª
- ããã±ãŒãžãåã£ãŠããå
- ãã¡ã€ã«ã·ã¹ãã äžã®ãã£ã¬ã¯ããªã ã£ãã
- ãããã¯ãŒã¯äžã®ãµãŒããŒã ã£ãã
dpkgã³ãã³ããçšããããã±ãŒãžç®¡ç
-
Debianç³»
- Debian/GNU Linux, Ubuntuãªã©
ããã±ãŒãžãã¡ã€ã«å
tree_1.6.0-1_i386.deb
-
tree
- ããã±ãŒãžå称
-
1.6.0
- ããŒãžã§ã³çªå·
-
-1
- Debianãªããžã§ã³çªå·
-
i386
- CPUã¢ãŒããã¯ãã£
-
.deb
- æ¡åŒµå
ã³ã³ãã£ã°ãã¡ã€ã«/etc/dpkg/dpkg.cfg
- /etc/dpkg/dpkg.cfg
# dpkg configuration file
#
# This file can contain default options for dpkg. All command-line
# options are allowed. Values can be specified by putting them after
# the option, separated by whitespace and/or an `=' sign.
#
# Do not enable debsig-verify by default; since the distribution is not using
# embedded signatures, debsig-verify would reject all packages.
no-debsig
# Log status changes and actions to a file.
log /var/log/dpkg.log
dpkgã³ãã³ã
dpkg --help
䜿ãæ¹: dpkg [<ãªãã·ã§ã³> ...] <ã³ãã³ã>
...
ãŠãŒã¶åãããã±ãŒãžç®¡çããŒã«ã§ãã `apt' ãŸã㯠`aptitude' ã䜿ããŸãããã
- ãªãã·ã§ã³ãšã¢ã¯ã·ã§ã³ããã
äž»èŠãªãªãã·ã§ã³
-E|--skip-same-version åããŒãžã§ã³ãã€ã³ã¹ããŒã«æžã¿ã®ããã±ãŒãžãã¹ããããã
-G|--refuse-downgrade ã€ã³ã¹ããŒã«æžã¿ããã±ãŒãžããå€ãããŒãžã§ã³ã®ããã±ãŒãžãã¹ããããã
-i|--install <.deb file name> ... | -R|--recursive <directory> ...
--unpack <.deb file name> ... | -R|--recursive <directory> ...
-A|--record-avail <.deb file name> ... | -R|--recursive <directory> ...
-
-R
,--recursive
- ãã£ã¬ã¯ããªå
ã®
*.deb
ãã¡ã€ã«ãååž°çã«åŠçãã
- ãã£ã¬ã¯ããªå
ã®
äž»èŠãªã¢ã¯ã·ã§ã³
-i
, --install
-i|--install <.deb file name> ... | -R|--recursive <directory> ...
- ããã±ãŒãžãã€ã³ã¹ããŒã«ãã
-r
, --remove
-r|--remove <package> ... | -a|--pending
- ããã±ãŒãžãã¢ã³ã€ã³ã¹ããŒã«ãã
- èšå®ãã¡ã€ã«ã¯æ®ã
- uninstallãšã¯èšããªã
-P
, --purge
-P|--purge <package> ... | -a|--pending
- ããã±ãŒãžãå®å šã«ã¢ã³ã€ã³ã¹ããŒã«ãã
- èšå®ãã¡ã€ã«ãæ¶ã
-l
, --list
-l|--list [<pattern> ...] List packages concisely.
- ã€ã³ã¹ããŒã«æžããã±ãŒãžãæ€çŽ¢ããŠè¡šç€ºãã
-S
, --search
-S|--search <pattern> ... Find package(s) owning file(s).
- æå®ãããã¡ã€ã«ãã©ã®ããã±ãŒãžããã€ã³ã¹ããŒã«ããããã衚瀺ãã
<pattern>
ã«ã¯ã¯ã€ã«ãã«ãŒã䜿çšå¯
-L
, --listfiles
-L|--listfiles <package> ... List files 'owned' by package(s).
- æå®ããã±ãŒãžããã€ã³ã¹ããŒã«ããããã¡ã€ã«ãäžèŠ§è¡šç€ºãã
-s
, --status
-s|--status <package> ... Display package status details.
- ããã±ãŒãžã®è©³çŽ°ã衚瀺ãã
--configure
--configure <package> ... | -a|--pending
- å±éãããããã±ãŒãžãæ§æãã
--unpack
--unpack <.deb file name> ... | -R|--recursive <directory> ...
- ããã±ãŒãžãå±éãã
- ã€ã³ã¹ããŒã«ã¯ããªã
-C
, --audit
-C|--audit [<package> ...] Check for broken package(s).
- å£ãããã®=ã€ã³ã¹ããŒã«ãäžæããããã®æ¢ã
ã€ãã£ãŠã¿ã
-
ã€ã³ã¹ããŒã«
- debãã¡ã€ã«ã¯èªåã§æ¢ããŠãã
wget http://archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2_2.4.29-1ubuntu4.5_amd64.deb
sudo dpkg --install apache2_2.4.29-1ubuntu4.5_amd64.deb
(ããŒã¿ããŒã¹ãèªã¿èŸŒãã§ããŸã ... çŸåš 177642 åã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªãã€ã³ã¹ããŒã«ãããŠããŸãã)
apache2_2.4.29-1ubuntu4.5_amd64.deb ãå±éããæºåãããŠããŸã ...
apache2 (2.4.29-1ubuntu4.5) 㧠(2.4.29-1ubuntu4.5 ã«) äžæžãå±éããŠããŸã ...
dpkg: äŸåé¢ä¿ã®åé¡ã«ãã apache2 ã®èšå®ãã§ããŸãã:
apache2 ã¯ä»¥äžã«äŸå (depends) ããŸã: apache2-utils (= 2.4.29-1ubuntu4.5) ...ããã:
ããã±ãŒãž apache2-utils ã¯ãŸã ã€ã³ã¹ããŒã«ãããŠããŸããã
apache2 ã¯ä»¥äžã«äŸå (depends) ããŸã: apache2-data (= 2.4.29-1ubuntu4.5) ...ããã:
ããã±ãŒãž apache2-data ã¯ãŸã ã€ã³ã¹ããŒã«ãããŠããŸããã
dpkg: ããã±ãŒãž apache2 ã®åŠçäžã«ãšã©ãŒãçºçããŸãã (--install):
äŸåé¢ä¿ã®åé¡ - èšå®ãèŠéããŸã
systemd (237-3ubuntu10.13) ã®ããªã¬ãåŠçããŠããŸã ...
ureadahead (0.100.0-20) ã®ããªã¬ãåŠçããŠããŸã ...
ufw (0.35-5) ã®ããªã¬ãåŠçããŠããŸã ...
man-db (2.8.3-2ubuntu0.1) ã®ããªã¬ãåŠçããŠããŸã ...
åŠçäžã«ãšã©ãŒãçºçããŸãã:
apache2
- äŸåé¢ä¿ãæºè¶³ã§ããªãã£ã
- 倧å€ãããªã®ã§
apt-get
ã§å ¥ãã - ã€ã³ã¹ããŒã«æžããã±ãŒãžã®æ€çŽ¢ã»è¡šç€º
dpkg -l apache2*
||/ åå ããŒãžã§ã³ ã¢ãŒããã¯ã 説æ
+++-==============-============-============-=================================
ii apache2 2.4.29-1ubun amd64 Apache HTTP Server
un apache2-api-20 <ãªã> <ãªã> (説æ (description) ããããŸãã)
un apache2-api-20 <ãªã> <ãªã> (説æ (description) ããããŸãã)
ii apache2-bin 2.4.29-1ubun amd64 Apache HTTP Server (modules and o
ii apache2-data 2.4.29-1ubun all Apache HTTP Server (common files)
un apache2-doc <ãªã> <ãªã> (説æ (description) ããããŸãã)
un apache2-suexec <ãªã> <ãªã> (説æ (description) ããããŸãã)
un apache2-suexec <ãªã> <ãªã> (説æ (description) ããããŸãã)
ii apache2-utils 2.4.29-1ubun amd64 Apache HTTP Server (utility progr
un apache2.2-bin <ãªã> <ãªã> (説æ (description) ããããŸãã)
un apache2.2-comm <ãªã> <ãªã> (説æ (description) ããããŸãã)
- ããããå Žæã®
apache2
ãã¡ã€ã«ãã©ã®ããã±ãŒãžããã€ã³ã¹ããŒã«ãããã衚瀺
dpkg -S '*/apache2'
apache2, apache2-bin: /var/lib/apache2
apache2, libapache2-mod-dnssd, javascript-common: /etc/apache2
apache2, apache2-data: /usr/share/apache2
apache2: /etc/logrotate.d/apache2
apache2: /var/log/apache2
apache2: /usr/share/bug/apache2
apache2-bin: /usr/sbin/apache2
apache2: /etc/cron.daily/apache2
apache2: /usr/share/doc/apache2
libapache2-mod-dnssd, apache2-bin: /usr/lib/apache2
apache2: /etc/ufw/applications.d/apache2
apache2: /var/cache/apache2
apache2: /usr/share/lintian/overrides/apache2
apache2: /etc/init.d/apache2
- apache2ããã±ãŒãžããã€ã³ã¹ããŒã«ããããã¡ã€ã«ã衚瀺
- ã ãã£ã¯ãã£å€ãã®ã§10åæ°ã ã
dpkg -L apache2 | head -n 10
/.
/etc
/etc/apache2
/etc/apache2/apache2.conf
/etc/apache2/conf-available
/etc/apache2/conf-available/charset.conf
/etc/apache2/conf-available/localized-error-pages.conf
/etc/apache2/conf-available/other-vhosts-access-log.conf
/etc/apache2/conf-available/security.conf
/etc/apache2/conf-available/serve-cgi-bin.conf
- ããã±ãŒãžã®è©³çŽ°æ å ±è¡šç€º
dpkg -s apache2
Package: apache2
Status: install ok installed
Priority: optional
Section: httpd
Installed-Size: 521
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 2.4.29-1ubuntu4.5
Replaces: apache2.2-bin, apache2.2-common
Provides: httpd, httpd-cgi
Depends: lsb-base, procps, perl, mime-support, apache2-bin (= 2.4.29-1ubuntu4.5), apache2-utils (= 2.4.29-1ubuntu4.5), apache2-data (= 2.4.29-1ubuntu4.5), perl:any
Pre-Depends: dpkg (>= 1.17.14)
Recommends: ssl-cert
Suggests: www-browser, apache2-doc, apache2-suexec-pristine | apache2-suexec-custom, ufw
Conflicts: apache2.2-bin, apache2.2-common
Conffiles:
...
- å±éãããããã±ãŒãžã®æ§æ
sudo dpkg --configure apache2
- æžãã§ããã®ã§ãšã©ãŒ
dpkg: ããã±ãŒãž apache2 ã®åŠçäžã«ãšã©ãŒãçºçããŸãã (--configure):
ããã±ãŒãž apache2 ã¯ãã§ã«ã€ã³ã¹ããŒã«ããã³èšå®ãããŠããŸã
åŠçäžã«ãšã©ãŒãçºçããŸãã:
apache2
- apache2ããã±ãŒãžåé€
sudo dpkg --remove apache2
- èšå®ã¯åé€ãããªã
(ããŒã¿ããŒã¹ãèªã¿èŸŒãã§ããŸã ... çŸåš 198646 åã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªãã€ã³ã¹ããŒã«ãããŠããŸãã)
apache2 (2.4.29-1ubuntu4.5) ãåé€ããŠããŸã ...
man-db (2.8.3-2ubuntu0.1) ã®ããªã¬ãåŠçããŠããŸã ...
ufw (0.35-5) ã®ããªã¬ãåŠçããŠããŸã ...
- èšå®å«ãå®å šåé€
sudo dpkg --purge apache2
(ããŒã¿ããŒã¹ãèªã¿èŸŒãã§ããŸã ... çŸåš 198594 åã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªãã€ã³ã¹ããŒã«ãããŠããŸãã)
apache2 (2.4.29-1ubuntu4.5) ã®èšå®ãã¡ã€ã«ãåé€ããŠããŸã ...
systemd (237-3ubuntu10.13) ã®ããªã¬ãåŠçããŠããŸã ...
ureadahead (0.100.0-20) ã®ããªã¬ãåŠçããŠããŸã ...
ufw (0.35-5) ã®ããªã¬ãåŠçããŠããŸã ...
dpkg-reconfigure
-
æ¢ã«ã€ã³ã¹ããŒã«ãããdebããã±ãŒãžã®ç¶æ ãåèšå®
- èšå®ã®åæå
--force
: å£ããŠãããã€ã匷å¶åèšå®
apt-getã³ãã³ã
- APT: Advanced Packaging Tool
-
apt-get
ã³ãã³ã-
ã€ã³ã¿ãŒãããçµç±ã§ææ°ããã±ãŒãžååŸããŠããã
- èªåã§
*.deb
ãwget
ãšãããªããŠãã
- èªåã§
-
äŸå解決ãŸã§ã§ãã
dpkg
ã§apache2ãå ¥ããããšãããäŸåé¢ä¿ãæºè¶³ã§ããŠãããäžæããã
-
-
ã©ãããããã±ãŒãžåã£ãŠããã®
/etc/apt/sources.list
/etc/apt/sources.list.d/*
...
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu artful-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu artful-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu artful-security multiverse
-
deb
- ããã±ãŒãžãååŸ
deb-src
ã®å ŽåããœãŒã¹ãååŸ
-
bionic-security
,artful-security
- ããŒãžã§ã³
-
main restricted
,universe
,multiverse
-
main
- å ¬åŒãµããŒã
-
restricted
- ããã€ã¹çšã®ãããã©ã€ãšã¿ãªãªãã©ã€ã
-
universe
- ã³ãã¥ããã£ã«ãã£ãŠã¡ã³ããã³ã¹ããããœãããŠã§ã¢
-
multiverse
- èäœæš©ãããã¯æ³çãªåé¡ã«ãã£ãŠå¶éããããœãããŠã§ã¢
-
non-free
- å©çšãšæ¹å€åé åžã«å¶éã®ãããœãããŠã§ã¢
-
contrib
- äŸåã«non-freeããã
-
ãè£ãaptã®ãªããžããªç»é²
add-apt-repository
ã³ãã³ãã§ã§ãã- docker-ceãå ¥ããããšãã®äŸ
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
lsb_release -cs
ã¯bionic
ãšããè¿ã
-c, --codename show code name of this distribution
-s, --short show requested information in short format
- å®è¡çµæ
/etc/apt/sources.list
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu artful-security multiverse
+ deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
+ # deb-src [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
äž»ãªãªãã·ã§ã³
-
-c
,--config-file
- èšå®ãã¡ã€ã«æå®
-
ããã©ã«ã
/etc/apt/sources.list
ããã©ã«ãèšå®ãã¡ã€ã«ãèªãã§ããããã®èšå®ãã¡ã€ã«ãèªã¿ãŸãã
-
-y
,--yes
,--assume-yes
- å šéšyesãé察話çã«å®è¡
-
-d
,--download-only
- installãšãšãã«
- ããŠã³ããŒãã®ã¿
-
-s
,--simulate
- ã·ã¹ãã ãå€æŽããåäœãã·ãã¥ã¬ãŒããã
-
no-install-reommends
- å¿ é ã§ãªããæšå¥šãããã±ãŒãžãã€ã³ã¹ããŒã«ããªã
-
install-suggests
- ãææ¡ãããã±ãŒãžãã€ã³ã¹ããŒã«ãã
-
--reinstall
- ãã§ã«ææ°çãã€ã³ã¹ããŒã«ãããŠããŠãåã€ã³ã¹ããŒã«
äž»ãªãµãã³ãã³ã
clean
clean
clean ã¯ãååŸããããã±ãŒãžã®ããŒã«ã«ãªããžããªãæé€ããŸ
ãã/var/cache/apt/archives/ ãš
/var/cache/apt/archives/partial/ ããããã¯ãã¡ã€ã«ä»¥å€ãã¹
ãŠåé€ããŸãã
- ããŠã³ããŒãããã¢ãŒã«ã€ããã¡ã€ã«ãåé€ãã
ls /var/cache/apt/archives/
firefox-locale-en_66.0.3+build1-0ubuntu0.18.04.1_amd64.deb
firefox-locale-ja_66.0.3+build1-0ubuntu0.18.04.1_amd64.deb
firefox_66.0.3+build1-0ubuntu0.18.04.1_amd64.deb
sudo apt-get clean
- lockãã¡ã€ã«ä»¥å€æ¶ãã
lock partial
dist-upgrade
dist-upgrade - ãã£ã¹ããªãã¥ãŒã·ã§ã³ãã¢ããã°ã¬ãŒããã (apt-get(8) ãåç
§)
sudo apt-get dist-upgrade
ããã±ãŒãžãªã¹ããèªã¿èŸŒãã§ããŸã... å®äº
äŸåé¢ä¿ããªãŒãäœæããŠããŸã
ç¶æ
æ
å ±ãèªã¿åã£ãŠããŸã... å®äº
ã¢ããã°ã¬ãŒãããã±ãŒãžãæ€åºããŠããŸã... å®äº
ã¢ããã°ã¬ãŒã: 0 åãæ°èŠã€ã³ã¹ããŒã«: 0 åãåé€: 0 åãä¿ç: 0 åã
install
install - æ°èŠããã±ãŒãžãã€ã³ã¹ããŒã«ãã (pkg 㯠libc6.deb ã§ã¯ãªã libc6 ã®ããã«æå®ãã)
- ããã±ãŒãžãã€ã³ã¹ããŒã«ãŸãã¯ã¢ããã°ã¬ãŒããã
sudo apt-get install apache2
remove
remove
remove ã¯ãããã±ãŒãžãåé€ãããããšãé€ããinstall ãšåæ§
ã§ããåé€ãããããã±ãŒãžã®èšå®ãã¡ã€ã«ã¯ãã·ã¹ãã ã«æ®ã£ã
ãŸãŸã«ãªãããšã«æ³šæããŠãã ããããã©ã¹èšå·ãããã±ãŒãžåã«
(éã«ç©ºçœãå«ãŸãã«) ä»å ããããšãèå¥ãããããã±ãŒãž
ããåé€ã§ã¯ãªãã€ã³ã¹ããŒã«ããŸãã
- èšå®ã¯æ¶ããªã
sudo apt-get remove apache2
purge
purge
ããã±ãŒãžãåé€ãã€å®å
šåé€ (ãã¹ãŠã®èšå®ãã¡ã€ã«ãåé€) ã
ããã®ãé€ããpurge 㯠remove ãšåãã§ãã
apt-get remove --purge
ãšããªã
sudo apt-get purge apache2
ããã±ãŒãžãªã¹ããèªã¿èŸŒãã§ããŸã... å®äº
äŸåé¢ä¿ããªãŒãäœæããŠããŸã
ç¶æ
æ
å ±ãèªã¿åã£ãŠããŸã... å®äº
以äžã®ããã±ãŒãžãèªåã§ã€ã³ã¹ããŒã«ãããŸããããããå¿
èŠãšãããŠããŸãã:
apache2-data apache2-utils
ãããåé€ããã«ã¯ 'sudo apt autoremove' ãå©çšããŠãã ããã
以äžã®ããã±ãŒãžã¯ãåé€ããããŸã:
apache2*
ã¢ããã°ã¬ãŒã: 0 åãæ°èŠã€ã³ã¹ããŒã«: 0 åãåé€: 1 åãä¿ç: 0 åã
ãã®æäœåŸã«è¿œå 㧠0 B ã®ãã£ã¹ã¯å®¹éãæ¶è²»ãããŸãã
ç¶è¡ããŸãã? [Y/n] y
(ããŒã¿ããŒã¹ãèªã¿èŸŒãã§ããŸã ... çŸåš 177909 åã®ãã¡ã€ã«ãšãã£ã¬ã¯ããªãã€ã³ã¹ããŒã«ãããŠããŸãã)
apache2 (2.4.29-1ubuntu4.5) ã®èšå®ãã¡ã€ã«ãåé€ããŠããŸã ...
ufw (0.35-5) ã®ããªã¬ãåŠçããŠããŸã ...
ureadahead (0.100.0-20) ã®ããªã¬ãåŠçããŠããŸã ...
systemd (237-3ubuntu10.13) ã®ããªã¬ãåŠçããŠããŸã ...
update
update (apt-get(8))
update ã¯ãèšå®ããããã¹ãŠã®ååŸå
ããããã±ãŒãžæ
å ±ãããŠ
ã³ããŒãããããã«äœ¿çšãããŸããã»ãã®ã³ãã³ãã¯ããã®ããŒã¿
ãæäœããŸããäŸãã°ãããã±ãŒãžã®ã¢ããã°ã¬ãŒããå®è¡ãã
ããäžãæ€çŽ¢ããããã€ã³ã¹ããŒã«å¯èœãªãã¹ãŠã®ããã±ãŒãžã«é¢
ãã詳现æ
å ±ã衚瀺ããŸãã
sudo apt-get update
...
ååŸ:22 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [12.2 kB]
ååŸ:23 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [50.4 kB]
ååŸ:24 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
ååŸ:25 http://security.ubuntu.com/ubuntu bionic-security/multiverse DEP-11 48x48 Icons [29 B]
4,802 kB ã 2ç§ ã§ååŸããŸãã (2,021 kB/s)
ããã±ãŒãžãªã¹ããèªã¿èŸŒãã§ããŸã... å®äº
upgrade
upgrade (apt-get(8))
upgrade ã¯ãsources.list(5) ã§èšå®ãããååŸå
ããã·ã¹ãã ã«
çŸåšã€ã³ã¹ããŒã«æžã¿ã®ãã¹ãŠã®ããã±ãŒãžã§å©çšå¯èœãªã¢ããã°
ã¬ãŒããã€ã³ã¹ããŒã«ããããã«äœ¿çšãããŸããäŸåé¢ä¿ãæºãã
ããã«å¿
èŠãªå Žåã¯æ°ããããã±ãŒãžãã€ã³ã¹ããŒã«ãããŸã
ããæ¢åã®ããã±ãŒãžãåé€ãããããšã¯ãããŸãããããã±ãŒãž
ã®ã¢ããã°ã¬ãŒãã«ã€ã³ã¹ããŒã«æžã¿ããã±ãŒãžã®åé€ãå¿
èŠãªå Ž
åããã®ããã±ãŒãžã®ã¢ããã°ã¬ãŒãã¯è¡ãããŸããã
sudo apt-get upgrade
full-upgrade
- ã·ã¹ãã ã®ã¡ãžã£ãŒããŒãžã§ã³ãææ°ã«ã¢ããã°ã¬ãŒããã
dist-upgrade
ãšåãã£ãœãæ°ããã
autoremove
autoremove (ããã³ auto-remove 1.1 以éã®å¥å)
autoremove ã¯ãä»ã®ããã±ãŒãžã®äŸåé¢ä¿ãæºããããã«èªåç
ã«ã€ã³ã¹ããŒã«ãããããå¿
èŠãªããªã£ãããã±ãŒãžãåé€ããã®
ã«äœ¿çšããŸãã
apt-cacheã³ãã³ã
apt-cache --help
apt-cache ã¯ã€ã³ã¹ããŒã«æžã¿ãšã€ã³ã¹ããŒã«å¯èœãªããã±ãŒãžã®æ
å ±ã
åãåãããŠè¡šç€ºããŸããäŸãã° apt-get ã®ãæŽæ°ãã³ãã³ãã«ãã£ãŠ
ããŒã«ã«ãã£ãã·ã¥ã«ååŸãããããŒã¿ãšæä»çã«åäœããŸãããããã£ãŠã
æåŸã®æŽæ°ãå€ãããå Žåã«ã¯ã衚瀺ãããæ
å ±ã¯æ代é
ããããããŸããã
ããããåŒãæãã«ãapt-cache ã¯èšå®ããããœãŒã¹ã®å¯çšæ§ãšã¯ç¬ç«ããŠ
åäœããŸã (äŸãã°ãªãã©ã€ã³)ã
-
ããã±ãŒãžæ å ±ãç §äŒã»æ€çŽ¢
- æªã€ã³ã¹ããŒã«ã§ããã
äž»ãªãµãã³ãã³ã
search
search - æ£èŠè¡šçŸãã¿ãŒã³ã«ãã£ãŠããã±ãŒãžäžèŠ§ãæ€çŽ¢ãã
apt-cache search apache2 | head -n 5
apache2 - Apache HTTP ãµãŒã
apache2-bin - Apache HTTP Server (modules and other binary files)
apache2-data - Apache HTTP Server (common files)
apache2-dbg - Apache debugging symbols
apache2-dev - Apache HTTP Server (development headers)
show
show - ããã±ãŒãžã®æ
å ±ã衚瀺ãã
- äžè¬çãªæ å ±ã衚瀺
apt-cache show apache2 | head -n 20
Package: apache2
Architecture: amd64
Version: 2.4.29-1ubuntu4.5
Priority: optional
Section: web
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 521
Provides: httpd, httpd-cgi
Pre-Depends: dpkg (>= 1.17.14)
Depends: lsb-base, procps, perl, mime-support, apache2-bin (= 2.4.29-1ubuntu4.5), apache2-utils (= 2.4.29-1ubuntu4.5), apache2-data (= 2.4.29-1ubuntu4.5), perl:any
Recommends: ssl-cert
Suggests: www-browser, apache2-doc, apache2-suexec-pristine | apache2-suexec-custom, ufw
Conflicts: apache2.2-bin, apache2.2-common
Replaces: apache2.2-bin, apache2.2-common
Filename: pool/main/a/apache2/apache2_2.4.29-1ubuntu4.5_amd64.deb
Size: 95088
MD5sum: b736ff3435904190fc43ee7d676f97ae
showpkg
- 詳现ãªæ å ±ãåŸã
apt-cache showpkg apache2
Package: apache2
Versions:
2.4.29-1ubuntu4.5 (/var/lib/apt/lists/jp.archive.ubuntu.com_ubuntu_dists_bionic-updates_main_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/jp.archive.ubuntu.com_ubuntu_dists_bionic_main_binary-amd64_Packages
MD5: d02426bc360345e5acd45367716dc35c
Description Language:
File: /var/lib/apt/lists/jp.archive.ubuntu.com_ubuntu_dists_bionic_main_binary-i386_Packages
MD5: d02426bc360345e5acd45367716dc35c
Description Language: ja
File: /var/lib/apt/lists/jp.archive.ubuntu.com_ubuntu_dists_bionic_main_i18n_Translation-ja
MD5: d02426bc360345e5acd45367716dc35c
Description Language: en
File: /var/lib/apt/lists/jp.archive.ubuntu.com_ubuntu_dists_bionic_main_i18n_Translation-en
MD5: d02426bc360345e5acd45367716dc35c
Description Language:
File: /var/lib/apt/lists/jp.archive.ubuntu.com_ubuntu_dists_bionic-updates_main_binary-amd64_Packages
MD5: d02426bc360345e5acd45367716dc35c
Description Language:
File: /var/lib/apt/lists/jp.archive.ubuntu.com_ubuntu_dists_bionic-updates_main_binary-i386_Packages
MD5: d02426bc360345e5acd45367716dc35c
Description Language:
File: /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_main_binary-amd64_Packages
MD5: d02426bc360345e5acd45367716dc35c
Description Language:
File: /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_bionic-security_main_binary-i386_Packages
MD5: d02426bc360345e5acd45367716dc35c
...
depends
depends - ããã±ãŒãžã®çã®äŸåæ
å ±ã衚瀺ãã
apt-cache depends apache2
apache2
å
è¡äŸå: dpkg
dpkg:i386
äŸå: lsb-base
äŸå: procps
procps:i386
äŸå: perl
äŸå: mime-support
äŸå: apache2-bin
äŸå: apache2-utils
apache2-utils:i386
äŸå: apache2-data
äŸå: <perl:any>
perl:i386
perl
競å: <apache2.2-bin>
競å: <apache2.2-common>
æšå¥š: ssl-cert
ææ¡: <www-browser>
dillo
edbrowse
hv3
lynx:i386
lynx
chromium-browser
elinks
epiphany-browser
falkon
firefox
konqueror
links
links:i386
links2
links2:i386
netrik
sugar-browse-activity
surf
w3m:i386
w3m
xemacs21-mule
xemacs21-mule-canna-wnn
xemacs21-nomule
ææ¡: apache2-doc
|ææ¡: apache2-suexec-pristine
ææ¡: apache2-suexec-custom
ææ¡: ufw
眮æ: <apache2.2-bin>
眮æ: <apache2.2-common>
aptitudeã³ãã³ã
-
apt-getãããé«æ©èœ
- ãšããããæ£èŠè¡šçŸã匷ã
-
apt-getãšapt-cacheã®æ©èœããã€
- 䜿ãæ¹ã¯åã
- LPIC ver5.0ã§ã©ã£ããã£ã
apt
- apt-getã®åŸçº
-
ãapt-getã®èšèšäžã®ãã¹ãå æããŠãããããã
-
apt-cache
ãšãdpkg
ãšã䜿ãåããªããšãããªãã®ãã€ãã-
(äŸ) ããã±ãŒãžæ å ±ã®è¡šç€ºã«äžèšãããããå©ããªããšãããªã
dpkg -s ããã±ãŒãžå
apt-cache show ããã±ãŒãžå
-
-
-
äž»ãªãªãã·ã§ã³
apt-get
ãšåããã®äœ¿ãã- manãapt-get(8)ããªãã¡ã¬ã³ã¹ãããŠã
-
äž»ãªãµãã³ãã³ã
- ã ããã
apt-get
ãšapt-cache
ãšããªã -
list
apt-get
ã«ãapt-cache
ã«ããªããã€
- ã ããã
- ã·ã§ã«ã£ãœããã€äžèŠ§
apt list *sh
Listing... Done
bash/now 4.4.18-2ubuntu1 amd64 [installed,local]
dash/now 0.5.8-2.10 amd64 [installed,local]
- ã€ã³ã¹ããŒã«æžã®ãã€
apt list --installed
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Listing...
adduser/now 3.116ubuntu1 all [installed,local]
apt/now 1.6.8 amd64 [installed,local]
base-files/now 10.1ubuntu2.4 amd64 [installed,local]
base-passwd/now 3.5.44 amd64 [installed,local]
bash/now 4.4.18-2ubuntu1 amd64 [installed,local]
bsdutils/now 1:2.31.1-0.4ubuntu3.3 amd64 [installed,local]
bzip2/now 1.0.6-8.1 amd64 [installed,local]
coreutils/now 8.28-1ubuntu1 amd64 [installed,local]
dash/now 0.5.8-2.10 amd64 [installed,local]
...
- upgradeã§ãããã€äžèŠ§
apt list --upgradable
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
äžèŠ§è¡šç€º...
apport/bionic-updates,bionic-updates 2.20.9-0ubuntu7.6 all [2.20.9-0ubuntu7.5 ããã¢ããã°ã¬ãŒãå¯]
apport-gtk/bionic-updates,bionic-updates 2.20.9-0ubuntu7.6 all [2.20.9-0ubuntu7.5 ããã¢ããã°ã¬ãŒãå¯]
apt/bionic-updates 1.6.10 amd64 [1.6.8 ããã¢ããã°ã¬ãŒãå¯]
apt-transport-https/bionic-updates,bionic-updates 1.6.10 all [1.6.8 ããã¢ããã°ã¬ãŒãå¯]
apt-utils/bionic-updates 1.6.10 amd64 [1.6.8 ããã¢ããã°ã¬ãŒãå¯]
console-setup/bionic-updates,bionic-updates 1.178ubuntu2.8 all [1.178ubuntu2.7 ããã¢ããã°ã¬ãŒãå¯]
console-setup-linux/bionic-updates,bionic-updates 1.178ubuntu2.8 all [1.178ubuntu2.7 ããã¢ããã°ã¬ãŒãå¯]
containerd.io/bionic 1.2.5-1 amd64 [1.2.2-3 ããã¢ããã°ã¬ãŒãå¯]
cups/bionic-updates 2.2.7-1ubuntu2.4 amd64 [2.2.7-1ubuntu2.3 ããã¢ããã°ã¬ãŒãå¯]
äž»ãªãµãã³ãã³ãã®æ¯èŒ
apt-get | apt-cache | apt | 察å¿ããdpkg | |
---|---|---|---|---|
update | o | o | - | |
upgrade | o | o | ||
install | o | o | ||
remove | o | o | -r, âremove | |
purge | o | o | -P, âpurge | |
dist-upgrade | o | o | ||
full-upgrade | o | o | ||
show | o | o | ||
showpkg | o | |||
list | o | -l, âlist | ||
search | o | o | ||
depends | o | o | ||
autoremove | o | o |
RPMããã±ãŒãžã®ç®¡ç
- Red Hat Enterprise Linux
- Fedora
- CentOS
- openSUSE
- SUSE Linux Enterprise
RPMããã±ãŒãž
- äŸ
bash-4.2.46-30.el7.x86_64.rpm
<ããã±ãŒãžå称>-<ããŒãžã§ã³çªå·>-<ãªãªãŒã¹çªå·>.<ã¢ãŒããã¯ãã£>.<æ¡åŒµå>
- ããã±ãŒãžå称
- ããŒãžã§ã³çªå·
- ãªãªãŒã¹çªå·
- ã¢ãŒããã¯ãã£
- æ¡åŒµå
rpm
ã³ãã³ãã®å©çš
-
ããã€ãã®ã¢ãŒãããã
dpkg
ã®ã¢ã¯ã·ã§ã³çãª
ã€ã³ã¹ããŒã«/ã¢ããã°ã¬ãŒãã¢ãŒã
-
äžèšã䜵çšããã®ãäžè¬ç
-
-v
(verbose)- 詳现衚瀺
-
-h
,--hash
#
(hash)ã§é²æ衚瀺
-
-
-i
,--install
- ããã±ãŒãžãã€ã³ã¹ããŒã«
-
-F
,--freshen
-
ããã±ãŒãžãã€ã³ã¹ããŒã«ãããŠããã°ã¢ããã°ã¬ãŒã
- çŽç²ãªã¢ããã°ã¬ãŒã
-
-
-U
,--upgrade
- ããã±ãŒãžãã€ã³ã¹ããŒã«ãããŠããã°ã¢ããã°ã¬ãŒã
- ãªããã°ã€ã³ã¹ããŒã«
ã¢ã³ã€ã³ã¹ããŒã«ã¢ãŒã
-
-e
,--erase
- ããã±ãŒãžãã¢ã³ã€ã³ã¹ããŒã«
ç §äŒã¢ãŒã
-
-q
- æå®ããããã±ãŒãžãã€ã³ã¹ããŒã«ãããŠãããç §äŒ
-
ãªãã·ã§ã³
-
-a
,--a
- ã€ã³ã¹ããŒã«æžå šããã±ãŒãžè¡šç€º
-
-i
,--info
- æ å ±è¡šç€º
-
-f
,--file
- ãã¡ã€ã«->ããã±ãŒãž
-
-l
,--list
- ããã±ãŒãž->ãã¡ã€ã«çŸ€
-
-p
- ããã±ãŒãžãã¡ã€ã«åã§ããã±ãŒãžæå®
-
-R
,--requires
- äŸåé¢ä¿èª¿ã¹ã
-
--changelog
- å€æŽå±¥æŽèŠã
-
- bashãšåã®ã€ãããã±ãŒãžæ¢ã
rpm -qa | grep bash
bash-4.2.46-31.el7.x86_64
- bashããã±ãŒãžã®æ å ±ååŸ
rpm -qi bash
Name : bash
Version : 4.2.46
Release : 31.el7
Architecture: x86_64
Install Date: Tue Mar 5 17:34:45 2019
Group : System Environment/Shells
Size : 3667773
License : GPLv3+
Signature : RSA/SHA256, Mon Nov 12 14:21:49 2018, Key ID 24c6a8a7f4a80eb5
Source RPM : bash-4.2.46-31.el7.src.rpm
Build Date : Tue Oct 30 17:09:33 2018
Build Host : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org>
Vendor : CentOS
URL : http://www.gnu.org/software/bash
Summary : The GNU Bourne Again shell
Description :
The GNU Bourne Again shell (Bash) is a shell or command language
interpreter that is compatible with the Bourne shell (sh). Bash
incorporates useful features from the Korn shell (ksh) and the C shell
(csh). Most sh scripts can be run by bash without modification.
- bashã®ãã€ããªãã©ã®ããã±ãŒãžãã¡ã€ã«ããå ¥ã£ããååŸ
rpm -qf $(which bash)
bash-4.2.46-31.el7.x86_64
-
bashããã±ãŒãžã«ããã€ã³ã¹ããŒã«ããããã¡ã€ã«äžèŠ§ãåŸãããã¯ãã®ã³ãã³ã
- rpmãã¡ã€ã«èŠã€ããã
rpm -qlp bash-4.2.46-31.el7.x86_64.rpm
- äŸå調æ»
rpm -qR bash
/bin/sh
config(bash) = 4.2.46-31.el7
libc.so.6()(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.15)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.8)(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libtinfo.so.5()(64bit)
rpmlib(BuiltinLuaScripts) <= 4.2.2-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)
rpmlib(PayloadIsXz) <= 5.2-1
ããã±ãŒãžã®çœ²å確èª
-
-K
,--checksig
- RPMããã±ãŒãžã®é»å眲åã®æ€èšŒ
ããã±ãŒãžã®å±é
-
rpm2cpio
ã³ãã³ã- RPMããã±ãŒãžãã€ã³ã¹ããŒã«ãããå 容ãå±é
cpio
ã³ãã³ãã«ãã€ãã§æµã蟌ã
YUM
- dpkgã«å¯ŸããAPTããŒã«ã¿ãããª
- rpmã«å¯ŸããYUM: Yellow dog Updater, Modified
-
èšå®ãã¡ã€ã«
/etc/yum.conf
ãã¡ã€ã«/etc/yum.repos.d/
以äžãã¡ã€ã«
/etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
override_install_langs=en_US.utf8
tsflags=nodocs
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
ls /etc/yum.repos.d/
CentOS-Base.repo CentOS-Media.repo CentOS-fasttrack.repo
CentOS-CR.repo CentOS-Sources.repo
CentOS-Debuginfo.repo CentOS-Vault.repo
cat /etc/yum.repos.d/CentOS-Base.repo
- ãªããžããªæ å ±ãæ ŒçŽãããŠãã
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
ã¢ããããŒã
-
apt
ãšç°ãªããupdate
ã¯ããã±ãŒãžã®ã¢ããããŒããæå³ãã- cf.
apt
ã®update
ã¯ããã±ãŒãžååŸå ããŒã¿ããŒã¹ã®æŽæ°
- cf.
-
check-update
ãµãã³ãã³ã- ã¢ããããŒãããã±ãŒãžãååšããããã±ãŒãžãäžèŠ§
-
update [package]
ãµãã³ãã³ã- æå®ã®ããã±ãŒãžã®ã¢ããããŒãå®æœ
package
çç¥æãå šããã±ãŒãžã®ã¢ããããŒãå®æœ
ã€ã³ã¹ããŒã«ãšã¢ã³ã€ã³ã¹ããŒã«
-
install
ãµãã³ãã³ã- ã€ã³ã¹ããŒã«
-
remove
- ã¢ã³ã€ã³ã¹ããŒã«
ããã±ãŒãžæ å ±ã®ç¢ºèª
info
ãµãã³ãã³ã
yum info bash
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Installed Packages
Name : bash
Arch : x86_64
Version : 4.2.46
Release : 31.el7
Size : 3.5 M
Repo : installed
From repo : CentOS
Summary : The GNU Bourne Again shell
URL : http://www.gnu.org/software/bash
License : GPLv3+
Description : The GNU Bourne Again shell (Bash) is a shell or command language
: interpreter that is compatible with the Bourne shell (sh). Bash
: incorporates useful features from the Korn shell (ksh) and the C
: shell (csh). Most sh scripts can be run by bash without
: modification.
-
list
ãµãã³ãã³ã- ãªããžããªã«ãããã¹ãŠã®ããã±ãŒãžæ å ±ãšãã€ã³ã¹ããŒã«ãããŠããã確èª
yum list | grep bash
bash.x86_64 4.2.46-31.el7 @CentOS
bash-completion.noarch 1:2.1-6.el7 base
bash-doc.x86_64 4.2.46-31.el7 base
libguestfs-bash-completion.noarch 1:1.38.2-12.el7_6.2 updates
libvirt-bash-completion.x86_64 4.5.0-10.el7_6.6 updates
pcp-pmda-bash.x86_64 4.1.0-5.el7_6 updates
-
ããã±ãŒãžæå®
- å®å šäžèŽ
yum list bash
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Installed Packages
bash.x86_64 4.2.46-31.el7 @CentOS
-
search
ãµãã³ãã³ã- ããŒã¯ãŒãæ€çŽ¢(éšåäžèŽ)
yum search bash
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
============================== N/S matched: bash ===============================
bash-completion.noarch : Programmable completion for Bash
bash-doc.x86_64 : Documentation files for bash
libguestfs-bash-completion.noarch : Bash tab-completion scripts for libguestfs
: tools
libvirt-bash-completion.x86_64 : Bash completion script
pcp-pmda-bash.x86_64 : Performance Co-Pilot (PCP) metrics for the Bash shell
bash.x86_64 : The GNU Bourne Again shell
Name and summary matches only, use "search all" for everything.
ããã±ãŒãžã°ã«ãŒãåäœã®ã€ã³ã¹ããŒã«
- RPMããã±ãŒãžã¯ãããã€ãã®ããã±ãŒãžã°ã«ãŒãã«åé¡ã§ãã
yum groups list
Loaded plugins: fastestmirror, ovl
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Available Environment Groups:
Minimal Install
Compute Node
Infrastructure Server
File and Print Server
Basic Web Server
Virtualization Host
Server with GUI
GNOME Desktop
KDE Plasma Workspaces
Development and Creative Workstation
Available Groups:
Compatibility Libraries
Console Internet Tools
Development Tools
Graphical Administration Tools
Legacy UNIX Compatibility
Scientific Support
Security Tools
Smart Card Support
System Administration Tools
System Management
Done
- ãããšãããã°ã«ãŒãã
GNOME Desktop
- ã°ã«ãŒãã€ã³ã¹ããŒã«
yum groups install "GNOME Desktop"
dnf
ã³ãã³ã
- åºæ¬çã«
yum
ãšã»ãŒåã
Zypperã䜿ã£ãããã±ãŒãžç®¡ç
- openSUSEã§ã¯
zypper
ã³ãã³ãã§ããã±ãŒãžç®¡ç
ä»®æ³åã®ã²ã¹ãOSãšããŠã®Linux
ã¯ã©ãŠããµãŒãã¹ãšã€ã³ã¹ã¿ã³ã¹
-
ã€ã³ã¹ã¿ã³ã¹
- ã¯ã©ãŠããµãŒãã¹äžã®ä»®æ³çãªLinuxãã·ã³
- ç©ççãªãµãŒãã«Linuxãã€ã³ã¹ããŒã«ããŠå©çšããããšã¯æžã£ãŠããŠãã
- çŽ æ©ãã€ã³ãã©ãæŽãããã
-
ãªãœãŒã¹ã®æ¡åŒµã容æ
- CPU
- ã¡ã¢ãª
- ã¹ãã¬ãŒãž
-
XaaS
- ã¯ã©ãŠããµãŒãã¹ã®æ§æèŠçŽ ã«ããåé¡
IaaS | PaaS | SaaS | |
---|---|---|---|
ã¢ããªã±ãŒã·ã§ã³ | o | ||
ããã«ãŠã§ã¢(éçºç°å¢ãã©ã³ã¿ã€ã ãšã) | o | o | |
OS | o | o | o |
H/W | o | o | o |
ãããã¯ãŒã¯ | o | o | o |
-
ãªã³ãã¬ãã¹
- ã¯ã©ãŠããããªããã€
- 瀟å ãããŒã¿ã»ã³ã¿ã«ç©çãµãŒããé 眮ããŠéçšãã
-
OSã€ã¡ãŒãž
- IaaSäžã®ã€ã³ã¹ã¿ã³ã¹ã®ãã³ãã¬ãŒã
- ç©çãã·ã³ãžã®Linuxã€ã³ã¹ããŒã«ã¯æéãããã(ååäœ)
- ã€ã³ã¹ã¿ã³ã¹ã®çæã¯ããã®ãããã§éã(æ°10ç§ãšã)
-
çšèª
-
ãããã¯ã¹ãã¬ãŒãž
- ä»®æ³çãªãã£ã¹ã¯ã¹ãã¬ãŒãž
- 容éè¿œå ã容æ
-
ã²ã¹ãOS
- ä»®æ³ãã·ã³ã«ã€ã³ã¹ããŒã«ãããOS
-
OSã€ã¡ãŒãž
- ã€ã³ã¹ã¿ã³ã¹ã®ãã³ãã¬ãŒããšãªããã£ã¹ã¯ã€ã¡ãŒãž
-
ã€ã³ã¹ã¿ã³ã¹
- ã¯ã©ãŠãäžã§åäœããåã ã®ä»®æ³ãã·ã³
-
ã³ã³ãã
- ç¬ç«ããOSã®ããã«æ±ããã¢ããªã±ãŒã·ã§ã³å®è¡ç°å¢
- ä»®æ³ãã·ã³ãããæ¶è²»ãªãœãŒã¹ãå°ãã軜é
-
ã¢ãã©ã€ã¢ã³ã¹ã³ã³ãã
-
ç¹å®çšéåãã«ãªã«ãçµã¿èŸŒãŸããã³ã³ãã
- WebãµãŒããŒ
- DBãµãŒããŒ
-
-
ã²ã¹ããã©ã€ã
- ä»®æ³ãã·ã³ããã¹ããã·ã³äžã®ããã€ã¹ã«ã¢ã¯ã»ã¹ããéãªã©ã«äœ¿çš
- ä»®æ³ãã·ã³ã«ã€ã³ã¹ããŒã«ãã
-
ã€ã³ã¹ã¿ã³ã¹ã®åæå
-
Cloud-init
-
ã€ã³ã¹ã¿ã³ã¹ããšã«ç°ãªãå€ãèšå®ããã®ã«äœ¿ã
- ãã¹ãå
- SSHéµ
- äžè¬ãŠãŒã¶ãŒ
- ã€ã³ã¹ããŒã«ããããã±ãŒãž
- ããããªããšOSã€ã¡ãŒãžããè€è£œããã€ã³ã¹ã¿ã³ã¹ã¯ãã¹ãŠåäžã«ãªã£ãŠããŸã
-
-
D-Busãã·ã³ID
- ã€ã³ã¹ã¿ã³ã¹ã®èå¥å
cat /etc/machine-id
2277c4be5b694b...