您好,欢迎访问一九零五行业门户网

ubuntu 12.04 配置nginx mysql php5_MySQL

ubuntunginx
1.apt-get install mysql-server mysql -client//安装数据库
2.apt-get install nginx //安装nginx
gedit /etc/nginx/sites-enabled/default //nginx配置文件
server {
root /home/angelmylove/download/zendphp/; //存放php文件的地址,等价与apache 的documentroot
   index index.html index.htm index.php;
   # make site accessible from http://localhost/
   server_name localhost;
   autoindex on; //这句话我每次不写都出错
location ~ /.php$ {
   #    fastcgi_split_path_info ^(.+/.php)(/.+)$;
   #    # note: you should have cgi.fix_pathinfo = 0; in php.ini
   #
   #    # with php5-cgi alone:
       fastcgi_pass 127.0.0.1:9000;
   #    # with php5-fpm:
   #    fastcgi_pass unix:/var/run/php5-fpm.sock;
       fastcgi_index index.php;
       include fastcgi_params;
   }
}
3.//安装有用的模块
apt-get install php5-fpm 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
4./etc/init.d/nginx stop
/etc/init.d/nginx start
5,serviec php5-fpm reload //当你每次加载新模块后,都要执行
其它类似信息

推荐信息