官方论坛产品帮助刷图视频问题反馈

CentOS安装OpenVZ

发表于 秦海传媒

vzctl create 101 \
--ostemplate centos-5-i386-afull \
--conf vps.basic \
--ipadd 168.254.7.130 \
--hostname mynew.container.com

二、开始安装OpenVZ

1.安装核心

#cd /etc/yum.repos.d
# wget http://download.openvz.org/openvz.repo

yum search ovzkernel

根据你的服务器环境安装需要的核心


ovzkernel-PAE-devel.i686 : Development package for building kernel modules to match the PAE kernel.
ovzkernel-PAE.i686 : The Linux kernel compiled for PAE capable machines.
ovzkernel.i686 : Virtuozzo Linux kernel (the core of the Linux operating system)
ovzkernel.i686 : Virtuozzo Linux kernel (the core of the Linux operating system)
ovzkernel-devel.i686 : Development package for building kernel modules to match the kernel.

如果你内存多过4G请安装ovzkernel-PAE,但现在服务器的内存只有3GB所以就安装这个把。

yum install  ovzkernel-xen.i686

2.修改启动文件

# vi /boot/grub/grub.conf

default=0
title CentOS (2.6.18-92.1.18.el5.028stab060.2)

当启动服务器时使用OpenVZ的核心。

3.修改核心模组文件

# vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0

net.ipv4.conf.all.rp_filter = 1

kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

# sysctl -p 檢查是否有錯誤的輸入

修改 /etc/modprobe.conf 載入 options ip_conntrack ip_conntrack_enable_ve0=1   ## vzcpt   模組

4.重启服务器,使用新的核心与模组


vzethdev               16268 0 
vzrst                 145940 0 
ip_nat                 22288 1 vzrst
vzcpt                 116260 0 
ip_conntrack           60356 3 vzrst,ip_nat,vzcpt
ipip                   17796 2 vzrst,vzcpt
tun                    15872 2 vzrst,vzcpt
vzdquota               43924 6 [permanent]
vznetdev               21384 12 
vzmon                  49292 10 vzethdev,vzrst,vzcpt,vznetdev
ipv6                  284924 180 vzrst,vzcpt,vzmon
vzdev                   7556 6 vzethdev,vzdquota,vznetdev,vzmon

这些就是OpenVZ的模组.

有网络、磁盘、磁盘配额、迁移、输入、监察这些部分。

5. 安装OpenVZ 主要的控制软件

yum install vzctl vzquota xdelta -y
rpm -ivh http://download.openvz.org/contrib/utils/vzdump/vzdump-1.0-2.noarch.rpm
rpm -ivh http://download.openvz.org/contrib/utils/vzprocps-2.0.11-6.13.swsoft.i386.rpm

6. 启动服务

# /sbin/service vz start

安装好啦!等下一节教大家如何使用OpenVZ吧!

Frankly, I don’t know more details about HyperVM.
So I went to try it to install the HyperVM from my dedicated server.
Installation HyperVM is damn very easy, and just 1 little linux syntax.

After the fresh install, I get this error message, when I tried to add a Virtual Machine on tab OpenVZ :

no_servers_configured_for_this_driver

By, default HyperVm is adding Xen Driver it self. So, you must add the OpenVZ driver in your HyperVM.
Simply login to your hyperVM admin control http://:8887 and use admin user details, then go to menu on the left frame ‘Admin -> Administration -> Servers’, then ‘Add server’

There you add the Ip/Hostname and the Password, HyperVM will automatically detect the driver.
Then you could add OpenVZ Virtual Machine.

Namecheap 6月0.98美元注册域名优惠

发表于 秦海传媒


https://www.namecheap.com/promos/exclusive-promo-0-98-domain-wedfcv.aspx?aff=41719

php mail函数在win下的使用,以及配置win下的sendmail

发表于 秦海传媒

昨天安装的sendmail一直失败,最后换成了本地SMTP。今天又尝试了下,发现使用FastCGI模式时,SendMail失败。
SendMail下载:http://glob.com.au/sendmail/

mail函数在win里可以通过配置php.ini来正常使用
打开php.ini

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
sendmail_from = me@example.com
; For Unix only.  You may supply arguments as well (default: ”sendmail -t -i”).
; sendmail_path = ”"
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

设置SMTP,smtp_port,sendmail_from。分别是pop3服务器地址,端口号这两个一般默认,sendmail_from设置的是发件人邮箱
注意的是这里需要的pop3服务器是不需要身份验证的那种而且不能使用安全方式连接的。国内有些没有提供不验证服务的…在服务器上装上smtp组件就可以了,安装方法很多网上都有
如果不打算让本机成为smtp服务器,可以使用linux常用的sendmail,这样可以通过验证使用国内的一些服务器的pop3服务器,建议是qq或者foxmail个人感觉腾讯的速度和稳定都不错。
经测试目前163、新浪的SMTP无法使用,qq和foxmail可以用,其他没测试…
win下怎么配置呢

[mail function]
; For Win32 only.
; SMTP = localhost
; smtp_port = 25
; For Win32 only.
; sendmail_from = me@example.com
; For Unix only.  You may supply arguments as well (default: ”sendmail -t -i”).
sendmail_path = ”d:/soft/sendmail/sendmail.exe -t -i”
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

按上面的方式把前面说的三个选项前面都加上分号,把sendmail_path前面的分号去掉下载下面的文件:
sendmail压缩包
解压后找个地方放好,将里面sendmail.exe的地址填到sendmail_path并如上面所写增加-t -i参数(更多参数自己查吧)。
打开:sendmail.ini文件
修改里面的

smtp_server=smtp服务器地址
auth_username=邮箱登录名
auth_password=邮箱密码
force_sender=发件人地址全写

ok了mail函数可以正常使用了,注意如果iis使用cgi模式运行php的话用sendmail方法会出错,修改为ISAPI模式后一切正常了。

Windows下配置PHP发送邮件

发表于 秦海传媒

广为流传的Sendmail好像在IIS表现不佳,由于某些原因我没有正常发信,出现的bug也无法解决。于是我继续找可以让windows服务器发邮件的方法,最后终于找到了一个可以在10秒钟就可以成功配置出通过php mail()函数发邮件的方法。
实现原理

之前的文章,我们用的方法是通过让php调用sendmail.exe这个文件,而sendmail.exe本身通过配置文件里对smtp和pop3设置,实现邮件发送。而今天我们通过自搭STMP服务器实现本地发信。
准备

下载:1st SMTP Server,只有763KB.下载地址:迅雷下载
开始

1、查看php.ini,注意SMTP 和 端口要与本文的一致。


SMTP = localhost
smtp_port = 25
sendmail_from = s@99288.net.cn

2、解压后先运行下主程序,之后提示需要注册码。我们运行keygen.exe来生成注册码。如果你不爱生成,我这有几个复制去就好了。


01331324915034
08331304955057
02331374975744

3、再次打卡主程序,一定要勾选 只接受从该计算机发错的连接。不然你的电脑会成为垃圾邮件的中转站,后果很难想象,你的IP也有可能被黑名单。

4、我可以通过查看日志这个功能,可以详细地查看我们给谁发了邮件。
测试


< ?php
$now = date(“Y-m-d h:i:s”);
$from_name = ’测试sendmail’;
$from_email =
$headers = ’From: $from_name <$from_email>’;
$body = ’这是一封来自 $from_name < $from_email>的测试邮件.’;
$subject = ’[$now] 邮件测试’;
if (mail($to, $subject, $body, $headers)) {
echo ”success!”;
} else {
echo ”fail…”;
}
?>

怎么样?十秒钟是不是可以搞定php mail()发信?快来试试吧。

万网M3主机绑定域名并建立多个站点

发表于 秦海传媒

一。修改.htaccess文件

RewriteEngine On
RewriteBase /

RewriteCond %{http_host} ^99288.net.cn [NC]
RewriteRule ^(.*)$ http://www.99288.net.cn/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^5uvps.com$
RewriteCond %{REQUEST_URI} !^/idc/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /idc/$1
RewriteCond %{HTTP_HOST} ^5uvps.com$
RewriteRule ^(/)?$ /idc/index.shtml [L]

RewriteCond %{HTTP_HOST} ^wap.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/phone/wap/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /phone/wap/$1
RewriteCond %{HTTP_HOST} ^wap.99288.net.cn$
RewriteRule ^(/)?$ /phone/wap/index.php [L]

RewriteCond %{HTTP_HOST} ^js.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /js/$1
RewriteCond %{HTTP_HOST} ^js.99288.net.cn$
RewriteRule ^(/)?$ /404/index.html [L]

RewriteCond %{HTTP_HOST} ^static.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/static/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /static/$1
RewriteCond %{HTTP_HOST} ^static.99288.net.cn$
RewriteRule ^(/)?$ /404/index.html [L]

RewriteCond %{HTTP_HOST} ^youhui.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/fc/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /fc/$1
RewriteCond %{HTTP_HOST} ^youhui.99288.net.cn$
RewriteRule ^(/)?$ /fc/index.php [L]

RewriteCond %{HTTP_HOST} ^css.qhdhqw.com$
RewriteCond %{REQUEST_URI} !^/CImg/qhdhqw/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /CImg/qhdhqw/$1 [L]

RewriteCond %{HTTP_HOST} ^css.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/css/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /css/$1 [L]

RewriteCond %{HTTP_HOST} ^phone.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/phone/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /phone/$1
RewriteCond %{HTTP_HOST} ^phone.99288.net.cn$
RewriteRule ^(/)?$ /phone/index.php [L]

RewriteCond %{HTTP_HOST} ^dh.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/dh/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /dh/$1
RewriteCond %{HTTP_HOST} ^dh.99288.net.cn$
RewriteRule ^(/)?$ /dh/index.html [L]

RewriteCond %{HTTP_HOST} ^kefu.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/kefu/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /kefu/$1
RewriteCond %{HTTP_HOST} ^kefu.99288.net.cn$
RewriteRule ^(/)?$ /kefu/index.html [L]

RewriteCond %{HTTP_HOST} ^ip138.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/ip138/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /ip138/$1
RewriteCond %{HTTP_HOST} ^ip138.99288.net.cn$
RewriteRule ^(/)?$ /ip138/index.php [L]


RewriteCond %{HTTP_HOST} ^www.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/www/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /www/$1
RewriteCond %{HTTP_HOST} ^www.99288.net.cn$
RewriteRule ^(/)?$ /www/index.php [L]

RewriteCond %{HTTP_HOST} ^wolf.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/wolf/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wolfcms/$1
RewriteCond %{HTTP_HOST} ^wolf.99288.net.cn$
RewriteRule ^(/)?$ /wolfcms/index.php [L]


RewriteCond %{HTTP_HOST} ^book.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/xiaoshuo/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /xiaoshuo/$1
RewriteCond %{HTTP_HOST} ^book.99288.net.cn$
RewriteRule ^(/)?$ /xiaoshuo/index.php [L]



RewriteCond %{HTTP_HOST} ^key.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/key/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /key/$1
RewriteCond %{HTTP_HOST} ^key.99288.net.cn$
RewriteRule ^(/)?$ /key/index.php [L]

RewriteCond %{HTTP_HOST} ^cimg.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/CImg/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /CImg/$1
RewriteCond %{HTTP_HOST} ^cimg.99288.net.cn$
RewriteRule ^(/)?$ /www/index.html [L]

RewriteCond %{HTTP_HOST} ^yimg.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/CImg/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /CImg/$1
RewriteCond %{HTTP_HOST} ^yimg.99288.net.cn$
RewriteRule ^(/)?$ /www/index.html [L]

#Blog Dtart 22:27 2011/3/25
RewriteCond %{HTTP_HOST} ^blog.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^blog.99288.net.cn$
RewriteRule ^(/)?$ /wordpress/index.php [L]

RewriteCond %{HTTP_HOST} ^conf.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/conf/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /conf/$1
RewriteCond %{HTTP_HOST} ^conf.99288.net.cn$
RewriteRule ^(/)?$ /conf/index.html [L]

RewriteCond %{HTTP_HOST} ^tar.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/tar/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /tar/$1
RewriteCond %{HTTP_HOST} ^tar.99288.net.cn$
RewriteRule ^(/)?$ /tar/index.html [L]

RewriteCond %{HTTP_HOST} ^soft.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/soft/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /soft/$1
RewriteCond %{HTTP_HOST} ^soft.99288.net.cn$
RewriteRule ^(/)?$ /soft/index.html [L]


RewriteCond %{HTTP_HOST} ^baojie.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/baojie/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /baojie/$1
RewriteCond %{HTTP_HOST} ^baojie.99288.net.cn$
RewriteRule ^(/)?$ /baojie/index.html [L]

RewriteCond %{HTTP_HOST} ^hiv.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/iz/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /iz/$1
RewriteCond %{HTTP_HOST} ^hiv.99288.net.cn$
RewriteRule ^(/)?$ /iz/index.html [L]

RewriteCond %{HTTP_HOST} ^uc.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/uc/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /uc/$1
RewriteCond %{HTTP_HOST} ^uc.99288.net.cn$
RewriteRule ^(/)?$ /uc/index.php [L]

RewriteCond %{HTTP_HOST} ^img.qhdhqw.com$
RewriteCond %{REQUEST_URI} !^/qhdhqw/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /qhdhqw/$1
RewriteCond %{HTTP_HOST} ^img.qhdhqw.com$
RewriteRule ^(/)?$ /qhdhqw/index.php [L]

RewriteCond %{HTTP_HOST} ^shaibo.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/shaibo/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /shaibo/$1
RewriteCond %{HTTP_HOST} ^shaibo.99288.net.cn$
RewriteRule ^(/)?$ /shaibo/index.php [L]

RewriteCond %{HTTP_HOST} ^host.99288.net.cn$
RewriteCond %{REQUEST_URI} !^/host/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /host/$1
RewriteCond %{HTTP_HOST} ^host.99288.net.cn$
RewriteRule ^(/)?$ /host/index.shtml [L]

二。注意根目录不要放站点,秦海传媒的主站放在了www目录
秦海传媒根目录

三、SEO效果–robots.txt检测
域名:http://js.99288.net.cn
检测robots.txt效果:robots检测结果
实际robots.txt存放路径:robots实际存放

Google ADs

除非另有声明,本站文章遵循知识共享署名-非商业性使用 2.5 中国大陆许可协议。 Copyright © 2008-2012 99288.NET.CN.