DedeCMS部署 怎样去部署Apache+Mysql+PHP(LAMP)?
声明:部署DedeCMS,在网上搜了很多资料,包括这个论坛,几乎没有发现在linux下部署的现成资料可以参考。
遂,自己把整个部署过程中一些重要的点记录下来,一是算做自己的劳动成果,同时,期望对曾经和我一样迷茫,不知如何部署 的XDJM们一个参考。谢谢
DedeCMS部署--怎样去部署Apache+Mysql+PHP(LAMP)?
1. Linux OS:
Linux OS:Red Hat Enterprise Linux AS release 4 (Nahant Update 6)
2.Deploy Apache
2.1 下载Apache
下载Apache2
source from http://httpd.apache.org/ ,直接下载在/root下,解压tar包php-5.2.13。
2.2 编译 apache
cd httpd-2.2.15,进行编译,生成Makefile
./configure
--prefix=/usr/local/apache \ --指定apache安装目录
--enable-so \
--enable-cgi \
--enable-info \
--enable-rewrite \
--enable-speling \
--enable-usertrack \
--enable-de
相关文档:
在向表中插入数据的时候,经常遇到这样的情况:1. 首先判断数据是否存在; 2. 如果不存在,则插入;3.如果存在,则更新。
在 SQL Server 中可以这样处理:
if not exists (select 1 from t where id = 1) insert into t(id, update_time) values(1, getdate()) else update t set update_time = getdate() where id = ......
1. 给root加密码:/usr/bin/mysqladmin -u root password 123456
2. 导出:mysqldump -u root -p dbname > file.sql
3. 导入:mysql -u root -p dbname < backup-file.sql
4. 授权:grant all on *.* to root@"%" identified by "密码";
5. 收回权限:revoke all privileges on *.* from root@"%";
6. 登录:mys ......
写入时,先做encode:
public static String encode(String src) {
String result = null;
try {
result = new String(src.getBytes("gbk"), "ISO-8859-1");
} catch (UnsupportedEncodingException uee) {
System.err.println(uee);
}
return result;
}
读出时,再做decode:
public static String deco ......
$thunder = ("Thunder://QUFodHRwOi8vNjAuMTkxLjYwLjEwODo4MDgwL3hweGlhemFpL0RlZXBpbl9HaG9zdF9YUF9WMTguMC5pc29aWg==");
//解密它
$thunder = trim($thunder,'Thunder://');
$c_thunder = base64_decode($thunder);
$c_thunder = ltrim(rtrim($c_thunder,'ZZ'),'AA');
//out [url]http://60.191.60.108:8080/xpxi ......
注意的有几点,hosted模式下RequestBuilder读取server的json有问题,用本地文件代替即可。
Zend_Json默认输出的json数据不能被读取,必须加[和]...
echo "[";
echo Zend_Json::encode($myconfig);
echo "]";
简单读取json的例子:
package com.esbrain.client;
import com.esbrain.sha ......