@zigen 's note
さくらVPSにnginx+php-fpmでWordpress
最終更新:
mynote
1.cat /proc/cpuinfo | grep "model name" か cat /proc/cpuinfo |grep processor で
CPU数の確認。
2.yum -y upgrade
3.yum -y install yum-fastestmirror
4.yum -y update
5.yum -y install nkf
6.rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
7.rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
8.rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
9.yum -y install nginx php-cli php-fpm php-mbstring php-devel php-pear
php-cii php-common sqlite-devel --enablerepo=remi
コレで一応nginxとphp-fpmは入るけどnginx.confの設定しないと
2.yum install -y vsftpdで
FTPを入れる。「ftpusers, user_list, vsftpd.conf」はいつもの通りftpusersとuser_listのrootをコメントアウト。
3.
さくら共有サーバーでpear+bot
dirパーミッション:755 bot.phpパーミッション:755
<?php //インスタンスを生成(OAuth認証) require_once '/home/hogehoge/pear/bin/Services/Twitter.php'; require_once '/home/hogehoge/pear/bin/HTTP/OAuth/Consumer.php'; $twitter = new Services_Twitter(); $oauth = new HTTP_OAuth_Consumer('Consumer key', 'Consumer secret', 'Access token', 'Access token secret'); $twitter->setOAuth($oauth); $twitter->statuses->update(array('status'=>"$fp[$line]")); ?>
実行は cd /home/hoge/www/EasyBotter/ ; /usr/local/bin/php -d include_path='.:/home/hoge/pear/bin' /home/hoge/www/EasyBotter/bot1.php
<?php $fp = fopen("index2.html", "r"); while(!feof($fp)){ $buffer = fgets($fp); $buffer = strip_tags($buffer); $buffer = ereg_replace("(\t)", "", $buffer); $buffer = ereg_replace("(^\r|^\n|^\r\n)", "", $buffer); print($buffer); } ?>
これで
diff -w text.txt text2.txt
をすればOK