类别:媒体报道 发布时间:2021-03-16 浏览人次:
1,原始化系统软件自然环境 进行系统软件根新,gcc编译程序自然环境,php安裝依靠,系统软件核心提升
拷贝编码 编码以下:
lokkit --disabled --selinux=disabled
yum update -y
yum install - wget rsync subversion patch
yum install -y work-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
dev_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服务
拷贝编码 编码以下:
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.44rserver 133.100.11.8r/
: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 EOF
[nginx]
name=nginx repo
baseurl=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,默认设置为nginx
4,安裝mysql
拷贝编码 编码以下:
wget mysql/Downloads/MySQL-5.5/MySQL-devel-5.5.25a-1.el6.x86_64.rpm
wget mysql/Downloads/MySQL-5.5/MySQL-client-5.5.25a-1.linux2.6.x86_64.rpm
wget mysql/Downloads/MySQL-5.5/MySQL-server-5.5.25a-1.el6.x86_64.rpm
wget mysql/Downloads/MySQL-5.5/MySQL-shared-5.5.25a-1.el6.x86_64.rpm
wget mysql/Downloads/MySQL-5.5/pat-5.5.25a-1.el6.x86_64.rpm
yum -y localinstall MySQL-*
5,安裝php 在这里有依据具体状况能够挑选不一样的版本号。
1 php-5.2.17
拷贝编码 编码以下:
wget downloads/php-5.2.17-fpm-0.5.14.diff.gz
wget 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.mended /srv/php-5.2..ini
cp /srv/php-5.2.-fpm.conf /srv/php-5.2.-fpm.conf.original
2 php-5.3.10
拷贝编码 编码以下:
wget 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提升拿php-5.3.10为列
拷贝编码 编码以下:
cp php.ini-production /srv/php-5.3..ini
cp /srv/php-5.3.-fpm.conf.default /srv/php-5.3.-fpm.conf
vim /srv/php-5.3..ini VIM
:% = = Off/
:643,643s/;//
:/;open_basedir =/s#^;open_basedir =#open_basedir = /www/:/tmp/#
:wq
VIM
附一个进过提升的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 10m;
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;
p_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
server
{
listen 80;
server_name ;
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;
}
}
海纳建网站系统软件cms 点一下:96 归属于:Linux1,原始化系统软件自然环境 进行系统软件根新,gcc编译程序自然环境,php安裝依靠,系统软件核心提升拷贝编码 编码以下:lokkit --disab...
2021-03-16为何高档营销推广网站报价划算不适感合?公布 | 已阅: | 创作者:智唯网编 | | 共 0 条评价为何高档营销推广网站不提议廉价?由于它是一个高档营销推广网站,因此规定很高。它是一个...
2021-03-16怎样构建一个能够挣钱的营销推广网站公布 | 已阅: | 创作者:智唯网编 | | 共 1 条评价如今互连网,网站五花八门,有好几百元的,有好几千元的,乃至有过万元的,那麼,不是是越划...
2021-03-16中国香港嘉志身心健康管理方法国际性团体比较有限企业种类:响应+三合一+公司+设计风格制造行业:技术专业服务访问量:20225中国香港嘉志身心健康资询比较有限企业是一家集技术...
2021-03-16我不会了解有几个听闻过“高飞网”这一词。今日,天津市市企业网站建设企业的《巧匠心独运计与技术性》小版营销推广了这一词的含意。效仿站的定义:效仿站便是效仿总体目标网...
2021-03-16建设网站坚信许多人也不生疏,并且许多企业公司必须基本建设自身的官方网网站,但网站针对公司的实际意义是啥呢?许多人要说,这一还用问吗,自然是展现企业的商品、信息内...
2021-03-15