铁雪资源网 Design By www.gsvan.com
1、先在/etc/make.conf加入sync站点,待会儿要用emerge进行同步。
复制代码 代码如下:
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
在执行 emerge --sync 同步portage树。
2、升级portage 版本,要不待会儿安装mysql的时候会提示portage 版本旧的!
复制代码 代码如下:
emerge portage
先定义USE:
复制代码 代码如下:
/etc/portage/package.use
dev-lang/php cli ming xml ftp curl pdo mysqli mysql sqlite json cgi ctype gd hash
www-servers/nginx fastcgi
编辑/etc/portage/package.keywords
www-servers/spawn-fcgi ~x86
3、安装 mysql nginx php spawn-fcgi pecl-apc pecl-memcache。
复制代码 代码如下:
emerge mysql nginx php spawn-fcgi pecl-apc pecl-memcache
4、配置mysql。
复制代码 代码如下:
mkdir -p /data0/mysql/data
mysql_install_db --user=mysql --basedir=/usr --datadir=/data0/mysql/data
配置my.cnf
复制代码 代码如下:
rm -f /etc/mysql/my.cnf
vim /etc/mysql/my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysql]
prompt="(\u:s135[\d]> "
no-auto-rehash
[mysqld]
bind-address = 173.252.207.109
user = mysql
port = 3306
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
datadir = /data0/mysql/data
open_files_limit = 600
back_log = 20
max_connections = 100
max_connect_errors = 200
table_cache = 60
external-locking = FALSE
max_allowed_packet = 16M
sort_buffer_size = 128K
join_buffer_size = 128K
thread_cache_size = 10
thread_concurrency = 8
query_cache_size = 0M
query_cache_limit = 2M
query_cache_min_res_unit = 2k
default_table_type = MyISAM
thread_stack = 192K
transaction_isolation = READ-UNCOMMITTED
tmp_table_size = 512K
max_heap_table_size = 32M
/var/log/slow.log
/var/log/error.log
long_query_time = 1
log_long_format
server-id = 1
#log-bin = /usr/local/mysql/data/binlog
binlog_cache_size = 2M
max_binlog_cache_size = 4M
max_binlog_size = 512M
expire_logs_days = 7
key_buffer_size = 4M
read_buffer_size = 1M
read_rnd_buffer_size = 2M
bulk_insert_buffer_size = 2M
myisam_sort_buffer_size = 4M
myisam_max_sort_file_size = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover
[mysqldump]
quick
max_allowed_packet = 16M
mysqladmin -uroot password ""
启动mysql
/etc/init.d/mysql start
5、配置nginx
vim /etc/nginx/nginx.conf
复制代码 代码如下:
user nginx nginx;
worker_processes 1;
error_log /var/log/nginx/nginx_error.log crit;
pid /var/run/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 52100;
events
{
use epoll;
worker_connections 52100;
}
http
{
include mime.types;
default_type application/octet-stream;
#charset gb2312;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 8m;
sendfile on;
tcp_nopush on;
keepalive_timeout 70 20;
tcp_nodelay on;
server_tokens off;
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;
gzip off;
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
{
server_name www.freebsdsystem.org;
root /data0/www/wwwroot/;
index index.html index.htm index.php;
location ~ .*\.php?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
log_format blog '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /var/log/nginx/blog.log blog;
}
}
配置spawn-fcgi
复制代码 代码如下:
vim /usr/local/bin/php-fcgi
#!/bin/sh
# author:coralzd
# powered by www.freebsdsystem.org
bin=/usr/bin/php-cgi
case $1 in
start)
echo "starting php-cgi"
spawn-fcgi -a 127.0.0.1 -p 9000 -C 8 -u nginx -g nginx -f /usr/bin/php-cgi 2>&1 >/dev/null &
echo "Done"
stop)
killall php-cgi
echo "php-cgi stop"
*)
echo "usage start|stop";;
esac
6、开机启动 nginx mysql
复制代码 代码如下:
rc-update add nginx default
rc-update add mysql default
至此配置完成!
复制代码 代码如下:
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
在执行 emerge --sync 同步portage树。
2、升级portage 版本,要不待会儿安装mysql的时候会提示portage 版本旧的!
复制代码 代码如下:
emerge portage
先定义USE:
复制代码 代码如下:
/etc/portage/package.use
dev-lang/php cli ming xml ftp curl pdo mysqli mysql sqlite json cgi ctype gd hash
www-servers/nginx fastcgi
编辑/etc/portage/package.keywords
www-servers/spawn-fcgi ~x86
3、安装 mysql nginx php spawn-fcgi pecl-apc pecl-memcache。
复制代码 代码如下:
emerge mysql nginx php spawn-fcgi pecl-apc pecl-memcache
4、配置mysql。
复制代码 代码如下:
mkdir -p /data0/mysql/data
mysql_install_db --user=mysql --basedir=/usr --datadir=/data0/mysql/data
配置my.cnf
复制代码 代码如下:
rm -f /etc/mysql/my.cnf
vim /etc/mysql/my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysql]
prompt="(\u:s135[\d]> "
no-auto-rehash
[mysqld]
bind-address = 173.252.207.109
user = mysql
port = 3306
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
datadir = /data0/mysql/data
open_files_limit = 600
back_log = 20
max_connections = 100
max_connect_errors = 200
table_cache = 60
external-locking = FALSE
max_allowed_packet = 16M
sort_buffer_size = 128K
join_buffer_size = 128K
thread_cache_size = 10
thread_concurrency = 8
query_cache_size = 0M
query_cache_limit = 2M
query_cache_min_res_unit = 2k
default_table_type = MyISAM
thread_stack = 192K
transaction_isolation = READ-UNCOMMITTED
tmp_table_size = 512K
max_heap_table_size = 32M
/var/log/slow.log
/var/log/error.log
long_query_time = 1
log_long_format
server-id = 1
#log-bin = /usr/local/mysql/data/binlog
binlog_cache_size = 2M
max_binlog_cache_size = 4M
max_binlog_size = 512M
expire_logs_days = 7
key_buffer_size = 4M
read_buffer_size = 1M
read_rnd_buffer_size = 2M
bulk_insert_buffer_size = 2M
myisam_sort_buffer_size = 4M
myisam_max_sort_file_size = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover
[mysqldump]
quick
max_allowed_packet = 16M
mysqladmin -uroot password ""
启动mysql
/etc/init.d/mysql start
5、配置nginx
vim /etc/nginx/nginx.conf
复制代码 代码如下:
user nginx nginx;
worker_processes 1;
error_log /var/log/nginx/nginx_error.log crit;
pid /var/run/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 52100;
events
{
use epoll;
worker_connections 52100;
}
http
{
include mime.types;
default_type application/octet-stream;
#charset gb2312;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 8m;
sendfile on;
tcp_nopush on;
keepalive_timeout 70 20;
tcp_nodelay on;
server_tokens off;
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;
gzip off;
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
{
server_name www.freebsdsystem.org;
root /data0/www/wwwroot/;
index index.html index.htm index.php;
location ~ .*\.php?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
log_format blog '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /var/log/nginx/blog.log blog;
}
}
配置spawn-fcgi
复制代码 代码如下:
vim /usr/local/bin/php-fcgi
#!/bin/sh
# author:coralzd
# powered by www.freebsdsystem.org
bin=/usr/bin/php-cgi
case $1 in
start)
echo "starting php-cgi"
spawn-fcgi -a 127.0.0.1 -p 9000 -C 8 -u nginx -g nginx -f /usr/bin/php-cgi 2>&1 >/dev/null &
echo "Done"
stop)
killall php-cgi
echo "php-cgi stop"
*)
echo "usage start|stop";;
esac
6、开机启动 nginx mysql
复制代码 代码如下:
rc-update add nginx default
rc-update add mysql default
至此配置完成!
标签:
Nginx,php
铁雪资源网 Design By www.gsvan.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
铁雪资源网 Design By www.gsvan.com
暂无基于gentoo安装Nginx php mysql的方法的评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。