1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
      centos6.3最小安裝系統(tǒng)下怎么快速搭建環(huán)境

      這篇“centos6.3最小安裝系統(tǒng)下怎么快速搭建環(huán)境”文章的知識(shí)點(diǎn)大部分人都不太理解,所以小編給大家總結(jié)了以下內(nèi)容,內(nèi)容詳細(xì),步驟清晰,具有一定的借鑒價(jià)值,希望大家閱讀完這篇文章能有所收獲,下面我們一起來看看這篇“centos6.3最小安裝系統(tǒng)下怎么快速搭建環(huán)境”文章吧。

      創(chuàng)新互聯(lián)公司主營(yíng)同仁網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,成都App制作,同仁h5微信小程序開發(fā)搭建,同仁網(wǎng)站營(yíng)銷推廣歡迎同仁等地區(qū)企業(yè)咨詢

      1,初始化系統(tǒng)環(huán)境  完成系統(tǒng)根新,gcc編譯環(huán)境,php安裝依賴,系統(tǒng)內(nèi)核優(yōu)化

      lokkit --disabled --selinux=disabled
      yum update -y
      yum install -y telnet wget rsync subversion patch   
      yum install -y system-config-network-tui
      yum install -y bind-utils
      yum install -y vim-enhanced
      yum install gcc gcc-c++ make automake autoconf -y
      yum install curl-devel libmcrypt-devel gd-devel libjpeg-devel libpng-devel libxpm-devel libxml2-devel libxslt-devel mhash-devel openssl-devel -y
      cat >> /etc/sysctl.conf <

      net.ipv4.ip_local_port_range = 1024 65500
      net.core.netdev_max_backlog = 262144
      net.ipv4.tcp_syncookies = 1
      net.ipv4.tcp_tw_reuse = 1
      net.ipv4.tcp_tw_recycle = 1
      net.ipv4.tcp_synack_retries = 1
      net.ipv4.tcp_syn_retries = 1
      net.ipv4.tcp_fin_timeout = 60
      net.ipv4.tcp_keepalive_time = 30
      net.ipv4.tcp_max_syn_backlog = 8192
      net.ipv4.tcp_max_tw_buckets = 4096
      eof

      2,配置ntp服務(wù)

      yum install ntp -y
      cp /etc/ntp.conf /etc/ntp.conf.original
      vim /etc/ntp.conf < /dev/null 2>&1
      :22,24s/^/#/
      :25,25s/^/\rserver 210.72.145.44\rserver 133.100.11.8\r/
      :wq
      vim
      service ntpd start
      chkconfig ntpd on

      3,安裝nginx

      groupadd -r www
      useradd -r -g www -s /bin/false -m www

      cat > /etc/yum.repos.d/nginx.repo <[nginx]
      name=nginx repo
      baseurl=http://nginx.org/packages/centos/6/x86_64/
      gpgcheck=0
      enabled=1
      eof

      yum search nginx
      yum install nginx
      chkconfig nginx on
      service nginx start

      ps:需要修改nginx使用用戶為www,默認(rèn)為nginx
      4,安裝MySQL

      wget http://mirror.services.wisc.edu/mysql/downloads/mysql-5.5/mysql-devel-5.5.25a-1.el6.x86_64.rpm
      wget http://mirror.services.wisc.edu/mysql/downloads/mysql-5.5/mysql-client-5.5.25a-1.linux2.6.x86_64.rpm
      wget http://mirror.services.wisc.edu/mysql/downloads/mysql-5.5/mysql-server-5.5.25a-1.el6.x86_64.rpm
      wget http://mirror.services.wisc.edu/mysql/downloads/mysql-5.5/mysql-shared-5.5.25a-1.el6.x86_64.rpm
      wget http://mirror.services.wisc.edu/mysql/downloads/mysql-5.5/mysql-shared-compat-5.5.25a-1.el6.x86_64.rpm
      yum -y localinstall mysql-*

      5,安裝php  在這有根據(jù)實(shí)際情況可以選擇不同的版本。
      1>php-5.2.17


      wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz
      wget http://museum.php.net/php5/php-5.2.17.tar.gz

      tar zxvf php-5.2.17.tar.gz
      gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | patch -d php-5.2.17 -p1

      cd php-5.2.17

      ./configure --prefix=/srv/php-5.2.17 \
      --with-config-file-path=/srv/php-5.2.17/etc \
      --with-config-file-scan-dir=/srv/php-5.2.17/etc/conf.d \
      --with-libdir=lib64 \
      --enable-fastcgi \
      --enable-fpm \
      --with-pear \
      --with-curl \
      --with-gd \
      --with-jpeg-dir \
      --with-png-dir \
      --with-freetype-dir \
      --with-zlib-dir \
      --with-iconv \
      --with-mcrypt \
      --with-mysql \
      --with-pdo-mysql \
      --with-mysql-sock=/var/lib/mysql/mysql.sock \
      --with-openssl=shared \
      --with-mhash=shared \
      --with-sqlite=shared \
      --with-pdo-sqlite=shared \
      --with-xsl=shared \
      --with-pear \
      --enable-sockets \
      --enable-soap \
      --enable-mbstring \
      --enable-magic-quotes \
      --enable-inline-optimization \
      --enable-gd-native-ttf \
      --enable-zip \
      --enable-xml \
      --enable-ftp \
      --enable-bcmath \
      --enable-calendar \
      --enable-sqlite-utf8 \
      --enable-shmop \
      --enable-dba \
      --enable-wddx \
      --enable-sysvsem \
      --enable-sysvshm \
      --enable-sysvmsg \
      --disable-debug

      make && make install


      cp php.ini-recommended /srv/php-5.2.17/etc/php.ini
      cp /srv/php-5.2.17/etc/php-fpm.conf /srv/php-5.2.17/etc/php-fpm.conf.original

      2>php-5.3.10

      wget http://cn.php.net/distributions/php-5.3.10.tar.gz   
      tar xf php-5.3.10.tar.gz
      cd php-5.3.10
      ./configure --prefix=/srv/php-5.3.10 \
      --with-config-file-path=/srv/php-5.3.10 /etc \
      --with-config-file-scan-dir=/srv/php-5.3.10 /etc/conf.d \
      --with-libdir=lib64 \
      --enable-fastcgi \
      --enable-fpm \
      --with-pear \
      --with-curl \
      --with-gd \
      --with-jpeg-dir \
      --with-png-dir \
      --with-freetype-dir \
      --with-zlib-dir \
      --with-iconv \
      --with-mcrypt \
      --with-mysql \
      --with-pdo-mysql \
      --with-mysql-sock=/var/lib/mysql/mysql.sock \
      --with-openssl=shared \
      --with-mhash=shared \
      --with-sqlite=shared \
      --with-pdo-sqlite=shared \
      --with-xsl=shared \
      --without-pear \
      --enable-sockets \
      --enable-soap \
      --enable-mbstring \
      --enable-magic-quotes \
      --enable-inline-optimization \
      --enable-gd-native-ttf \
      --enable-zip \
      --enable-xml \
      --enable-ftp \
      --enable-bcmath \
      --enable-calendar \
      --enable-sqlite-utf8 \
      --enable-shmop \
      --enable-dba \
      --enable-wddx \
      --enable-sysvsem \
      --enable-sysvshm \
      --enable-sysvmsg \
      --disable-debug

      make && make install

      php優(yōu)化拿php-5.3.10為列


      cp php.ini-production /srv/php-5.3.10/etc/php.ini
      cp /srv/php-5.3.10/etc/php-fpm.conf.default /srv/php-5.3.10/etc/php-fpm.conf
      vim /srv/php-5.3.10/etc/php.ini    <:%s/expose_php = on/expose_php = off/
      :643,643s/;//
      :/;open_basedir =/s#^;open_basedir =#open_basedir = /www/:/tmp/#
      :wq
      vim

      附一個(gè)進(jìn)過優(yōu)化的nginx配置文件


      user    www www;
      worker_processes 8;
      error_log    /www/log/nginx_error.log    crit;
      pid                /usr/local/nginx/nginx.pid;
      worker_rlimit_nofile 204800;

      events
      {
          use epoll;
          worker_connections 204800;
      }

      http
      {
          include             mime.types;
          default_type    application/octet-stream;

      server_tokens off;

          charset    utf-8;

          server_names_hash_bucket_size 128;
          client_header_buffer_size 2k;
          large_client_header_buffers 4 4k;
          client_max_body_size 8m;

          sendfile on;
          tcp_nopush         on;

          keepalive_timeout 60;

          fastcgi_cache_path /usr/local/nginx/fastcgi_cache levels=1:2
                                      keys_zone=test:10m
                                      inactive=5m;
          fastcgi_connect_timeout 300;
          fastcgi_send_timeout 300;
          fastcgi_read_timeout 300;
          fastcgi_buffer_size 16k;
          fastcgi_buffers 16 16k;
          fastcgi_busy_buffers_size 16k;
          fastcgi_temp_file_write_size 16k;
          fastcgi_cache test;
          fastcgi_cache_valid 200 302 1h;
          fastcgi_cache_valid 301 1d;
          fastcgi_cache_valid any 1m;
          fastcgi_cache_min_uses 1;
          fastcgi_cache_use_stale error timeout invalid_header http_500;

          open_file_cache max=204800 inactive=20s;
          open_file_cache_min_uses 1;
          open_file_cache_valid 30s;
          


          tcp_nodelay on;

          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;


          server
          {
              listen             80;
              server_name    www.myhack58.com;
              index index.php index.htm;
              root    /www/html/;

              location /status
              {
                      stub_status on;
              }

              location ~ .*\.(php|php5)?$
              {
                      fastcgi_pass 127.0.0.1:9000;
                      fastcgi_index index.php;
                      include fcgi.conf;
              }

              location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ico)$
              {
                      expires            7d;
              }

              location ~ .*\.(js|css)$
              {
                   expires            1h;
              }                       
              location ~ .*\.(html|htm)
              {
                   expires            15m;
              }
              location ~ .*\.log$
              {
                   deny all;
              }


              log_format    access    '$remote_addr - $remote_user [$time_local] "$request" '
                                  '$status $body_bytes_sent "$http_referer" '
                                  '"$http_user_agent" $http_x_forwarded_for';
              access_log    /www/log/access.log    access;
                  }
      }

      以上就是關(guān)于“centos6.3最小安裝系統(tǒng)下怎么快速搭建環(huán)境”這篇文章的內(nèi)容,相信大家都有了一定的了解,希望小編分享的內(nèi)容對(duì)大家有幫助,若想了解更多相關(guān)的知識(shí)內(nèi)容,請(qǐng)關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。


      本文名稱:centos6.3最小安裝系統(tǒng)下怎么快速搭建環(huán)境
      標(biāo)題網(wǎng)址:http://www.ef60e0e.cn/article/gsgdhi.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        平定县| 宣威市| 黄浦区| 临泽县| 彩票| 枣强县| 泸溪县| 财经| 卢龙县| 苗栗县| 龙井市| 元阳县| 喀什市| 江达县| 息烽县| 岳阳县| 新乡市| 麟游县| 资中县| 康保县| 溆浦县| 玛多县| 突泉县| 阳谷县| 大港区| 吉隆县| 阳朔县| 江山市| 建昌县| 崇州市| 香河县| 盐亭县| 兴安县| 泾源县| 通海县| 阳原县| 客服| 班玛县| 二连浩特市| 沙坪坝区| 新乡市|