# pear upgrade pear

WARNING: “pear/Console_Getopt” is deprecated in favor of “pear/Console_GetoptPlus”
downloading PEAR-1.10.1.tgz …
Starting to download PEAR-1.10.1.tgz (296,139 bytes)
…………………………………………………….done: 296,139 bytes
could not extract the package.xml file from “/tmp/pear/download/PEAR-1.10.1.tgz”
Download of “pear/pear” succeeded, but it is not a valid package archive
Error: cannot download “pear/PEAR”

・・・

 

PHPを更新していたので、以下のように。

# cp /usr/local/php-5.6.12/lib/php/Archive/Tar.php /usr/share/pear/Archive/Tar.php

参考:

http://phpobenkyo.seesaa.net/article/410455059.html

http://www.gentei.org/~yuuji/rec/pc/memo/2014/08/30/

以下のサイトを参考にした。

http://d.hatena.ne.jp/ozuma/20120424/1335265500

 

configureで以下の指定を追加する事

yum install mod_ssl

 

vi /etc/httpd/conf/httpd.conf

LoadModule ssl_module modules/mod_ssl.so

 

vi /etc/httpd/conf.d/ssl.conf

##
## SSL Virtual Host Context
##

NameVirtualHost *:443
Listen 443

<VirtualHost *:443>

# General setup for the virtual host, inherited from global configuration
DocumentRoot “/var/www/html”
ServerName dev.furoom.net

# Use separate log files for the SSL virtual host; note that LogLevel
# is not inherited from httpd.conf.
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn

# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on

# SSL Protocol support:
# List the enable protocol levels with which clients will be able to
# connect. Disable SSLv2 access by default:
SSLProtocol all -SSLv2

# SSL Cipher Suite:
# List the ciphers that the client is permitted to negotiate.
# See the mod_ssl documentation for a complete list.
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW

# Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate. If
# the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that a kill -HUP will prompt again. A new
# certificate can be generated using the genkey(1) command.
#SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateFile /etc/pki/CA/certs/dev.furoom.net-ca.crt

# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you’ve both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
#SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
SSLCertificateKeyFile /etc/pki/CA/private/dev.furoom.net.key
</VirtualHost>

–update t_datanum set reg_dt = now() where reg_dt < now() – interval ‘1 hour’;
update
t_datanum
set
— reg_dt = (case when reg_dt < now() – interval ‘1 hour’ then date_trunc(‘hour’, now()) else reg_dt end),
reg_dt = (case when reg_dt < now() – interval ‘1 hour’ then now() else reg_dt end),
count = (case when reg_dt < now() – interval ‘1 hour’ then 0 else count + 1 end)
;

–update t_datanum set count = count + 1 where reg_dt >= now() – interval ‘1 hour’;
select * from t_datanum ;

yum install unzip

cd /usr/local/src/
curl “https://s3.amazonaws.com/aws-cli/awscli-bundle.zip” -o “awscli-bundle.zip”
unzip awscli-bundle.zip
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
/usr/local/bin/aws –version

/usr/local/bin/aws configure
/usr/local/bin/aws deploy register –instance-name centos7 –iam-user-arn arn:aws:iam::1234567890:user/deploy–tags Key=deploy,Value=true –region ap-northeast-1

mkdir -p /etc/codedeploy-agent/conf
vi /etc/codedeploy-agent/conf/codedeploy.onpremises.yml

/usr/local/bin/aws deploy install –override-config –config-file /etc/codedeploy-agent/conf/codedeploy.onpremises.yml –region ap-northeast-1

 

Only Ubuntu Server, Red Hat Enterprise Linux Server and Windows Server operating systems are supported.

 

centos7 もamazon linuxも

★slave のconf設定

vi /etc/redis/6379.conf

slaveof redis-master.nilesflow.net 6379

 

★redis-sentinel

wget http://download.redis.io/releases/redis-3.0.7.tar.gz

153 tar xvzf redis-3.0.7.tar.gz
154 cd redis-3.0.7
155 yum install -y gcc tcl
156 make
157 make install
158 mkdir /etc/redis
159 cp sentinel.conf /etc/redis/.
160 vi /etc/redis/sentinel.conf
161 rm /etc/redis/sentinel.conf
162 vi /etc/redis/sentinel.conf

 

163 vi /etc/hosts
167 redis-server /etc/redis/sentinel.conf –sentinel

177 cp sentinel.conf sentinel01.conf
178 vi sentinel01.conf
179 cp sentinel01.conf sentinel02.conf
180 cp sentinel01.conf sentinel03.conf
181 vi sentinel02.conf
182 vi sentinel03.conf
184 redis-server /etc/redis/sentinel01.conf –sentinel &
185 redis-server /etc/redis/sentinel02.conf –sentinel &
187 redis-server /etc/redis/sentinel03.conf –sentinel &

 

★materを落としてみる

standby→master

 

 

改めて

yum install gcc

make distclean

# 以下が残る

make

make install

 

http://redis.io/topics/quickstart

[root@ip-172-31-20-29 redis-3.0.7]# mkdir /etc/redis
[root@ip-172-31-20-29 redis-3.0.7]# mkdir /var/redis

[root@ip-172-31-20-29 redis-3.0.7]# mkdir /var/redis/6379
[root@ip-172-31-20-29 redis-3.0.7]# cp utils/redis_init_script /etc/init.d/redis_6379
[root@ip-172-31-20-29 redis-3.0.7]# cp redis.conf /etc/redis/6379.conf
[root@ip-172-31-20-29 redis-3.0.7]# vi /etc/redis/6379.conf

  • Set daemonize to yes (by default it is set to no).
  • Set the pidfile to /var/run/redis_6379.pid (modify the port if needed).
  • Change the port accordingly. In our example it is not needed as the default port is already 6379.
  • Set your preferred loglevel.
  • Set the logfile to /var/log/redis_6379.log
  • Set the dir to /var/redis/6379 (very important step!

[root@ip-172-31-20-29 redis-3.0.7]# /etc/init.d/redis_6379 start

 

★自動起動

# chkconfig: – 85 15
# description: redis-server
# processname: redis

chkconfig redis_6379 on