Archive

Author Archive

DirectAdmin下安装Zend Opitimizer

August 4th, 2012 No comments

DirectAdmin下手动安装Zend Opitimizer:

cd /usr/local/src
mkdir zend
cd zend
wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
tar -xzvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
cd ZendOptimizer-3.3.9-linux-glibc23-i386
cd data
cd 5_2_x_comp
cp ZendOptimizer.so /usr/local/lib/ZendOptimizer_5.2.so

注意cd 5_2_x_comp ,这里是因为我使用php 5.2.7所以选择这个,如果你是5.1或者其他版本就要进入相关目录才行
修改配置文件

vi /usr/local/lib/php.ini
在最后面加入
[zend]
zend_optimizer.optimization_level=15
zend_extension=/usr/local/lib/ZendOptimizer_5.2.so

然后重启下httpd服务,用phpinfo()查看,发现了
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies

Directadmin磁盘配额权限设置

August 4th, 2012 No comments

Directadmin安装完毕,建立reseller或者user的时候,提示如下:
Unix User created successfully
Error with system Quotas
setquota: Mountpoint (or device) / not found or has no quota enabled. setquota: Not all specified mountpoints are using quota.

Debug Guide
User’s data directory created successfully
Domains directory created successfully
Domains directory created successfully in user’s home.
其实Directadmin官方网站的帮助里面已经提到了解决办法,Disk Usage is showing 0.00,仔细把这个帖子读读,一定能找到解决方法。http://help.directadmin.com/item.php?id=42

DA面板如何建立子域名

August 4th, 2012 No comments

访问http://linode.laoyihost.com看看什么情况,当然前提是你得把子域名解析好。

DA面板站点转向功能可实现301跳转

August 4th, 2012 2 comments

DA面板本身已经带了301跳转的功能,很多朋友可能对这个不熟悉,下面以把http://www.laoyihost.com跳转到http://www.yihost.net为例,说明DA面板如何实现301跳转。

超简单文本编辑器nano用法

August 4th, 2012 No comments

nano挺简单的,有必要学下,可以作为vi的补充。具体用法以Ctrl-G的屏幕显示为例,Ctrl-Y代表翻前页,Ctrl-V代表往后翻页,Ctrl-P往前一行,Ctrl-N往后一行,M-\是按下alt,再按下-,再按下\,代表回到第一行,M-/是按下alt,再按下-,再按下/代表回到最后一行。

此图是进入nano的默认页面,nano可以新建文件或者读取文件,以上图显示的几个快捷方式做简单说明,Ctrl-G显示帮助文件,Ctrl-X离开,会询问是否保存文件,Ctrl-O保存文件,Ctrl-J调整文件内容,Ctrl-R读取某文件到正在编辑的文件里,Ctrl-W查询某字符,Ctrl-K剪切,Ctrl-U撤销剪切,Ctrl-C显示行列字符信息,Ctrl-T检查拼写错误。

附nano用法英文说明:Main nano help text

 The nano editor is designed to emulate the functionality and ease-of-use of the UW Pico text editor.  There are four main
 sections of the editor.  The top line shows the program version, the current filename being edited, and whether or not the
 file has been modified.  Next is the main editor window showing the file being edited.  The status line is the third line
 from the bottom and shows important messages.  The bottom two lines show the most commonly used shortcuts in the editor.

 The notation for shortcuts is as follows: Control-key sequences are notated with a caret (^) symbol and can be entered
 either by using the Control (Ctrl) key or pressing the Escape (Esc) key twice.  Escape-key sequences are notated with the
 Meta (M-) symbol and can be entered using either the Esc, Alt, or Meta key depending on your keyboard setup.  Also,
 pressing Esc twice and then typing a three-digit decimal number from 000 to 255 will enter the character with the
 corresponding value.  The following keystrokes are available in the main editor window.  Alternative keys are shown in
 parentheses:

^G      (F1)            Display this help text
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph

^R      (F5)            Insert another file into the current one
^W      (F6)            Search for a string or a regular expression
^Y      (F7)            Move to the previous screen
^V      (F8)            Move to the next screen

^K      (F9)            Cut the current line and store it in the cutbuffer
^U      (F10)           Uncut from the cutbuffer into the current line
^C      (F11)           Display the position of the cursor
^T      (F12)           Invoke the spell checker, if available

^_      (F13)   (M-G)   Go to line and column number
^\      (F14)   (M-R)   Replace a string or a regular expression
^^      (F15)   (M-A)   Mark text at the cursor position
        (F16)   (M-W)   Repeat last search

M-^             (M-6)   Copy the current line and store it in the cutbuffer
M-}                     Indent the current line
M-{                     Unindent the current line

^F                      Move forward one character

^B                      Move back one character
^Space                  Move forward one word
M-Space                 Move back one word
^P                      Move to the previous line
^N                      Move to the next line

^A                      Move to the beginning of the current line
^E                      Move to the end of the current line
M-(             (M-9)   Move to the beginning of the current paragraph
M-)             (M-0)   Move to the end of the current paragraph
M-\             (M-|)   Move to the first line of the file
M-/             (M-?)   Move to the last line of the file

M-]                     Move to the matching bracket
M–             (M-_)   Scroll up one line without scrolling the cursor
M-+             (M-=)   Scroll down one line without scrolling the cursor

M-<             (M-,)   Switch to the previous file buffer
M->             (M-.)   Switch to the next file buffer

M-V                     Insert the next keystroke verbatim
^I                      Insert a tab at the cursor position
^M                      Insert a newline at the cursor position
^D                      Delete the character under the cursor
^H                      Delete the character to the left of the cursor
M-T                     Cut from the cursor position to the end of the file

M-J                     Justify the entire file
M-D                     Count the number of words, lines, and characters
^L                      Refresh (redraw) the current screen

M-X                     Help mode enable/disable
M-C                     Constant cursor position display enable/disable
M-O                     Use of one more line for editing enable/disable
M-S                     Smooth scrolling enable/disable
M-P                     Whitespace display enable/disable
M-Y                     Color syntax highlighting enable/disable
M-H                     Smart home key enable/disable
M-I                     Auto indent enable/disable
M-K                     Cut to end enable/disable
M-L                     Long line wrapping enable/disable
M-Q                     Conversion of typed tabs to spaces enable/disable

M-B                     Backup files enable/disable
M-F                     Multiple file buffers enable/disable
M-M                     Mouse support enable/disable
M-N                     No conversion from DOS/Mac format enable/disable
M-Z                     Suspension enable/disable

Categories: linux基础 Tags: ,

info page几个常用的按键

August 4th, 2012 No comments

 

按键 进行工作
空格键 向下翻一页
[Page Down] 向下翻一页
[Page Up] 向上翻一页
[tab] 在 node 之间移动,有 node 的地方,通常会以 * 显示。
[Enter] 当光标在 node 上面时,按下 Enter 可以进入该 node 。
b 移动光标到该 info 画面当中的第一个 node 处
e 移动光标到该 info 画面当中的最后一个 node 处
n 前往下一个 node 处
p 前往上一个 node 处
u 向上移动一层
s(/) 在 info page 当中进行搜寻
h 显示求助菜单
? 命令一览表
q 结束这次的 info page

 

info page几个常用的按键。以上转自鸟哥Linux私房菜基础篇第三版。

Categories: linux基础 Tags: ,

man page常见的几个数字的意义

August 4th, 2012 No comments
代号 代表内容
1 使用者在shell环境中可以操作的命令或可运行文件
2 系统核心可呼叫的函数与工具等
3 一些常用的函数(function)与函式库(library),大部分为C的函式库(libc)
4 装置文件的说明,通常在/dev下的文件
5 配置文件或者是某些文件的格式
6 游戏(games)
7 惯例与协议等,例如Linux文件系统、网络协议、ASCII code等等的说明
8 系统管理员可用的管理命令
9 跟kernel有关的文件

以上转自鸟哥linux私房菜基础篇第三版。

Categories: linux基础 Tags: ,