投稿

gem install pg -v '0.18.4' error!!

# gem install pg -v '0.18.4' Fetching: pg-0.18.4.gem (100%) Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /usr/local/bin/ruby -r ./siteconf20160426-20109-1ck7isn.rb extconf.rb checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/$(RUBY_BASE_NAME) --with-pg --without-pg --enable-windows-cross

extundelete

先日、centos6の開発サーバー上で作業をしていた際に、あるファイルを消してしまい、焦った。グーグル先生に問い合わせると、「extundelete」 というファイル復活コマンドがあることを教えてくれた。 使い方 1.ドライブを調べる # df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 50G 1.6G 46G 4% / tmpfs 939M 0 939M 0% /dev/shm /dev/vda1 477M 36M 416M 8% /boot /dev/mapper/VolGroup-lv_home 144G 60M 136G 1% /home 2.復活するファイルを指定してextundeleteコマンドを実行 # extundelete --restore-file /tmp/ore.rpm /dev/mapper/VolGroup-lv_root NOTICE: Extended attributes are not restored. WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set. The partition should be unmounted to undelete any files without further data loss. If the partition is not currently mounted, this message indicates it was improperly unmounted, and you should run fsck before continuing. If you decide to continue, extundelete may overwrite some of the deleted files and make recovering those files impossible. You should unmount the file system and check it with

[kvm]ゲストOSのディスク拡張

ゲストOSのディスク拡張するよ! -ホスト側 ゲストOSを停止 cd /var/lib/libvirt/images/ qemu-img info orecentos6-1.qcow2 qemu-img resize orecentos6-1.qcow2 +500G qemu-img info orecentos6-1.qcow2 ゲストOSを起動 -ゲストOS側 ゲストOSでfdiskでパーティションを拡張 fdisk -l fdisk /dev/vda Command (m for help): p Disk /dev/vda: 1106.0 GB, 1105954078720 bytes 16 heads, 63 sectors/track, 2142923 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000c8ed1 Device Boot Start End Blocks Id System /dev/vda1 * 3 1018 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/vda2 1018 1102669 555232152 83 Linux Command (m for help): d Partition number (1-4): 2 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (1-2142923, default 1): 1018 Last cylinder, +c

yum install webmin (CentOS6)

1)webmin repository making $ vi /etc/yum.repos.d/webmin.repo [Webmin] name=Webmin Distribution Neutral #baseurl=http://download.webmin.com/download/yum mirrorlist=http://download.webmin.com/download/yum/mirrorlist enabled=1 2)gpg-key install $ wget http://www.webmin.com/jcameron-key.asc $ rpm --import jcameron-key.asc 3)yum install webmin $ yum -y install webmin 4)F/W setting $ vi /etc/sysconfig/iptables # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT $ /etc/init.d/iptables restart C

いまさらAdobeMediaServer

いまさら、AdobeMediaServerのテストを行うために、サンプルを設定する。 Apacheは入っているので、Apacheは入れない設定で、インストール。 1)httpdの設定 $ vi /etc/httpd/conf.d/dstreaming.conf LoadModule f4fhttp_module modules/mod_f4fhttp.so #LoadModule jithttp_module modules/mod_jithttp.so <location /vod> HttpStreamingEnabled true HttpStreamingContentPath "/opt/adobe/ams/webroot/vod" </Location> <location /hds-vod> HttpStreamingEnabled true HttpStreamingContentPath "/opt/adobe/ams/webroot/hds-vod" </Location> 2)モジュールファイルの配置 $ cp /usr/local/src/AMS_5_0_3_r3029/Apache2.2/modules/mod_f4fhttp.so /etc/httpd/modules/ $ cp /usr/local/src/AMS_5_0_3_r3029/Apache2.2/modules/libhds.so /etc/httpd/modules/ $ cp /usr/local/src/AMS_5_0_3_r3029/Apache2.2/modules/libadbe_license.so /etc/httpd/modules/ $ cp /usr/local/src/AMS_5_0_3_r3029/Apache2.2/modules/libadbe_dme.so /etc/httpd/modules/ $ cp /usr/local/src/AMS_5_0_3_r3029/Apache2.2/modules/libcrypto.so.1.0.0 /etc/httpd/modules/ $ cp /usr/local/src/AMS_5_0_3_r

?alt_idアクセスをブロックする

/?alt_id=[random]のアクセスが多いので、ブロックする。 RewriteEngine On #alt_id block start RewriteCond %{THE_REQUEST} \s/+[^?]*\?alt_id= [NC] RewriteRule ^ - [F,L] RewriteCond %{THE_REQUEST} \s/+[^?]*\?alt_id=[^&]+&alt_ts= [NC] RewriteRule ^ - [F,L] #alt_id block end RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

OSXYosemite

イメージ
OSX Yosemiteにアップデートしてみることにした。 アップデート完了。 ちょっとベンチマーク

ドメインサーチ

https://www.makko.biz/whois/?q=bg.bahaiquotesillustrated.info