今天比较悲催,本来想复制一个库,没想到把原来的库的数据给整没了,找了所有的地方发现只找到了29号的binlog日志和25号的备份。
只能先恢复到25号,然后把29号的binlog导入进去,但是因为日志时间不对,导致很多冲突,只用binlog命令恢复了两个binlog日志,其他都是通过source恢复的,命令如下:
#mysqlbinlog --start-date='2011-08-25 00:00:00'
--stop-date='2011-08-31 10:05:00'
/usr/local/mysql5.1.53/var/mysql-bin.000001
|/usr/local/mysql5.1.53/bin/mysql -uuser -ppwd
#mysqlbinlog --start-date='2011-08-25 00:00:00'
--stop-date='2011-08-31 10:05:00'
/usr/local/mysql5.1.53/var/mysql-bin.000004>/tmp/aaa.sql
进入mysql命令行
>user aa;
>source /tmp/aaa.sql;
[root@test log]#
[root@test log]# ntpdate 10.154.8.200
6 Sep 09:35:09 ntpdate[30210]: the NTP socket is in use,
exiting
[root@test log]#
[root@test init.d]# pwd
/etc/rc.d/init.d
[root@test init.d]# ./ntpd stop
Shutting down ntpd: [ OK ]
[root@test init.d]# ntpdate 10.154.8.200
6 Sep 09:37:19 ntpdate[30658]: step time server 10.161.8.200 offset
-51.869609 sec
[root@test init.d]# ntpdate 10.161.8.200
6 Sep 09:37:20 ntpdate[30659]: adjust time server 10.161.8.200
offset -0.000145 sec
[root@test init.d]# ntpdate 10.161.8.200
6 Sep 09:37:21 ntpdate[30662]: adjust time server 10.161.8.200
offset -0.000036 sec
[root@test init.d]# ntpdate 10.161.8.200
6 Sep 09:37:22 ntpdate[30663]: adjust time server 10.161.8.200
offset -0.000041 sec
[root@test init.d]#
或在 # setup 进入服务关闭ntpd服务。
1.需要装openssl
2.编译apache是加入--enable-ssl 选项
3.在apache的httpd.conf里加入 Listen 443 ,这样就可以监听443 端口了
在用https 协议访问就可以了
1.查看tcp的80端口所占用的进程
$sudo netstat -atunp | grep 80
2.如何根据端口号来查看进程号
# lsof -i:631
或
$sudo /usr/sbin/lsof -i:80
今天碰到了把程序发布到预发布环境session不可用的问题,解决方法如下:
1. 打开所有的错误提示error_reporting(E_ALL);
2. 打开phpinfo找问题。
3. 我的session是保存在文件里的,查看文件是否能写入,如果是保存在mem里面的,要查看memcache是否可写入。
4. 最后一条查看系统时间,我的就是这个问题,预发布环境的时间没有做同步,导致session失效。
所以做了同步时间的操作,在crontab里写入如下 */30 * * * * /usr/sbin/ntpdate
ntp1.ops.a-inc.com
碰到firefox会把自己cookie中的值填充到他任何匹配的地方,如果不想要这种匹配,只需要在form标签里加
a utocomplete='off' 这个即可。
比如我最近的修改密码,他会把用户原来的密码给放进去,就是加了这个参数就ok了
1. 如果出现如下错误,ssl_error_rx_unexpected_new_session_ticket
需要在httpd.conf里配置如下一句话:
SSLProtocol all
-TLSv1 -SSLv2
1.
建分支的目的,即如果要新开项目,但是框架又包含在项目里,比如原来有个项目a,我们想创建项目b,并且用项目a里的框架或者其他,并且我们想在项目b中对框架的改变能同步到项目a中,这时我们就需要开分支。
2. 怎么开分支
选中项目a,右键选择branches/tag ,在弹出的框中
上面显示的是项目a的地址,下面是你要把项目b放到某个目录下,选择目录点击确定,就会把你项目a下的所有东西同步到项目b的目录下。
3. 怎么合并。
当你在b下改变了框架的某个文件,这个文件有bug,原来项目a也要改,这时候需要把b的修改合并到项目a中,怎么做呢,直接选中项目b中修改过的文件,右键
选择merger,出现三个选项,选第三个,这时候你所做的更改就同步到项目a中了
建分支建好了,很神奇。
在window下安装xdebug
先看自己的php版本,一般查看方法用phpinfo() 函数查看得到自己的php相关信息,如我的php信息如下:
PHP Version 5.3.3
| System |
Windows NT 5.1 build 2600 (Windows XP Professional Service Pack
3) i586 |
|
| Build Date |
Jul 21 2010 20:00:47 |
|
| Compiler |
MSVC6 (Visual C++ 6.0) |
|
| Architecture |
x86 |
|
windows下一般安装的系统都是32位的,这里找到vc 6.0
,在去找对应的php版本的xdebug,所有对应的xdebug如下:
1. 在linux下执行 /usr/local/apache/bin/apachectl start ,
毫无反应,再次执行restart发现启动apache失败。
2. 去apache的目录下的logs下查看错误日志,发现以下内容:
[Thu Feb 17 13:58:55 2011] [alert] (EAI 2)Name or service not
known: mod_unique_id: unable to find IPv4 address of
'AY110216044557c'
Configuration Failed
3. 针对上述错误的解决办法为:
#vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1
localhost.localdomain localhost
::1
localhost6.localdomain6 localhost6
修改 127.0.0.。。。那行为
127.0.0.1 AY110216044557c
localhost.localdomain localhost
即可。
4. 若出现以下错误
httpd: Could not reliably determine the server's fully qualified
domain name, us