SUSE11 Installation nginxmongosybasephp Environment ____php

Source: Internet
Author: User
Tags auth fpm mkdir mongodb sybase nameserver
SUSE11 installation nginxmongosybasephp Environment 1.Server

vi/etc/resolv.conf
  nameserver 8.8.8.8
  nameserver 8.8.4.4 zypper
ar http://download.opensuse.org/ Distribution/11.4/repo/oss/official
zypper Refresh
zypper install pcre-devel nginx/zypper install zlib
Nginx
zypper Install zlib-devel//nginx mkdir/ndap mkdir/ndap/_run mkdir/ndap_log mkdir
/ Ndap/software 
mkdir/ndap/mongodb
mkdir/ndap/mongodb/data
mkdir/ndap/mongodb/mongo
mkdir/ Ndap/www
mkdir/home/sybase
useradd mongodb
groupadd mongodb
useradd www
groupadd www
useradd Sybase
groupadd Sybase
chown-r mongodb/ndap/mongodb
chgrp-r Mongodb/ndap/mongodb
1.1 reboot Command

[Nginx]
Kill-hup ' Cat/ndap/_run/nginx.pid '
[php-fpm]
kill-usr2 ' cat/ndap/_run/php-fpm.pid '
[MongoDB]
MONGO 127.0.0.1:5017 use
admin
db.auth ("ACC", "pwd")
db.shutdownserver ();
2.MongoDB

Cd/ndap/software
wget http://fastdl.mongodb.org/src/mongodb-src-r2.4.9.tar.gz
TAR-ZXVF mongodb-src-r2.4.9.tar.gz
cp-r mongodb-src-r2.4.9//ndap/mongodb
vi/ndap/mongodb/mongod.conf
vi/etc/ Rc.d/boot.local
3.Sybase

-No longer repeat 4.Nginx

Cd/ndap/software
wget http://nginx.org/download/nginx-1.5.13.tar.gz
tar-xzvf nginx-1.5.13.tar.gz
CD nginx-1.5.13
./configure--prefix=/usr/local/nginx make make
install
vi/usr/local/nginx/ conf/nginx.conf
mkdir/usr/local/nginx/conf/vhost
vi/usr/local/nginx/conf/vhost/ndap.conf
5.PHP

Cd/ndap/software
wget http://am1.php.net/get/php-5.3.28.tar.gz/from/this/mirror
TAR-XZVF php-5.3.28.tar.gz
cd php-5.3.28 '
./configure '  --prefix=/usr/local/php '--with-config-file-path=/ Usr/local/php/etc '--with-iconv-dir=/usr/local '--with-zlib '--with-libxml-dir=/usr '--enable-xml ' Disable-rpath '--enable-discard-path '--enable-safe-mode '--enable-bcmath '--enable-shmop '--enable-sysvsem '- -enable-inline-optimization '--with-curl '--with-curlwrappers '--enable-mbregex '--enable-fpm ' Enable-force-cgi-redirect '--enable-mbstring '--with-mcrypt '--with-gd '--enable-gd-native-ttf ' With-openssl '--with-mhash '--enable-pcntl '--enable-sockets '--with-xmlrpc '--enable-zip ' Local/libiconv '--with-sybase-ct=/home/sybase ' make
make
install
5.1 PHP Mongo Driver Compile installation

    Https://github.com/mongodb/mongo-php-driver
    tar zxvf mongodb-mongodb-php-driver-xxxx x.tar.gz
    CD Mongodb-mongodb-php-driver-xxxx
    phpize
    ./configure
    sudo make install
    vi php.ini  # extension= Mongo.so 
5.2 or PECL .

PECL Install MONGO
5.3 Other Libraries

Pecl Install pecl-http
pecl Install Mailparse
6.ConfigFiles 6.1 boot.local

Limit-shn 65535
mongod-f/ndap/mongodb/mongo/mongod.conf--quiet 
/usr/local/nginx/sbin/nginx
LOCAL/PHP/SBIN/PHP-FPM
route add default GW 192.168.111.1

6.2 mongod.conf

# mongo.conf #where to log logpath=/ndap/_log/mongod.log logappend=true # fork and run in background fork = True #port

= 27017 Port = 5017 maxconns=20000 Dbpath=/ndap/mongodb/data # location of pidfile Pidfilepath =/ndap/_run/mongod.pid # Disables Write-ahead journaling # nojournal = True # Enables periodic logging of CPU utilization and I/o wait #cpu = t  Rue # Turn On/off Security.
Off is currently the default #noauth = True auth = true # Verbose logging output. #verbose = true # Inspect all client data to validity on receipt (useful for # developing drivers) #objcheck = true # E    Nable db Quota Management #quota = true # Set oplogging level where n is # 0=off (default) # 1=w # 2=r # 3=both # 7=w+some reads #diaglog = 0 # Ignore query Hints #nohints = true # Disable the HTTP interface (Defaults to localhost:  27018). #nohttpinterface = true # turns off server-side scripting. This is the greatly limited # functionality #noscripting = true # turns off TAble scans.
Any query so would do a table scan fails.
#notablescan = true # Disable data file preallocation.
#noprealloc = true # specify. ns file size for new databases.
# nssize = <size> # accout token for Mongo monitoring server.
#mms-token = <token> # server name for Mongo monitoring server.
#mms-name = <server-name> Ping interval for Mongo monitoring server. #mms-interval = <seconds> # Replication Options # in replicated MONGO databases, specify-here whether-SL Ave or Master #slave = True #source = master.example.com # slave only:specify a single database to replicate #only = mast
 Er.example.com # or #master = True #source = slave.example.com
6.3/usr/local/nginx/conf/nginx.conf

User www www.

Worker_processes 8;
Error_log/ndap/_log/nginx_error.log;
#error_log Logs/error.log Notice;

#error_log Logs/error.log Info;
#pid Logs/nginx.pid;

Pid/ndap/_run/nginx.pid; 
Worker_rlimit_nofile 65535;
    events {use Epoll;
Worker_connections 65535;
    } http {include mime.types;

    Default_type Application/octet-stream;

    CharSet Utf-8;
    Server_names_hash_bucket_size 128;
    Client_header_buffer_size 32k;
    Large_client_header_buffers 4 32k;
      
    Client_max_body_size 200m;
    Sendfile on;
  
    Tcp_nopush on;
  
    Resolver 127.0.0.1;

    Keepalive_timeout 60;

    Tcp_nodelay on;
    Fastcgi_connect_timeout 300;
    Fastcgi_send_timeout 300;
    Fastcgi_read_timeout 300;
    Fastcgi_buffer_size 64k;
    Fastcgi_buffers 4 64k;
    Fastcgi_busy_buffers_size 128k;

    Fastcgi_temp_file_write_size 128k;
    Proxy_connect_timeout 5;
    Proxy_read_timeout 60;
    Proxy_send_timeout 5;
Proxy_buffer_size 16k;    Proxy_buffers 4 64k;
    Proxy_busy_buffers_size 128k;

    Proxy_temp_file_write_size 128k;
    gzip on;
    Gzip_min_length 1k;
    Gzip_buffers 4 16k;
    Gzip_http_version 1.0;
    Gzip_comp_level 2;
    Gzip_types text/plain application/x-javascript text/css application/xml;

    Gzip_vary on; 

Include vhost/*.conf;
 }

6.4/usr/local/nginx/conf/vhost/ndap.conf

server {Listen 80;
    Listen 8081 Default_server;
    server_name ndap.myt.com;
    Index index.html index.php;
    Root/ndap/www/ndap;
    AutoIndex off;
    CharSet Utf-8;
    
    Error_page 404 index/404.html;
        Location/{index index.php;
            if (!-e $request _filename) {rewrite ^/(. *) $/index.php/$1 last;
        Break
        } location ~. php$ {Fastcgi_pass 127.0.0.1:9000;
        Fastcgi_index index.php;
        Fastcgi_param script_filename $document _root$fastcgi_script_name;
        Fastcgi_param sybase/home/sybase;
    Include fastcgi.conf;
        } location ~ index\.php ($|/) {set $script $uri;
        Set $path _info "/";
                if ($uri ~ "^ (. +\.php) (/.+)") {set $script $;
        Set $path _info $;
        } Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php?
        if_rewrite=1;
        Fastcgi_param sybase/home/sybase; Includefastcgi.conf;
        Fastcgi_param path_info $path _info;
        Fastcgi_param script_filename/ndap/www/ndap/index.php;
    Fastcgi_param Script_name ""; } location ~. *\.
    (gif|jpg|jpeg|png|bmp|swf) $ {expires 1s; } location ~. *\.
    (JS|CSS)? $ {expires 1s; }        

}

6.5/usr/local/php/etc/php.ini

[PHP]
Max_input_vars = 100000;
Error_log =/ndap/_log/php.log
post_max_size = 20M
upload_max_filesize = 20M
max_file_uploads =
extension=raphf.so
extension=propro.so
extension=http.so
extension= "mailparse.so"
extension= Mongo.so 

[Sybase]
sybase= "/home/sybase"

[MONGO]
mongo.native_long = "1"



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.