Chinaunix首页 | 论坛 | 博客
  • 博客访问: 109882
  • 博文数量: 25
  • 博客积分: 1094
  • 博客等级: 少尉
  • 技术积分: 284
  • 用 户 组: 普通用户
  • 注册时间: 2009-05-25 16:36
文章分类

全部博文(25)

文章存档

2011年(14)

2010年(11)

分类: LINUX

2010-03-09 16:26:21

wget

yum install ntp
ntpdate time.nist.gov

yum -y install make openssl openssl-devel pcre pcre-devel libpng libpng-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel

zlib zlib-devel gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake

libtool-ltdl libtool-ltdl-devel

groupadd www
useradd -g www www

./configure --prefix=/usr/local/nginx --with-http_gzip_static_module --user=nginx --group=nginx --with-http_stub_status_module --with-

http_realip_module --without-select_module --without-poll_module --http-log-path=/var/log/nginx/access_log --error-log-

path=/var/log/nginx/error_log --pid-path=/var/run/nginx

make && make install

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

 

server {
listen 80;
#listen somename:8080;
server_name ;

location / {
root   /var/www/ ;
index  index.html index.htm index.php;
}

location ~ \.php$ {
fastcgi_pass    127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www//$fastcgi_script_name;
include fastcgi_params;
}
}
=========================================================================================================
yum -y install mysql-server mysql-devel php-mysql

/etc/init.d/mysqld restart

mysqladmin -u root -p password 123456 把数据库密码修改成123456

chkconfig --add mysqld
chkconfig --level 345 mysqld on
chkconfig --list mysqld

========================================================================================================

./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/etc --with-mysql=/usr --enable-mbstring --enable-ftp --with-gd --

with-jpeg-dir=/usr --with-png-dir=/usr --enable-magic-quotes --with-pear --enable-sockets --with-ttf --with-freetype-dir=/usr --enable-gd-

native-ttf --with-zlib --enable-sysvsem --enable-sysvshm --with-libxml-dir=/usr --enable-force-cgi-redirect --enable-fastcgi --with-

mcrypt=/usr

make && make install

cp php.ini-dist /usr/local/php5/etc/php.ini

cp spawn-fcgi /usr/local/php5/bin

chmod 755 /usr/local/php5/bin/spawn-fcgi

/usr/local/php5/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 8 -u www -f /usr/local/php5/bin/php-cgi

****************************
* vim /usr/bin/php-fastcgi *
****************************

#!/bin/sh
/usr/local/php5/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 8 -u www -f /usr/local/php5/bin/php-cgi

**********************************************************************************************

chmod 755 /usr/bin/php-fastcgi

*******************************
* vim /etc/init.d/php-fastcgi *
*******************************

#!/bin/bash
PHP_SCRIPT=/usr/bin/php-fastcgi
RETVAL=0
case AVG"$1" in
     AVGstart)
       $PHP_SCRIPT
       RETVAL=$?
;;
     AVGstop)
       killall -9 php-cgi
       RETVAL=$?
;;
     AVGrestart)
       killall -9 php-cgi
       $PHP_SCRIPT
       RETVAL=$?
;;
     AVG)
       $PHP_SCRIPT
       RETVAL=$?
;;
     *)
       echo "Usage: php-fastcgi {start|stop|restart}"
       exit 1
;;
esac
exit $RETVAL

*************************************************************************************************

chmod 755 /etc/init.d/php-fastcgi

/etc/init.d/php-fastcgi start

 

解决这样的问题:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897

#vi  /etc/yum.repos.d/CentOS-Base.repo
修改内容: changed the gpgcheck=1 to gpgcheck=0 for all the lines
即:把gpgcheck=1全部改为gpgcheck=0

 

阅读(1401) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~