moinmoin禁止用户注册
wikiconfig.py 中加入: {{{ actions_excluded = multiconfig.DefaultConfig.actions_excluded + ['newaccount'] }}}
more ...在这里详述 linux/lvm kvm 扩容 缩小容量。也适用于host lvm卷调整
== raw 镜像文件增加容量 == {{{ qemu-img info xp_4_test.disk01 #查看文件信息 qemu-img resize xp_4_test.disk01 +150M //更改大小 }}} 在windows中,查看磁盘,会出现空余容量。 ==== win2003中 ==== [[windows2003 extpart.exe更改C盘容量]] 无损增加容量,win2008 diskpart.exe ==== linux lvm ==== 用free空间建立一个分区,把分区加入卷组,把卷组空间加入lvm。如果是/分区,用光盘引导进入rescue模式 {{{ fdisk /dev/vda n //建立分区 p //主分区 lvm pvcreate /dev/vda4 //建立物理卷 lvm vgextend vg卷组名 /dev/vda4 //把物理卷添加到已有卷组 ...
more ...修改Linux内核参数,减少TCP连接中的TIME-WAIT sockets
用netstat -an命令发现服务器中有大量状态为TIME-WAIT的TCP连接,于是用/sbin/sysctl -a查看了一下Linux的各项内核参数,并翻阅有关资料,决定修改其中的两项参数,以达到减少TCP连接中TIME-WAIT sockets的目的。<
>
vi /etc/sysctl.conf<
>
编辑/etc/sysctl.conf文件,增加三行:<
>
{{{
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
}}}
说明:<
>
net.ipv4.tcp_syncookies = 1 表示开启SYN Cookies。当出现SYN等待队列溢出时,启用cookies来处理,可防范少量SYN攻击,默认为0,表示关闭;<
>
net.ipv4.tcp_tw_reuse = 1 表示开启重用。允许将TIME-WAIT sockets重新用于新的TCP连接 ...
moinmoin ubuntu nginx
vi /etc/rc.local ,在exit 0 前面添加 {{{ uwsgi -x /www/moin/uwsgi.xml >/dev/null 2>&1 & }}}
cat /etc/nginx/sites-enabled/wiki {{{ server { listen 4081; access_log /dev/null; location / { include uwsgi_params; uwsgi_pass unix:///www/moin/moin.sock; uwsgi_modifier1 30; } }
}}}
cat moin/uwsgi.xml
{{{
windows2003 extpart.exe更改C盘容量
extpart.exe
解压后在 c:\dell\extpart\ 目录下 windows 2003 cmd下执行
[[attachment:ExtPart.exe]] [[attachment:9347455_1331257508PE5x.jpg]]
more ...设置redis的持久化
设置redis的配置文件相应段落,下面2种方法均可
=== 一 设置快照模式 ===
{{{
900秒(15分钟)之后,且至少1次变更
save 900 1
300秒(5分钟)之后,且至少10次变更
save 300 10
60秒之后,且至少10000次变更
save 60 10000
#是否压缩 rdbcompression yes
数据库的文件名
dbfilename dump.rdb
文件路径
dir ./ }}}
=== 二 设置纯累加模式 ===
{{{ appendonly no 纯累加模式 这里写yes的话,上面save段要都注释掉 ,否则写入dump.rdb的内容不能写进aof文件
appendfsync always 每次写操作都立刻写入到aof文件。慢。
appendfsync everysec 每秒写一次
appendfsync no ...
more ...moinmoin install nginx uwsgi
=== Config nginx ===
{{{ server { #server_name wiki.example.com; listen 4081; #access_log /var/log/nginx/access.log; #error_log /var/log/nginx/error.log;
location / {
include uwsgi_params;
uwsgi_pass unix:///srv/www/moin/moin.sock;
uwsgi_modifier1 30;
}
} }}}
vi /etc/init/moin.conf {{{ description "moin uwsgi service"
start on runlevel [2345] stop on runlevel [!2345 ...
more ...nginx/unavailable modifier requested 30 uwsgi
{{{ your server socket listen backlog is limited to 100 connections Operational MODE: single process no app loaded. going in full dynamic mode uWSGI is running in multiple interpreter mode spawned uWSGI worker 1 (and the only) (pid: 5207, cores: 1) -- unavailable modifier requested: 0 -- -- unavailable modifier requested: 0 -- -- unavailable modifier ...
more ...rhel5.7部署twitter storm
== python install ==
{{{
wget http://python.org/ftp/python/2.7.4/Python-2.7.4.tgz
tar zxvf Python-2.7.2.tgz
cd Python-2.7.2
./configure
make
make install
vi /etc/ld.so.conf
/usr/local/lib/
/sbin/ldconfig
no acceptable C compiler found in $PATH
rpm -ivh gcc-4.1 ...
more ...nginx php 504
nginx.conf http段 {{{ fastcgi_connect_timeout 300s; fastcgi_send_timeout 300s; fastcgi_read_timeout 300s; fastcgi_buffer_size 128k; fastcgi_buffers 8 128k;#8 128 fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors on; }}} 这里最主要的设置是前三条,即 {{{ fastcgi_connect_timeout 300s; fastcgi_send_timeout 300s; fastcgi_read_timeout 300s; }}}
more ...