pulseaudio-libs

[vagrant@localhost ~]$ yum list installed | grep pulseaudio-libs
[vagrant@localhost ~]$

うーん、audioの設定??

$ sudo yum install pulseaudio-libs

依存性関連をインストールしました:
  flac.x86_64 0:1.2.1-7.el6_6             libasyncns.x86_64 0:0.8-1.1.el6
  libogg.x86_64 2:1.1.4-2.1.el6           libsndfile.x86_64 0:1.0.20-5.el6
  libvorbis.x86_64 1:1.2.3-5.el6_9.1

完了しました!

サウンド関連モジュールを見てみたい。
[vagrant@localhost ~]$ lsmod | grep snd
snd_intel8x0 30524 0
snd_ac97_codec 125159 1 snd_intel8x0
ac97_bus 1452 1 snd_ac97_codec
snd_seq 61189 0
snd_seq_device 7277 1 snd_seq
snd_pcm 94209 2 snd_intel8x0,snd_ac97_codec
snd_timer 22843 2 snd_seq,snd_pcm
snd 74199 6 snd_intel8x0,snd_ac97_codec,snd_seq,snd_seq_device,snd_pcm,snd_timer
soundcore 7990 1 snd
snd_page_alloc 8856 2 snd_intel8x0,snd_pcm

yum list installed | grep

インストール済みの確認
[vagrant@localhost ~]$ yum list installed | grep alsa-lib
alsa-lib.x86_64 1.1.0-4.el6 @base

alsa-lib: ALSA サウンドインターフェースへのアクセスを必要とする (ALSA ユーティリティ を含む) プログラムが利用する ALSA ライブラリ
http://lfsbookja.osdn.jp/BLFS/svn-ja/multimedia/alsa-lib.html

[vagrant@localhost ~]$ yum list installed | grep giflib
giflib.x86_64 4.1.6-3.1.el6 @base
giflib:The GIFLIB project maintains the giflib service library, which has been pulling images out of GIFs since 1989. It is deployed everywhere you can think of and some places you probably can’t – graphics applications and web browsers on multiple operating systems, game consoles, smartphones, and likely your ATM too
http://giflib.sourceforge.net/

Investigation when cron does not work well

If you are trying to run it regularly using cron, you will only get the execution log in “/var/log/cron.log”.
Therefore, the following is a reference as a method for letting the execution result of the command be outputted to the file.

1. Standard output
When outputting only standard output
/path/script.sh 1 > /path/exec.log

2. Error output
When only error output is issued
/path/script.sh 2 > /path/error.log

3. Standard output and error output part1
When outputting both outputs to one file
/path/script.sh > /path/both.log 2>&1

4. Standard output and error output No.2
When outputting each output to a separate file
/path/script.sh 1 > /path/exec.log 2> /path/error.log

yum clean all

Delete the cache with the yum clean command and check and execute the yum update. The file for caching rpm packages and data used for installing or updating by yum is saved in /var/cache/yum. Can confirm with the “du” command.

[vagrant@localhost tests]$ du -sh /var/cache/yum
179M    /var/cache/yum

/dev/null

/dev/null, also called null device, is one special file in Unix or Unix-type operating system, discards all the data written in it(write system call succeeds). It does not return data to any process (returns EOF)

[vagrant@localhost tests]$ sudo cat /dev/null
[vagrant@localhost tests]$

mkdir -p option

mkdir -p option (–parents option)
If there is no directory without describing an error and create it.

[vagrant@localhost tests]$ ls
index.php test
[vagrant@localhost tests]$ mkdir -p test
[vagrant@localhost tests]$ ls
index.php test
[vagrant@localhost tests]$ mkdir -p test2
[vagrant@localhost tests]$ ls
index.php test test2

iptables vs ip6tables

ip6tables is used to set, manage and check the table of the IPv6 packet filter rules of the Linux kernel. There is a possibility that several different tables are defined. Each table contains a built in chain. It can also contain user-defined chains. Each rule specifies what to do for matched packet. This is called a “target” and sometimes jumps to a user-defined chain in the same table.

# service iptables stop
# service ip6tables stop
# chkconfig iptables off
# chkconfig ip6tables off

/etc/sudoers

“/etc/sudoers” is the configuration file that describe the users that can be changed with the sudo command and the commands that can be executed.

[vagrant@localhost ~]$ sudo cat /etc/sudoers
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at the bottom of the file for collections
## of related commands, which can then be delegated out to particular
## users or groups.
##
## This file must be edited with the 'visudo' command.

## Host Aliases
## Groups of machines. You may prefer to use hostnames (perhaps using
## wildcards for entire domains) or IP addresses instead.
# Host_Alias     FILESERVERS = fs1, fs2
# Host_Alias     MAILSERVERS = smtp, smtp2

## User Aliases
## These aren't often necessary, as you can use regular groups
## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
## rather than USERALIAS
# User_Alias ADMINS = jsmith, mikem


## Command Aliases
## These are groups of related commands...

## Networking
# Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bin/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool

## Installation and management of software
# Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum

## Services
# Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig

## Updating the locate database
# Cmnd_Alias LOCATE = /usr/bin/updatedb

## Storage
# Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount

## Delegating permissions
# Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp

## Processes
# Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall

## Drivers
# Cmnd_Alias DRIVERS = /sbin/modprobe

# Defaults specification

#
# Refuse to run if unable to disable echo on the tty.
#
Defaults   !visiblepw

#
# Preserving HOME has security implications since many programs
# use it when searching for configuration files. Note that HOME
# is already set when the the env_reset option is enabled, so
# this option is only effective for configurations where either
# env_reset is disabled or HOME is present in the env_keep list.
#
Defaults    always_set_home

Defaults    env_reset
Defaults    env_keep =  "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS"
Defaults    env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE"
Defaults    env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES"
Defaults    env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE"
Defaults    env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"

#
# Adding HOME to env_keep may enable a user to run unrestricted
# commands via sudo.
#
# Defaults   env_keep += "HOME"

Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin

## Next comes the main part: which users can run what software on
## which machines (the sudoers file can be shared between multiple
## systems).
## Syntax:
##
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL

## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS

## Allows people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL

## Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL

## Allows members of the users group to mount and unmount the
## cdrom as root
# %users  ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom

## Allows members of the users group to shutdown this system
# %users  localhost=/sbin/shutdown -h now

## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d

おう、なんか凄いことになってるな。Cmndが多いな。

curl -K -L -o ${directory_path} ‘URL’

curl -k
Ignore SSL error and continue processing(-K)
Server-side certificate is invalid, client-side root certificate is invalid, etc.

curl -k http://www.sample.com

curl -L
make redirect(-L)

curl -L http://www.example.com

save the downloaded data as a file

vim.tar.bz2 http://ftp2.jp.vim.org/pub/vim/unix/vim-8.1.tar.bz2

Check the packages installed on Linux

A command to return the package list(yum list installed, rpm -qa)
you can obtain a list of package names you want to search by piping to grep command to search for caracter strings.

[vagrant@localhost ~]$ yum list installed | grep gcc
gcc.x86_64                         4.4.7-23.el6                      @base
gcc-c++.x86_64                     4.4.7-23.el6                      @base
libgcc.x86_64                      4.4.7-23.el6                      @base

うん、インストールされているようだね。
[vagrant@localhost ~]$ yum list installed | grep perl
perl.x86_64 4:5.10.1-144.el6 @base
perl-CPAN.x86_64 1.9402-144.el6 @base
perl-DBD-MySQL.x86_64 4.013-3.el6 @base
perl-DBI.x86_64 1.609-4.el6 @base
perl-Digest-SHA.x86_64 1:5.47-144.el6 @base
perl-Error.noarch 1:0.17015-4.el6 @base
perl-ExtUtils-MakeMaker.x86_64 6.55-144.el6 @base
perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-144.el6 @base
perl-Git.noarch 1.7.1-9.el6_9 @base
perl-Module-Pluggable.x86_64 1:3.90-144.el6 @base
perl-Pod-Escapes.x86_64 1:1.04-144.el6 @base
perl-Pod-Simple.x86_64 1:3.13-144.el6 @base
perl-Test-Harness.x86_64 3.17-144.el6 @base
perl-devel.x86_64 4:5.10.1-144.el6 @base
perl-libs.x86_64 4:5.10.1-144.el6 @base
perl-version.x86_64 3:0.77-144.el6 @base
[vagrant@localhost ~]$ perl -v

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using “man perl” or “perldoc perl”. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.