分类 教程 下的文章

LLsMP是Linux+Litespeed+MYSQL+PHP的简称,意思就是在Linux的系统上配置的Litespeed,MySQL与PHP的一键安装包。LLsMP支持Centos 5/6、Debian 5/6、 Ubuntu 10/11。

LLsMP的好处就是采用了Litespeed,处理动态上比Nginx优秀,也比Nginx、Apache等网页服务器省资源,非常适合小内存的VPS。除此之外,LLsMP完全兼容Apache的mod_rewrite和.htaccess,免除像Nginx般需转换Rewrite规则的烦恼。

安装命令:

CentOS:
PHP5.2
wget http://llsmp.googlecode.com/files/llsmp0.6_centos.tar.gz;tar zxvf llsmp0.6_centos.tar.gz;cd centos;sh install.sh

PHP5.3
wget http://llsmp.googlecode.com/files/llsmp0.6_centos.tar.gz;tar zxvf llsmp0.6_centos.tar.gz;cd centos;sh install.sh php5.3

Debian:
PHP5.2
wget http://llsmp.googlecode.com/files/llsmp0.6_debian.tar.gz;tar zxvf llsmp0.6_debian.tar.gz;cd debian;sh install.sh

PHP5.3
wget http://llsmp.googlecode.com/files/llsmp0.6_debian.tar.gz;tar zxvf llsmp0.6_debian.tar.gz;cd debian;sh install.sh php5.3

Ubuntu:
PHP5.2
wget http://llsmp.googlecode.com/files/llsmp0.6_ubuntu.tar.gz;tar zxvf llsmp0.6_ubuntu.tar.gz;cd ubuntu;sh install.sh

PHP5.3
wget http://llsmp.googlecode.com/files/llsmp0.6_ubuntu.tar.gz;tar zxvf llsmp0.6_ubuntu.tar.gz;cd ubuntu;sh install.sh php5.3

注意安装PHP5.3版本完成之后要手动启动一下MYSQL
/etc/init.d/mysql start

安装完成后,就可以使用http://IP:7080登陆LiteSpeed轻松地创建虚拟主机,LLsMP还有很多扩展,可以方便地安装FTP等组件

有时候为了安装其他服务器网站软件,需要卸载vps默认安装的程序,一般国外的vps都会事先安装好apache php mysql等,我们先要卸载这些.如果没有安装这些,这个步骤可以跳过
使用ssh工具登陆,执行netstat -lnp 看看输出的内容里有没有相关httpd / php / mysql相关内容,如果有就执行以下命令卸载(一般国外的vps系统都集成了apache没有集成php和mysql)
卸载mysql
service mysqld stop

chkconfig –del mysqld

yum -y remove mysqld

卸载php,以netstat -lnp命令实际输出为准

service php stop(或者service php-cgi stop / service php-fpm stop)

chkconfig –del php(或者chkconfig –del php-cgi / chkconfig –del php-fpm)
yum -y remove php

卸载apache

service httpd stop

chkconfig –del httpd

yum -y remove httpd

Typecho的默认主题下的导航菜单只有主页和关于两个页面,为了方便网站访问者浏览就需要加入导航菜单,那又如何添加呢?其实还是挺简单的,可以在控制台>外观>编辑当前外观,在右侧的模板文件里找到header.php,修改这个文件就可以了,具体方法是,找到以下代码:

<a<?php if($this->is('index')): ?> class="current"<?php endif; ?> href="<?php $this->options->siteUrl(); ?>"><?php _e('首页'); ?></a><!--
                --><?php $this->widget('Widget_Contents_Page_List')->to($pages); ?><!--
                -->

然后在后边加入:导航栏显示的标签

后台界面很棒。
0.8的插件 主题完美兼容。。
下载地址: https://code.google.com/p/typecho/downloads/detail?name=0.9%2813.10.18%29-alpha.tar.gz&can=2&q=#makechanges

官方文章:http://typecho.org/archives/71/

安装方法: 删除所有旧文件。备份usr目录与数据库
上传新的全部文件。打开 http://你的博客网址/install.php
进行安装。使用你原来的数据库资料。
他会提示你是全新安装 还是 继续使用原来的旧数据。
选择使用原来的数据。
然后进入后台进行数据升级。再上传你之前的usr目录下的所有文件。这样就安装完成。

wordpree评论链接重定向方法已有很多人分享,但是对于typecho我却找不到类似这样的详细修改方法,typecho官方文档不完整,而我又是php菜鸟,所以折腾了好久才修改好。通过这次折腾让我更是怀念wordpress了。

打开var/Widget/Abstract/Comments.php文件,寻找

if ($this->url && $autoLink) { 
            echo '<a href="' , $this->url , '"' , ($noFollow ? ' rel="external nofollow"' : NULL) , '>' , $this->author , '</a>'; 
        } else { 
            echo $this->author; 
        }

修改为

if ($this->url && $autoLink) { 
            if(strpos($this->url, $this->options->siteUrl)!==false) { 
                echo '<a href="', $this->url, '">', $this->author, '</a>'; 
            } else { 
                echo '<a href="', $this->options->siteUrl, 'go.html?url=', urlencode($this->url), '"', ' rel="nofollow"', '>', $this->author, '</a>'; 
            } 
        } else { 
            echo $this->author; 
        }