[centos][zend-server][sakuravps]ããµã¯ã©ã®VPSã980åãã«Zend-Serverãå ¥ãã¦ã¿ããã®ã¾ã¨ã
/etc/skel/
ã¦ã¼ã¶ã追å ããæã«ãã¡ãã¡ãã£ã¬ã¯ããªãä½ãã®ãããã©ãããã®ã§ãããããä½ã£ã¦ãã
mkdir /etc/skel/.ssh/ touch /etc/skel/.ssh/authorized_keys chmod 700 /etc/skel/.ssh/ touch 600 /etc/skel/.ssh/authorized_keys
ã¦ã¼ã¶ã¼è¿½å
ã¦ã¼ã¶ã¼æ¯ã«groupä½ãã®ã¯æã£ãç¡ãã®ã§usersã«çµ±ä¸
å¿
ãå
¬ééµãç»é²ãç»é²ããäº
useradd -g users makoto
vi ~makoto/.ssh/authorized_keys
vi /etc/fstab
LABEL=/ã®defaultã®å¾ãã®noatimeãä»ãã
atime(ã¢ã¯ã»ã¹æé)ãè¨é²ãããªããªãã®ã§è¥å¹²IOè² è·ãæ¸ã(ããã)
LABEL=/ / ext3 defaults,noatime 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 LABEL=SWAP-vda3 swap swap defaults 0 0
vi /etc/sysconfig/i18n
ä»æUTF-8ã§ããããviçã§æ¥æ¬èªãå«ããã¡ã¤ã«ãèªãã æã«æååãããªããªãã¾ãã
#LANG="C" LANG="ja_JP.UTF-8" SYSFONT="latarcyrheb-sun16"
sshdã®è¨å®
IPåºå®ã§ããªãã®ã§PKIã®ã¿ã«ããã
rootã§ç´æ¥ãã°ã¤ã³ãç¦æ¢ããããã¹ã¯ã¼ãèªè¨¼ãç¦æ¢ãã
echo 'OPTIONS="-o PermitRootLogin=no -o PasswordAuthentication=no"' >> /etc/sysconfig/sshd
IPv6é¢ä¿ãåæ¢â¦ãããã¨æã£ãããã¾ãåããªãã®ã§ã¨ãããããã®ã¾ã¾
Xvfbãå©ç¨ããå ´åãIPv6ã¯æå¹ã«ãã¨ããã»ããè¯ãã¿ããã
zend-serverãIPv6ãç¡å¹ã«ããã¨lighttpdãlistenãã¦ãããªãã
vi /etc/sysconfig/network
HOSTNAMEãæ¸ãæãã
vi /etc/hosts
hostsã«èªåã®IPã¨ãã¹ããæ¸ã足ãã¦ãã
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 59.106.***.*** www www.example.jp
cat > /etc/sysconfig/iptables
**filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT DROP [0:0] ###################################################################### # ã«ã¼ãããã¯/ICMP/確ç«æ¸ã¿ã®æ¥ç¶(é常ã¯å¤æ´ä¸è¦) -A INPUT -i lo -j ACCEPT -A OUTPUT -o lo -j ACCEPT -A INPUT -p icmp -j ACCEPT -A OUTPUT -p icmp -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT #-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT ###################################################################### # ååã®å®ç¾© (é常ã¯å¤æ´ä¸è¦) # NTP #-N accept_ntp #-A accept_ntp -p udp --dport ntp -j ACCEPT # FTP #-N accept_ftp #-A accept_ftp -p tcp --dport ftp-data -j ACCEPT #-A accept_ftp -p tcp --dport ftp -j ACCEPT # SSH -N accept_ssh -A accept_ssh -p tcp --dport ssh -j ACCEPT ###################################################################### # OUTPUT #-A OUTPUT -p tcp --dport ftp-data -j ACCEPT #-A OUTPUT -p tcp --dport ftp -j ACCEPT -A OUTPUT -p tcp --dport ssh -j ACCEPT -A OUTPUT -p tcp --dport smtp -j ACCEPT -A OUTPUT -p tcp --dport domain -j ACCEPT -A OUTPUT -p udp --dport domain -j ACCEPT -A OUTPUT -p tcp --dport http -j ACCEPT -A OUTPUT -p udp --dport ntp -j ACCEPT -A OUTPUT -p tcp --dport https -j ACCEPT #-A OUTPUT -p tcp --dport smtps -j ACCEPT #-A OUTPUT -p tcp --dport pop3s -j ACCEPT #-A OUTPUT -p tcp --dport svn -j ACCEPT #-A OUTPUT -p tcp --dport rsync -j ACCEPT #-A OUTPUT -p tcp --dport X11 -j ACCEPT ###################################################################### # å ¬éãã¼ã (å¿ è¦ãªãã®ãæå¹ã«ãã) -A INPUT -p tcp --dport ssh -j ACCEPT #-A INPUT -p tcp --dport smtp -j ACCEPT #-A INPUT -p tcp --dport domain -j ACCEPT #-A INPUT -p udp --dport domain -j ACCEPT -A INPUT -p tcp --dport http -j ACCEPT #-A INPUT -p tcp --dport pop3 -j ACCEPT #-A INPUT -p tcp --dport https -j ACCEPT #-A INPUT -p tcp --dport smtps -j ACCEPT #-A INPUT -p tcp --dport pop3s -j ACCEPT #-A INPUT -p tcp --dport svn -j ACCEPT #-A INPUT -p tcp --dport submission -j ACCEPT ###################################################################### # éå®æ¥ç¶ - ãµã¼ã(nis,ntp,ftp,ssh,nfs,postgres,oracle) # æ¥ç¶å ã®ã¯ã©ã¤ã¢ã³ãã®ä¸è¦§ -A INPUT -p tcp --dport 10082 -j ACCEPT ###################################################################### # éå®æ¥ç¶ - ã¯ã©ã¤ã¢ã³ã(nis,nfs,postgres,oracle) # æ¥ç¶å ã®ãµã¼ãã®ä¸è¦§ ###################################################################### # ãã®ä»è¨å®ãããã°è¿½å ãã COMMIT
cat > /etc/yum.repos.d/zend.repo
[ZendServer] name=Zend Server $releasever - $basearch baseurl=http://repos.zend.com/zend-server/rpm/$basearch/ enabled=1 gpgcheck=0 [Zendce-noarch] name=Zend CE - noarch baseurl=http://repos.zend.com/zend-server/rpm/noarch enabled=1 gpgcheck=0
epelã¨remiã¬ãã¸ããª
åã®æ¥è¨ã§ã¯rpmforgeãå ¥ãã¦ã¾ãããããã ãã§OK
wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm rpm -hiv epel-release-5-4.noarch.rpm remi-release-5.rpm
mysql-serverã¨memcachedã®install
yum --enablerepo=remi,epel install mysql-server memcached chkconfig mysqld on chkconfig memcached on service mysqld start service memcached start /usr/bin/mysql_secure_installation
zend-server-ceã®install
ãã¼ããã·ã§ã³å¤æ´ããªãã¨ç®¡çç»é¢ãããã°ãè¦ããªã
apacheã®è¨å®ãããã¼ãã®ã§ä¿®æ£ãã(ä»å¾ã®èª²é¡)
yum install zend-server-ce-php-5.3 php-5.3-extra-extensions-zend-server-ce chmod 755 /var/log/httpd
â»/usr/local/zend/doc/READMEãã¿ã
https://$IP:10082/ã«ã¢ã¯ã»ã¹ãã¦ãã¹ã¯ã¼ããè¨å®
sessionãmemcachedã«ä¿åããããã«ãã
管çç»é¢ã§ä»¥ä¸ãå¤æ´å¾ãªã¹ã¿ã¼ããã¿ã³ãã¯ãªãã¯
session.save_handler=memcache session.save_path="tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
ãã®ä»
åèµ·åå¾ãªãã¼ã
yum update reboot
memo
zend-serverã¤ã³ã¹ãã¼ã«æã«ä¸ç·ã«å ¥ãrpm
================================================================================ Package Arch Version Repository Size ================================================================================ Installing: php-5.3-extra-extensions-zend-server-ce noarch 4.0-37 Zendce-noarch 2.5 k zend-server-ce-php-5.3 noarch 5.0-45 Zendce-noarch 9.3 k Installing for dependencies: freetds x86_64 0.82-1 ZendServer 1.5 M help-zend-server-ce noarch 5.0.5-7 Zendce-noarch 5.2 M httpd x86_64 2.2.3-43.el5.centos.3 updates 1.2 M libframework1-zend-server noarch 1.10.7-37 Zendce-noarch 3.6 M liboci8-zend x86_64 11.2.0.1-1 ZendServer 16 M libtool-ltdl x86_64 1.5.22-7.el5_4 base 38 k lighttpd-zend-server x86_64 1.4.26-6 ZendServer 2.4 M mod-php-5.3-apache2-zend-server x86_64 5.3.3-35 ZendServer 2.8 M php-5.3-bcmath-zend-server x86_64 5.3.3-4 ZendServer 17 k php-5.3-bz2-zend-server x86_64 5.3.3-4 ZendServer 38 k php-5.3-calendar-zend-server x86_64 5.3.3-4 ZendServer 15 k php-5.3-common-extensions-zend-server-ce noarch 4.0-41 Zendce-noarch 3.1 k php-5.3-ctype-zend-server x86_64 5.3.3-4 ZendServer 6.6 k php-5.3-curl-zend-server x86_64 5.3.3-9 ZendServer 185 k php-5.3-data-cache-zend-server x86_64 4.0.56-4 ZendServer 635 k php-5.3-debugger-zend-server x86_64 5.3.19-5 ZendServer 611 k php-5.3-dev-zend-server x86_64 5.3.3-13 ZendServer 3.7 M php-5.3-exif-zend-server x86_64 5.3.3-4 ZendServer 26 k php-5.3-extension-manager-zend-server x86_64 5.1.81-3 ZendServer 639 k php-5.3-fcgi-zend-server x86_64 5.3.3-18 ZendServer 3.4 M php-5.3-fileinfo-zend-server x86_64 5.3.3-4 ZendServer 180 k php-5.3-ftp-zend-server x86_64 5.3.3-4 ZendServer 22 k php-5.3-gd-zend-server x86_64 5.3.3-6 ZendServer 436 k php-5.3-gettext-zend-server x86_64 5.3.3-4 ZendServer 7.0 k php-5.3-gmp-zend-server x86_64 5.3.3-4 ZendServer 19 k php-5.3-gui-zend-server noarch 5.0.134-37 Zendce-noarch 1.6 M php-5.3-imagick-zend-server x86_64 5.3.3-10 ZendServer 4.7 M php-5.3-imap-zend-server x86_64 5.3.3-4 ZendServer 2.5 M php-5.3-intl-zend-server x86_64 5.3.3-5 ZendServer 5.7 M php-5.3-json-zend-server x86_64 5.3.3-4 ZendServer 15 k php-5.3-ldap-zend-server x86_64 5.3.3-10 ZendServer 543 k php-5.3-mbstring-zend-server x86_64 5.3.3-4 ZendServer 1.2 M php-5.3-mcrypt-zend-server x86_64 5.3.3-4 ZendServer 95 k php-5.3-memcache-zend-server x86_64 5.3.3-4 ZendServer 28 k php-5.3-mssql-zend-server x86_64 5.3.3-4 ZendServer 21 k php-5.3-mysql-zend-server x86_64 5.3.3-8 ZendServer 22 k php-5.3-mysqli-zend-server x86_64 5.3.3-7 ZendServer 48 k php-5.3-oci8-zend-server x86_64 5.3.3-7 ZendServer 70 k php-5.3-odbc-zend-server x86_64 5.3.3-4 ZendServer 200 k php-5.3-optimizer-plus-zend-server x86_64 4.1.8-9 ZendServer 110 k php-5.3-pcntl-zend-server x86_64 5.3.3-4 ZendServer 13 k php-5.3-pdo-dblib-zend-server x86_64 5.3.3-4 ZendServer 9.7 k php-5.3-pdo-mysql-zend-server x86_64 5.3.3-8 ZendServer 427 k php-5.3-pdo-oci-zend-server x86_64 5.3.3-15 ZendServer 15 k php-5.3-pdo-odbc-zend-server x86_64 5.3.3-4 ZendServer 14 k php-5.3-pdo-pgsql-zend-server x86_64 5.3.3-4 ZendServer 157 k php-5.3-pgsql-zend-server x86_64 5.3.3-4 ZendServer 45 k php-5.3-phar-zend-server x86_64 5.3.3-4 ZendServer 108 k php-5.3-posix-zend-server x86_64 5.3.3-4 ZendServer 12 k php-5.3-shmop-zend-server x86_64 5.3.3-4 ZendServer 7.3 k php-5.3-soap-zend-server x86_64 5.3.3-4 ZendServer 131 k php-5.3-sockets-zend-server x86_64 5.3.3-4 ZendServer 19 k php-5.3-sqlite-zend-server x86_64 5.3.3-4 ZendServer 170 k php-5.3-sysvmsg-zend-server x86_64 5.3.3-4 ZendServer 9.1 k php-5.3-sysvsem-zend-server x86_64 5.3.3-4 ZendServer 6.7 k php-5.3-sysvshm-zend-server x86_64 5.3.3-4 ZendServer 7.7 k php-5.3-tidy-zend-server x86_64 5.3.3-4 ZendServer 145 k php-5.3-tokenizer-zend-server x86_64 5.3.3-4 ZendServer 9.0 k php-5.3-unix-extensions-zend-server noarch 4.0-25 Zendce-noarch 2.1 k php-5.3-uploadprogress-zend-server x86_64 5.3.3-4 ZendServer 8.4 k php-5.3-wddx-zend-server x86_64 5.3.3-4 ZendServer 17 k php-5.3-xmlreader-zend-server x86_64 5.3.3-4 ZendServer 545 k php-5.3-xmlrpc-zend-server x86_64 5.3.3-4 ZendServer 41 k php-5.3-xmlwriter-zend-server x86_64 5.3.3-4 ZendServer 559 k php-5.3-xsl-zend-server x86_64 5.3.3-5 ZendServer 131 k php-5.3-zend-extensions-ce noarch 4.0-27 Zendce-noarch 2.0 k php-5.3-zendutils-zend-server x86_64 1.0.62-4 ZendServer 608 k php-5.3-zip-zend-server x86_64 5.3.3-4 ZendServer 38 k unixODBC x86_64 2.2.11-7.1 base 835 k zend-base x86_64 5.0-29 ZendServer 1.1 M zend-server-doc noarch 5.0.6-11 Zendce-noarch 56 k zend-server-framework noarch 1.10.8-11 Zendce-noarch 4.9 M Transaction Summary ================================================================================ Install 74 Package(s) Upgrade 0 Package(s)