安装新server

apt-get install mysql-server mysql-client
apt-get install apache2-mpm-worker

apt-get install libapache2-mod-fastcgi php5-fpm php5
a2enmod actions fastcgi alias
===if this file  do not exist, create it. ====
vi /etc/apache2/conf.d/php5-fpm.conf

copy :
       
                AddHandler php5-fcgi .php
                Action php5-fcgi /php5-fcgi
                Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
                FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
       
in it.
cd /tmp
wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.0.0-alpha2/phpMyAdmin-4.0.0-alpha2-all-languages.tar.gz/download#
 tar xvf download
rm download
mv phpMyAdmin-4.0.0-alpha2-all-languages/ /var/www/phpmyadmin

apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-cli php-apc
cd /var/www

wget -O apc.php http://svn.php.net/viewvc/pecl/apc/trunk/apc.php?revision=325483&view=co
vi /etc/php5/conf.d/20-apc.ini
then modify it:
vi /var/www/apc.php
add login and password for this page.

add this :
apc.shm_size=1024
cause the default size is too small.

service php5-fpm restart
service apache2 restart

there is some tutorial for ngnix/apache:
http://www.howtoforge.com/using-php5-fpm-with-apache2-on-ubuntu-12.10


df -h 查看硬盘分配情况
都在home,所以我就简单的在home建了一个spoop的文件夹
然后:
svn co http://svn.addepi.fr/spoop/branches/simplified/ spoop
vi /etc/apache2/sites-available/spoop
把下面的内容copy进去:


DocumentRoot "/home/spoop"
ServerName test.spoop.fr
ServerAlias test.spoop.fr
ServerAdmin webmaster@addepi.fr
CustomLog /home/log/spoop.fr.access.log combined
ErrorLog /home/log/spoop.fr.error.log


        order allow,deny
        allow from all
        DirectoryIndex index.html
        AddHandler php-fpm .php
        Options -Indexes

然后


a2enmod rewrite
service apache2 restart

评论

热门博文