最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

centos 6.3 最小安裝系統(tǒng)下快速搭建環(huán)境步驟分享

 更新時間:2013年04月14日 23:23:28   作者:  
這篇文章主要介紹了centos6.3 最小安裝系統(tǒng)下快速搭建環(huán)境,

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

復(fù)制代碼 代碼如下:

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 <<EOF

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ù)

復(fù)制代碼 代碼如下:

yum install ntp -y
cp /etc/ntp.conf /etc/ntp.conf.original
vim /etc/ntp.conf <<VIM > /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

復(fù)制代碼 代碼如下:

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

cat > /etc/yum.repos.d/nginx.repo <<EOF
[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

復(fù)制代碼 代碼如下:

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ù)實際情況可以選擇不同的版本。
1>php-5.2.17

復(fù)制代碼 代碼如下:

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

復(fù)制代碼 代碼如下:

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為列

復(fù)制代碼 代碼如下:

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    <<VIM
:%s/expose_php = On/expose_php = Off/
:643,643s/;//
:/;open_basedir =/s#^;open_basedir =#open_basedir = /www/:/tmp/#
:wq
VIM

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

復(fù)制代碼 代碼如下:

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)文章

  • 深入理解Linux網(wǎng)絡(luò)之內(nèi)核是如何發(fā)送網(wǎng)絡(luò)包的

    深入理解Linux網(wǎng)絡(luò)之內(nèi)核是如何發(fā)送網(wǎng)絡(luò)包的

    這篇文章主要介紹了Linux網(wǎng)絡(luò)內(nèi)核是如何發(fā)送網(wǎng)絡(luò)包的,文章通過代碼示例介紹的非常詳細(xì),具有一定的參考價值,需要的朋友可以參考下
    2023-07-07
  • linux下查看so或可執(zhí)行程序的依賴庫

    linux下查看so或可執(zhí)行程序的依賴庫

    今天小編就為大家分享一篇關(guān)于linux下查看so或可執(zhí)行程序的依賴庫,小編覺得內(nèi)容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧
    2019-04-04
  • CentOS 7下MongoDB的安裝配置詳解

    CentOS 7下MongoDB的安裝配置詳解

    本篇文章主要介紹了CentOS 7下MongoDB的安裝配置詳解,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-03-03
  • 如何解決Diffie-Hellman Key Agreement Protocol資源管理錯誤漏洞(CVE-2002-20001)

    如何解決Diffie-Hellman Key Agreement Protocol資源管理

    文章主要介紹了資源管理錯誤漏洞的修復(fù)項目,特別提到Diffie-HellmanKeyAgreementProtocol是一種密鑰協(xié)商協(xié)議,該協(xié)議存在安全漏洞,文章建議在配置文件中正確寫入kexalgorithms,避免語法錯誤導(dǎo)致sshd服務(wù)無法啟動,從而無法通過SSH連接服務(wù)器
    2024-12-12
  • shell 命令行中操作HBase數(shù)據(jù)庫實例詳解

    shell 命令行中操作HBase數(shù)據(jù)庫實例詳解

    這篇文章主要介紹了 shell 命令行中操作HBase數(shù)據(jù)庫實例詳解的相關(guān)資料,需要的朋友可以參考下
    2016-11-11
  • Ubuntu 16.04無法切換root權(quán)限問題的解決

    Ubuntu 16.04無法切換root權(quán)限問題的解決

    root權(quán)限相信對大家來說都不陌生,下面這篇文章主要給大家介紹了關(guān)于Ubuntu 16.04無法切換root權(quán)限問題的解決方法,文中通過示例代碼介紹的非常詳細(xì),需要的朋友可以參考借鑒,下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧。
    2018-04-04
  • Linux 判斷文件修改時間和系統(tǒng)時間差

    Linux 判斷文件修改時間和系統(tǒng)時間差

    這篇文章主要介紹了 Linux 判斷文件修改時間和系統(tǒng)時間差的相關(guān)資料,需要的朋友可以參考下
    2017-05-05
  • linux如何通過crontab命令定時執(zhí)行shell腳本

    linux如何通過crontab命令定時執(zhí)行shell腳本

    為保障網(wǎng)安測試活動的順利進(jìn)行,需要設(shè)置Linux服務(wù)器上服務(wù)的定時啟停,本文介紹了通過crontab實現(xiàn)服務(wù)定時啟停的方法,包括檢查crontab安裝、編寫啟停腳本、創(chuàng)建定時任務(wù)、日志記錄,以及問題解決方案,通過crontab-e命令編輯定時任務(wù)
    2024-10-10
  • Linux中將txt導(dǎo)入到mysql的方法教程

    Linux中將txt導(dǎo)入到mysql的方法教程

    這篇文章主要給大家介紹了關(guān)于在Linux中將txt導(dǎo)入到mysql的方法教程,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2018-11-11
  • Linux C字符串替換函數(shù)實例詳解

    Linux C字符串替換函數(shù)實例詳解

    這篇文章主要介紹了Linux C字符串替換函數(shù)實例詳解的相關(guān)資料,需要的朋友可以參考下
    2017-01-01

最新評論

楚雄市| 定陶县| 伊宁县| 平和县| 武山县| 抚州市| 无锡市| 怀集县| 杨浦区| 淮滨县| 德惠市| 宜城市| 蓬安县| 遂昌县| 田阳县| 雷波县| 皋兰县| 伊宁市| 三江| 敖汉旗| 东港市| 怀集县| 宜黄县| 清原| 开原市| 富裕县| 博罗县| 定兴县| 莎车县| 都兰县| 建水县| 浑源县| 衢州市| 澳门| 常山县| 舟曲县| 和硕县| 德安县| 田东县| 陵川县| 桐庐县|