Mar
11
一、设置单IP地址
vi /etc/syscionfig/network-scripts/ifcfg-eth0
DEVICE=eth0 #网卡设备名称
HWADDR="XX:XX:XX:XX:XX:XX" #网卡的MAC地址
ONBOOT="yes" #随机启动
BOOTPROTO=static #静态分配IP
IPADDR=*.*.*.* #要设置的IP地址
NETMASK=255.255.255.0 子网掩码(以实际为准)
GATEWAY=*.*.*.* #网关地址
二、添加连续的多个IP
vi /etc/sysconfig/network-scripts/ifcfg-eth0-range0
DEVICE=eth0
BOOTPROTO=static
IPADDR_START=192.168.1.30 #起始IP
IPADDR_END=192.168.1.90 #结束IP
CLONENUM_START=2 #网卡起始编号
NETMASK=子网掩码
ONBOOT="yes"
保存之后,重启网络服务即可生效
/etc/init.d/network restart
vi /etc/syscionfig/network-scripts/ifcfg-eth0
DEVICE=eth0 #网卡设备名称
HWADDR="XX:XX:XX:XX:XX:XX" #网卡的MAC地址
ONBOOT="yes" #随机启动
BOOTPROTO=static #静态分配IP
IPADDR=*.*.*.* #要设置的IP地址
NETMASK=255.255.255.0 子网掩码(以实际为准)
GATEWAY=*.*.*.* #网关地址
二、添加连续的多个IP
vi /etc/sysconfig/network-scripts/ifcfg-eth0-range0
DEVICE=eth0
BOOTPROTO=static
IPADDR_START=192.168.1.30 #起始IP
IPADDR_END=192.168.1.90 #结束IP
CLONENUM_START=2 #网卡起始编号
NETMASK=子网掩码
ONBOOT="yes"
保存之后,重启网络服务即可生效
/etc/init.d/network restart
Mar
11
WordPress
location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
WordPress Mu
location /{
server_name_in_redirect off;
port_in_redirect off;
rewrite ^.*/files/(.*) /wp-includes/ms-files.php?file=$1;
rewrite ^/files/(.+) /wp-includes/ms-files.php?file=$1;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) $1 last;
rewrite ^.+?(/.*\.php)$ $1 last;
rewrite ^ /index.php last;
}
}
Drupal
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
}
Twip
location /{
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php last;
}
}
Typecho
location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
Discuz
location / {
rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;
rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
}
Discuz X
location / {
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
rewrite ^([^\.]*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
if (!-e $request_filename) {
return 404;
}
}
Dabr
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
}
SaBlog
location / {
rewrite “^/date/([0-9]{6})/?([0-9]+)?/?$” /index.php?action=article&setdate=$1&page=$2 last;
rewrite ^/page/([0-9]+)?/?$ /index.php?action=article&page=$1 last;
rewrite ^/category/([0-9]+)/?([0-9]+)?/?$ /index.php?action=article&cid=$1&page=$2 last;
rewrite ^/category/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&curl=$1&page=$2 last;
rewrite ^/(archives|search|article|links)/?$ /index.php?action=$1 last;
rewrite ^/(comments|tagslist|trackbacks|article)/?([0-9]+)?/?$ /index.php?action=$1&page=$2 last;
rewrite ^/tag/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&item=$1&page=$2 last;
rewrite ^/archives/([0-9]+)/?([0-9]+)?/?$ /index.php?action=show&id=$1&page=$2 last;
rewrite ^/rss/([^/]+)/?$ /rss.php?url=$1 last;
rewrite ^/user/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&user=$1&page=$2 last;
rewrite sitemap.xml sitemap.php last;
rewrite ^(.*)/([0-9a-zA-Z\-\_]+)/?([0-9]+)?/?$ $1/index.php?action=show&alias=$2&page=$3 last;
}
Xnote
location / {
if (!-e $request_filename) {
rewrite "^/([A-Za-z0-9\-]{4,20})$" /index.php?url=$1 last;
}
}
Status.net
location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
PHP-Wind
location / {
rewrite ^thread-htm-tid-(\d+)-(.*).html thread.php?fid=$1 last;
rewrite ^read-htm-tid-(\d+)-(.*).html read.php?tid=$1 last;
rewrite ^commtopics-(.*)-(.*) thread.php?fid=$1&page=$2 last;
rewrite ^commtopics-(.*) thread.php?fid=$1&page=$2 last;
rewrite ^article-(.*)-(.*)-(.*).html read.php?tid=$1&page=$2&fpage=$3 last;
rewrite ^article-(.*)-(.*).html read.php?tid=$1&page=$2&fpage=$3 last;
rewrite ^article-(.*).html read.php?tid=$1 last;
rewrite ^read-htm-tid-(\d+)-(.*).html read.php\?tid=$1 last;
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last;
rewrite ^(.*)/u/([0-9]+)$ $1/u.php?uid=$2 last;
}
Bo-Blog
location / {
if (!-e $request_filename)
{
rewrite ^/post/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /read.php?entryid=$1&page=$2&part=$3 last;
rewrite ^/page/([0-9]+)/([0-9]+)/?$ /index.php?mode=$1&page=$2 last;
rewrite ^/starred/([0-9]+)/?([0-9]+)?/?$ /star.php?mode=$1&page=$2 last;
rewrite ^/category/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=category_$1&mode=$2&page=$3 last;
rewrite ^/archiver/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=archive&cm=$1&cy=$2&mode=$3&page=$4 last;
rewrite ^/date/([0-9]+)/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=showday_$1-$2-$3&mode=$4&page=$5 last;
rewrite ^/user/([0-9]+)/?$ /view.php?go=user_$1 last;
rewrite ^/tags/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ /tag.php?tag=$1&mode=$2&page=$3 last;
rewrite ^/component/id/([0-9]+)/?$ /page.php?pageid=$1 last;
rewrite ^/component/([^/]+)/?$ /page.php?pagealias=$1 last;
#Force redirection for old rules
rewrite ^/read\.php/([0-9]+)\.htm$ http://$host/post/$1/ permanent;
rewrite ^/post/([0-9]+)\.htm$ http://$host/post/$1/ permanent;
rewrite ^/post/([0-9]+)\_([0-9]+)\.htm$ http://$host/post/$1/$2/ permanent;
rewrite ^/post/([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/post/$1/$2/$3/ permanent;
rewrite ^/index\_([0-9]+)\_([0-9]+)\.htm$ http://$host/page/$1/$2/ permanent;
rewrite ^/star\_([0-9]+)\_([0-9]+)\.htm$ http://$host/starred/$1/$2/ permanent;
rewrite ^/category\_([0-9]+)\.htm$ http://$host/category/$1/ permanent;
rewrite ^/category\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/category/$1/$2/$3/ permanent;
rewrite ^/archive\_([0-9]+)\_([0-9]+)\.htm$ http://$host/archiver/$1/$2/ permanent;
rewrite ^/archive\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/archiver/$1/$2/$3/$4/ permanent;
rewrite ^/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/date/$1/$2/$3/ permanent;
rewrite ^/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/date/$1/$2/$3/$4/$5/ permanent;
#Filename alias
rewrite ^/([a-zA-Z0-9_-]+)/?([0-9]+)?/?([0-9]+)?/?$ /read.php?blogalias=$1&page=$2&part=$3 last;
}
}
location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
WordPress Mu
location /{
server_name_in_redirect off;
port_in_redirect off;
rewrite ^.*/files/(.*) /wp-includes/ms-files.php?file=$1;
rewrite ^/files/(.+) /wp-includes/ms-files.php?file=$1;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) $1 last;
rewrite ^.+?(/.*\.php)$ $1 last;
rewrite ^ /index.php last;
}
}
Drupal
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
}
Twip
location /{
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php last;
}
}
Typecho
location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
Discuz
location / {
rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;
rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
}
Discuz X
location / {
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
rewrite ^([^\.]*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
if (!-e $request_filename) {
return 404;
}
}
Dabr
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
}
SaBlog
location / {
rewrite “^/date/([0-9]{6})/?([0-9]+)?/?$” /index.php?action=article&setdate=$1&page=$2 last;
rewrite ^/page/([0-9]+)?/?$ /index.php?action=article&page=$1 last;
rewrite ^/category/([0-9]+)/?([0-9]+)?/?$ /index.php?action=article&cid=$1&page=$2 last;
rewrite ^/category/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&curl=$1&page=$2 last;
rewrite ^/(archives|search|article|links)/?$ /index.php?action=$1 last;
rewrite ^/(comments|tagslist|trackbacks|article)/?([0-9]+)?/?$ /index.php?action=$1&page=$2 last;
rewrite ^/tag/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&item=$1&page=$2 last;
rewrite ^/archives/([0-9]+)/?([0-9]+)?/?$ /index.php?action=show&id=$1&page=$2 last;
rewrite ^/rss/([^/]+)/?$ /rss.php?url=$1 last;
rewrite ^/user/([^/]+)/?([0-9]+)?/?$ /index.php?action=article&user=$1&page=$2 last;
rewrite sitemap.xml sitemap.php last;
rewrite ^(.*)/([0-9a-zA-Z\-\_]+)/?([0-9]+)?/?$ $1/index.php?action=show&alias=$2&page=$3 last;
}
Xnote
location / {
if (!-e $request_filename) {
rewrite "^/([A-Za-z0-9\-]{4,20})$" /index.php?url=$1 last;
}
}
Status.net
location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
PHP-Wind
location / {
rewrite ^thread-htm-tid-(\d+)-(.*).html thread.php?fid=$1 last;
rewrite ^read-htm-tid-(\d+)-(.*).html read.php?tid=$1 last;
rewrite ^commtopics-(.*)-(.*) thread.php?fid=$1&page=$2 last;
rewrite ^commtopics-(.*) thread.php?fid=$1&page=$2 last;
rewrite ^article-(.*)-(.*)-(.*).html read.php?tid=$1&page=$2&fpage=$3 last;
rewrite ^article-(.*)-(.*).html read.php?tid=$1&page=$2&fpage=$3 last;
rewrite ^article-(.*).html read.php?tid=$1 last;
rewrite ^read-htm-tid-(\d+)-(.*).html read.php\?tid=$1 last;
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last;
rewrite ^(.*)/u/([0-9]+)$ $1/u.php?uid=$2 last;
}
Bo-Blog
location / {
if (!-e $request_filename)
{
rewrite ^/post/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /read.php?entryid=$1&page=$2&part=$3 last;
rewrite ^/page/([0-9]+)/([0-9]+)/?$ /index.php?mode=$1&page=$2 last;
rewrite ^/starred/([0-9]+)/?([0-9]+)?/?$ /star.php?mode=$1&page=$2 last;
rewrite ^/category/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=category_$1&mode=$2&page=$3 last;
rewrite ^/archiver/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=archive&cm=$1&cy=$2&mode=$3&page=$4 last;
rewrite ^/date/([0-9]+)/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$ /index.php?go=showday_$1-$2-$3&mode=$4&page=$5 last;
rewrite ^/user/([0-9]+)/?$ /view.php?go=user_$1 last;
rewrite ^/tags/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$ /tag.php?tag=$1&mode=$2&page=$3 last;
rewrite ^/component/id/([0-9]+)/?$ /page.php?pageid=$1 last;
rewrite ^/component/([^/]+)/?$ /page.php?pagealias=$1 last;
#Force redirection for old rules
rewrite ^/read\.php/([0-9]+)\.htm$ http://$host/post/$1/ permanent;
rewrite ^/post/([0-9]+)\.htm$ http://$host/post/$1/ permanent;
rewrite ^/post/([0-9]+)\_([0-9]+)\.htm$ http://$host/post/$1/$2/ permanent;
rewrite ^/post/([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/post/$1/$2/$3/ permanent;
rewrite ^/index\_([0-9]+)\_([0-9]+)\.htm$ http://$host/page/$1/$2/ permanent;
rewrite ^/star\_([0-9]+)\_([0-9]+)\.htm$ http://$host/starred/$1/$2/ permanent;
rewrite ^/category\_([0-9]+)\.htm$ http://$host/category/$1/ permanent;
rewrite ^/category\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/category/$1/$2/$3/ permanent;
rewrite ^/archive\_([0-9]+)\_([0-9]+)\.htm$ http://$host/archiver/$1/$2/ permanent;
rewrite ^/archive\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/archiver/$1/$2/$3/$4/ permanent;
rewrite ^/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/date/$1/$2/$3/ permanent;
rewrite ^/showday\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\_([0-9]+)\.htm$ http://$host/date/$1/$2/$3/$4/$5/ permanent;
#Filename alias
rewrite ^/([a-zA-Z0-9_-]+)/?([0-9]+)?/?([0-9]+)?/?$ /read.php?blogalias=$1&page=$2&part=$3 last;
}
}
Mar
8
OWS是免费开源的运维管理平台,今天拿一台机器安装测试了下,功能上做的不错,只是还不够成熟。感兴趣的可以安装体验下,安装OWS的前提是你已经安装编译好了PHP+MYSQL环境。
一、下载源码文件
wget http://damo.openwebsa.org/down/ows_damo_v1.0.2_3.tar.gz
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c10.tar.gz#md5=30f822f19b02c3082cb1ba1d69be35dd
wget http://cdnetworks-kr-1.dl.sourceforge.net/project/mysql-python/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
二、编译安装
解压OWS文件并移到/usr/local/ows目录
# tar xvf ows_damo_v1.0.2_3.tar.gz
#mv ows /usr/local/ows
#chown -R nobody:nobody /usr/local/ows
#chmod 755 -R /usr/local/ows/unctrlsh/*
安装Python
#tar xvf Python-2.7.2.tgz
#cd Python-2.7.2
#./configure --prefix=/usr/local/ows/python
#make && make install
#/usr/local/ows/python/bin/python -V
Python 2.7.2
安装setuptools
#tar xzvf setuptools-0.6c10.tar.gz
#cd setuptools-0.6c10
#/usr/local/ows/python/bin/python setup.py build
#/usr/local/ows/python/bin/python setup.py install
安装MySQL-python
#which mysql_config
#tar xvf MySQL-python-1.2.3.tar.gz
#cd MySQL-python-1.2.3
#/usr/local/ows/python/bin/python setup.py build
#/usr/local/ows/python/bin/python setup.py install
三、创建数据库和导入数据库表
mysql>create database 数据库名 default charset utf8;
mysql>grant all privileges on 数据库名.* to 数据库用户名@127.0.0.1 identified by '数据库用户密码';
mysql>flush privileges;
数据库用户的权限可以只给:create,drop,delete,insert,update,select,lock tables。
然后导入数据库
#mysql -u数据库用户名 -p数据库用户密码 数据库名 < /usr/local/ows/openwebsa.sql
数据库导入之后需要修改ows数据库配置文件,一共需要修改两处
/usr/local/ows/ctrlphp/etc/ows_config.inc.php
/usr/local/ows/ctrlpy/etc/config.py
四、配置WEB页面
不管你用的是哪种支持PHP的WEB服务器软件,指定网站的目录为/usr/local/ows/ctrlphp就可以了,下面以APACHE别名的方式为例,打开apache的httpd.conf配置文件,添加如下内容:
Alias /ows /usr/local/ows/ctrlphp
<Directory "/usr/local/ows/ctrlphp">
Options +SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
保存之后,重新启动apache
五、启动相关服务
启动服务端
#cd /usr/local/ows/ctrlpy/
#chmod 755 ows_service.sh
#./ows_service.sh start
启动客户端
#cd /usr/local/ows/unctrlpy/
#chmod 755 ows_service.sh
#./ows_service.sh start
查看进程是否运行
# ps aux | grep py
查看监听端口
# netstat -tulnp | grep py
使用浏览器打开 http://ip/ows 登陆web管理平台
默认的账号:openwebsa 密码:openwebsa
进去之后别忘记修改密码,官方的演示地址是:http://damo.openwebsa.org 感兴趣的朋友可以进去看看,此管理平台目前来看还不是很完善,大家测出问题可以向官方反馈,以便程序尽快完善。
一、下载源码文件
wget http://damo.openwebsa.org/down/ows_damo_v1.0.2_3.tar.gz
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c10.tar.gz#md5=30f822f19b02c3082cb1ba1d69be35dd
wget http://cdnetworks-kr-1.dl.sourceforge.net/project/mysql-python/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
二、编译安装
解压OWS文件并移到/usr/local/ows目录
# tar xvf ows_damo_v1.0.2_3.tar.gz
#mv ows /usr/local/ows
#chown -R nobody:nobody /usr/local/ows
#chmod 755 -R /usr/local/ows/unctrlsh/*
安装Python
#tar xvf Python-2.7.2.tgz
#cd Python-2.7.2
#./configure --prefix=/usr/local/ows/python
#make && make install
#/usr/local/ows/python/bin/python -V
Python 2.7.2
安装setuptools
#tar xzvf setuptools-0.6c10.tar.gz
#cd setuptools-0.6c10
#/usr/local/ows/python/bin/python setup.py build
#/usr/local/ows/python/bin/python setup.py install
安装MySQL-python
#which mysql_config
#tar xvf MySQL-python-1.2.3.tar.gz
#cd MySQL-python-1.2.3
#/usr/local/ows/python/bin/python setup.py build
#/usr/local/ows/python/bin/python setup.py install
三、创建数据库和导入数据库表
mysql>create database 数据库名 default charset utf8;
mysql>grant all privileges on 数据库名.* to 数据库用户名@127.0.0.1 identified by '数据库用户密码';
mysql>flush privileges;
数据库用户的权限可以只给:create,drop,delete,insert,update,select,lock tables。
然后导入数据库
#mysql -u数据库用户名 -p数据库用户密码 数据库名 < /usr/local/ows/openwebsa.sql
数据库导入之后需要修改ows数据库配置文件,一共需要修改两处
/usr/local/ows/ctrlphp/etc/ows_config.inc.php
/usr/local/ows/ctrlpy/etc/config.py
四、配置WEB页面
不管你用的是哪种支持PHP的WEB服务器软件,指定网站的目录为/usr/local/ows/ctrlphp就可以了,下面以APACHE别名的方式为例,打开apache的httpd.conf配置文件,添加如下内容:
Alias /ows /usr/local/ows/ctrlphp
<Directory "/usr/local/ows/ctrlphp">
Options +SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
保存之后,重新启动apache
五、启动相关服务
启动服务端
#cd /usr/local/ows/ctrlpy/
#chmod 755 ows_service.sh
#./ows_service.sh start
启动客户端
#cd /usr/local/ows/unctrlpy/
#chmod 755 ows_service.sh
#./ows_service.sh start
查看进程是否运行
# ps aux | grep py
查看监听端口
# netstat -tulnp | grep py
使用浏览器打开 http://ip/ows 登陆web管理平台
默认的账号:openwebsa 密码:openwebsa
进去之后别忘记修改密码,官方的演示地址是:http://damo.openwebsa.org 感兴趣的朋友可以进去看看,此管理平台目前来看还不是很完善,大家测出问题可以向官方反馈,以便程序尽快完善。
Mar
8
1、基本类
http://top.baidu.com 百度搜索排行
http://index.baidu.com 百度指数
https://adwords.google.cn/select/KeywordToolExternal 谷歌关键词工具
http://www.google.cn/trends 谷歌搜索引擎趋势
http://sitemap.cn.yahoo.com Yahoo外部链接工具
http://siteexplorer.search.yahoo.com 网站分析(英文)
http://www.zhuici.com/ 关键词分析
http://www.pipiki.com/ 网站价值评估
http://www.linkhelper.cn/ 友情链接查询
2、拓展类
http://tool.chinaz.com/Tools/Robot.aspx 搜索蜘蛛模拟抓取
http://www2.baidu.com/inquire/price.php 百度关键词竞价查询
http://www.xml-sitemaps.com/ 网站地图在线制作
http://www.webconfs.com/similar-page-checker.php 网站相似度查询
http://tool.motoricerca.info/robots-checker.phtml robots文件在线检查工具
http://ping.chinaz.com/ 多个地点ping服务器
http://dns.aizhan.com/ IP反查域名(查询同一IP下有多少个网站)
http://top.baidu.com 百度搜索排行
http://index.baidu.com 百度指数
https://adwords.google.cn/select/KeywordToolExternal 谷歌关键词工具
http://www.google.cn/trends 谷歌搜索引擎趋势
http://sitemap.cn.yahoo.com Yahoo外部链接工具
http://siteexplorer.search.yahoo.com 网站分析(英文)
http://www.zhuici.com/ 关键词分析
http://www.pipiki.com/ 网站价值评估
http://www.linkhelper.cn/ 友情链接查询
2、拓展类
http://tool.chinaz.com/Tools/Robot.aspx 搜索蜘蛛模拟抓取
http://www2.baidu.com/inquire/price.php 百度关键词竞价查询
http://www.xml-sitemaps.com/ 网站地图在线制作
http://www.webconfs.com/similar-page-checker.php 网站相似度查询
http://tool.motoricerca.info/robots-checker.phtml robots文件在线检查工具
http://ping.chinaz.com/ 多个地点ping服务器
http://dns.aizhan.com/ IP反查域名(查询同一IP下有多少个网站)
Mar
5
一、下载需要的文件
二、编译软件
Apache HTTP Server项目团队称,这是最新的、也是最好的一个版本,添加了许多新的模块,扩展了现有的功能,增强了灵活性。众多的性能及功能改进,使得该版本更适合日益流行的云环境。
该版本的主要改进包括:
改善了服务器性能(减少了资源利用,增强了并发能力)
支持异步I/O
动态反向代理配置
比纯事件驱动的Web服务器的性能更好
更精准的超时和资源利用限制能力
增强了微调缓存支持,专为高流量服务器和代理服务器打造
wget http://labs.renren.com/apache-mirror//httpd/httpd-2.4.1.tar.gz
wget http://apache.etoak.com//apr/apr-1.4.6.tar.gz
wget http://apache.etoak.com//apr/apr-util-1.4.1.tar.gz
wget http://apache.etoak.com//apr/apr-1.4.6.tar.gz
wget http://apache.etoak.com//apr/apr-util-1.4.1.tar.gz
二、编译软件
tar xzvf apr-1.4.6.tar.gz
cd apr-1.4.6
./configure --prefix=/usr/local/apr
make && make install
cd ..
tar xzvf apr-util-1.4.1.tar.gz
cd apr-util-1.4.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
cd ..
tar xzvf httpd-2.4.1.tar.gz
cd httpd-2.4.1/
./configure --prefix=/usr/local/webserver/apache --enable-so --enable-modules=all --enable-mods-shared=all --enable-vhost-alias --enable-deflate --enable-expires --enable-rewrite --enable-authn-dbm=shared --enable-ssl --with-ssl --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/
make && make install
cd apr-1.4.6
./configure --prefix=/usr/local/apr
make && make install
cd ..
tar xzvf apr-util-1.4.1.tar.gz
cd apr-util-1.4.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
cd ..
tar xzvf httpd-2.4.1.tar.gz
cd httpd-2.4.1/
./configure --prefix=/usr/local/webserver/apache --enable-so --enable-modules=all --enable-mods-shared=all --enable-vhost-alias --enable-deflate --enable-expires --enable-rewrite --enable-authn-dbm=shared --enable-ssl --with-ssl --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/
make && make install
Apache HTTP Server项目团队称,这是最新的、也是最好的一个版本,添加了许多新的模块,扩展了现有的功能,增强了灵活性。众多的性能及功能改进,使得该版本更适合日益流行的云环境。
该版本的主要改进包括:
改善了服务器性能(减少了资源利用,增强了并发能力)
支持异步I/O
动态反向代理配置
比纯事件驱动的Web服务器的性能更好
更精准的超时和资源利用限制能力
增强了微调缓存支持,专为高流量服务器和代理服务器打造