訊息:

Discuz! info: MySQL Query Error

User: admin
Time: 2011-4-24 8:02am
Script: /admincp.php

SQL: SELECT *, f.fid AS fid FROM [Table]forums f
LEFT JOIN [Table]forumfields ff USING (fid)
WHERE f.fid='86'
Error: SELECT command denied to user 'xxxxxxxx'@'localhost' for column 'fid' in table 'f'
Errno.: 1143

解決方法:

应该是数据没有导入完整,UTF8导入是经常出错的,
最好的恢复数据方式是后台备份再后台导入,弱点:耗时~

 

 

mybeauty 發表在 痞客邦 留言(0) 人氣()

目录属性在FTP里设置,linux设置成777,如果已经设置了还是不能上传的话,有可能是服务器限制了数据库的一些动作,一般虚拟主机才会这样。
试试先在后台备份一下,提示失败以后去文件目录里看forumdata里面,有一个backup_******的文件夹,把名字复制下来,然后删除此文件夹,再新建一个同名的文件夹,再设置其属性为777。
然后再回discuz后台备份数据,看看能否成功。
反正我是成功了,虽然有点麻烦。

 

 

mybeauty 發表在 痞客邦 留言(0) 人氣()

刚完成了在CentOS5.5安装Zend Optimizer插件的任务,以前老版本 Zend Optimizer的安装方法是运行安装脚本 ./install.sh,新的Zend Optimizer 3.3.9没有安装脚本,只能按
照以下方法安装。
# wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
可以根据自己操作系统的需要下载32bit或者64bit的压缩包
解压缩下载的文件包(x86):
# tar -zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
# cd ZendOptimizer-3.3.9-linux-glibc23-i386
这里要注意,进入data文件夹后,so文件是对应版本的,看好PHP版本再安装,我的是5.2版本的

在 /usr/local/webserver/ 下新建 /Zend/lib 目录  “/usr/local/webserver/”是你php、mysql的安装目录
把 ZendOptimizer.so 文件拷贝到 /usr/local/webserver/Zend/lib 下
# cp ZendOptimizer.so /usr/local/webserver/Zend/lib/
进入php安装目录
# cd /usr/local/webserver/php/etc
把下列两行加入php.ini,不要加入任何空格和制表符
zend_optimizer.optimization_level=15
zend_extension=/usr/local/webserver/Zend/lib/ZendOptimizer.so
重启Nginx和php环境
# /usr/local/webserver/nginx/sbin/nginx -s reload
# /usr/local/webserver/php/sbin/php-fpm restart
再看看你的phpinfo 大功告成啦!

-------------

上面的步驟有些要修正。

(1) ZendOptimizer.so放哪邊都可以,記得/etc/php.ini加入
zend_optimizer.optimization_level=15
zend_extension=/usr/local/webserver/Zend/lib/ZendOptimizer.so
即可

(2)重啟nginx和php-fpm
/etc/ini.d/nginx restart

/etc/ini.d/php-pfm

 

mybeauty 發表在 痞客邦 留言(0) 人氣()

這一篇寫的最簡單清楚,一定要看

http://blog.shian.tw/centos-install-nginx-and-php-fpm.html

 

mybeauty 發表在 痞客邦 留言(0) 人氣()

剛剛碰到了怪事, 在命令列下無法登入 mysql  驚訝

ERROR 1045 (28000): Access denied for user '=root'@'localhost' (using password: YES)

系統是 Ubuntu 8.041 server + MySQL

密碼是安裝 Ubuntu 系統時設定的

但是用 phpMyAdmin - 2.11.3deb1ubuntu1 但可以正確登入 @@

不過問題已解決, 解決方式如下..

# service mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[5523]: started


# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>



進去了, 再設定一次密碼..

mysql> UPDATE user SET Password=PASSWORD('xxxxxxxxxxxxxxx') where USER='root';
mysql> FLUSH PRIVILEGES;

mysql> \q

# service mysqld restart

# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> \q

這樣就可以正常登入了  奸笑 奸笑

mybeauty 發表在 痞客邦 留言(0) 人氣()

到Zend下載Zend Optimizer,(下載時要註冊,就填個e-mail就行了,很容易的)

我發現它的安裝方法和網路上分享的不一樣。大概是新的方法有改過。

但是步驟是挺簡單的,如下

1. Extract the Zend Optimizer package.

2. Locate the ZendOptimizer.so (Unix) or ZendOptimizer.dll (Windows) file in the directory which
   corresponds to your version of PHP (4.3.x, 4.4.x, 5.0.x, 5.1.x, 5.2.x).

2. Add the following line to your php.ini file:
   Linux and Mac OS X:     zend_extension=<full_path_to_ZendOptimizer.so>
   Windows:                zend_extension_ts=<full_path_to_ZendOptimizer.dll>
   Windows non-thread safe: zend_extension=<full_path_to_ZendOptimizer.dll>
   (*) The Windows non-thread safe binary is only used with Zend Core 2.0.
 
3. Restart your Web server.

 

mybeauty 發表在 痞客邦 留言(0) 人氣()

這個問題我找了很多方法,最後google出來的第2篇寫的最簡單好用。

錯誤訊息

治療方法

Firstly in your my.cnf

remove '--skip-bdb'

Try to start it again /etc/init.d/mysqld start

it also seems like you have upgraded to a newer version 5.1 so you will need to run mysql_upgrade once the server is running

 
]FAILED[  :Starting MySQL
 . starttoMySQL Daemon failed
mysqld start /d.init/etc/ #

mybeauty 發表在 痞客邦 留言(0) 人氣()

上網找了方法,這一版滿好用的。

vim /etc/yum.repos.d/utterramblings.repo

輸入

[utterramblings]
name=Jason’s Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

最後安裝

yum install httpd php

 

mybeauty 發表在 痞客邦 留言(0) 人氣()

真是有點難裝,因為裝完一直連不上。

這一篇中國大陸的文章不錯,照著裝就會動了。

http://hi.baidu.com/afantihome/blog/item/df03a0169df9fc14962b432b.html

 

CentOS下安装FreeNX远程桌面
2010-04-14 13:14

在CentOS 4.4 下安装比较简单,先确保 sshd 服务启动并运行在 22 端口,然后检查 expect 和 nc 这个两个包是否安装了。

运行 yum install freenx

server 端的安装就结束了。



[root@mail ~]# rpm -qa | grep freenx
[root@mail ~]# yum install freenx
Setting up Install Process
Setting up repositories
update                    100% |=========================|  951 B    00:00     
base                      100% |=========================| 1.1 kB    00:00     
addons                    100% |=========================|  951 B    00:00     
extras                    100% |=========================| 1.1 kB    00:01     
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for freenx to pack into transaction set.
freenx-0.7.3-2.el4.centos 100% |=========================|  14 kB    00:01     
---> Package freenx.i386 0:0.7.3-2.el4.centos set to be updated
--> Running transaction check
--> Processing Dependency: nx >= 2.0.0 for package: freenx
--> Processing Dependency: /usr/bin/expect for package: freenx
--> Processing Dependency: expect for package: freenx
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for expect to pack into transaction set.
expect-5.42.1-1.i386.rpm  100% |=========================|  13 kB    00:03     
---> Package expect.i386 0:5.42.1-1 set to be updated
---> Downloading header for nx to pack into transaction set.
nx-3.3.0-14.el4.centos.i3 100% |=========================|  18 kB    00:01     
---> Package nx.i386 0:3.3.0-14.el4.centos set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
freenx                  i386       0.7.3-2.el4.centos  extras             92 k
Installing for dependencies:
expect                  i386       5.42.1-1         base              148 k
nx                      i386       3.3.0-14.el4.centos  extras            2.7 M

Transaction Summary
=============================================================================
Install      3 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         
Total download size: 2.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): expect-5.42.1-1.i3 100% |=========================| 148 kB    00:19     
(2/3): nx-3.3.0-14.el4.ce 100% |=========================| 2.7 MB    06:49     
(3/3): freenx-0.7.3-2.el4 100% |=========================|  92 kB    00:08     
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: nx                           ######################### [1/3]
Installing: expect                       ######################### [2/3]
Installing: freenx                       ######################### [3/3]
Stopping sshd:[  OK  ]
Starting sshd:[  OK  ]
Starting freenx-server:  [  OK  ]


Installed: freenx.i386 0:0.7.3-2.el4.centos
Dependency Installed: expect.i386 0:5.42.1-1 nx.i386 0:3.3.0-14.el4.centos
Complete!
[root@mail ~]# rpm -qa | grep freenx
freenx-0.7.3-2.el4.centos
然后:
[root@mail ~]# /usr/bin/nxsetup --install
------> It is recommended that you use the NoMachine key for
easier setup. If you answer "y", FreeNX creates a custom
KeyPair and expects you to setup your clients manually.
"N" is default and uses the NoMachine key for installation.

Do you want to use your own custom KeyPair? [y/N] ySetting up /etc/nxserver ...done
Setting up /var/lib/nxserver/db ...done
Setting up /var/log/nxserver.log ...done
Adding user "nx" to group "utmp" ...done
Setting up known_hosts and authorized_keys2 ...done
Setting up permissions ...done
Setting up cups nxipp backend ...done

----> Testing your nxserver configuration ...
Warning: Could not find nxdesktop in /usr/bin. RDP sessions won't work.
Warning: Could not find nxviewer in /usr/bin. VNC sessions won't work.
Warning: Invalid value "APPLICATION_LIBRARY_PRELOAD=/usr/lib/libX11.so.6.2:/usr/lib/libXext.so.6.4:/usr/lib/libXcomp.so.2:/usr/lib/libXcompext.so:/usr/lib/libXrender.so.1.2". /usr/lib/libX11.so.6.2 could not be found. Users will not be able to run a single application in non-rootless mode.
Warning: Invalid value "COMMAND_START_CDE=cdwm"
Users will not be able to request a CDE session.
Warning: Invalid cupsd version of "/usr/sbin/cupsd". Need version 1.2.
Users will not be able to enable printing.
Error: Could not find 1.5.0 or 2.[01].0 or 3.[01].0 version string in nxagent. NX 1.5.0 or 2.[01].0 or 3.[012].0 backend is needed for this version of FreeNX.

Warnings occured during config check.
To enable these features please correct the configuration file.

<---- done

----> Testing your nxserver connection ...
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
RSA key fingerprint is 17:e1:f2:33:b4:a1:f7:8d:1f:e3:5a:ba:f8:1d:90:3a.
Are you sure you want to continue connecting (yes/no)?
Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts.
HELLO NXSERVER - Version 3.2.0-73 OS (GPL, using backend: not detected)
NX> 105 quit
Quit
NX> 999 Bye
<--- done

Ok, nxserver is ready.

PAM authentication enabled:
All users will be able to login with their normal passwords.

PAM authentication will be done through SSH.
Please ensure that SSHD on localhost accepts password authentication.

You can change this behaviour in the /etc/nxserver/node.conf file.
Have Fun!

添加ENABLE_PASSDB_AUTHENTICATION="1" 到 /etc/nxserver/node.conf.


[root@mail ~]# nxserver --adduser kevin 
NX> 100 NXSERVER - Version 3.2.0-73 OS (GPL, using backend: not detected)
NX> 1000 NXNODE - Version 3.2.0-73 OS (GPL, using backend: not detected)
NX> 716 Public key added to: /home/kevin/.ssh/authorized_keys2
NX> 1001 Bye.
NX> 999 Bye
[root@mail ~]# nxserver --passwd kevin
NX> 100 NXSERVER - Version 3.2.0-73 OS (GPL, using backend: not detected)
New password:
Password changed.
NX> 999 Bye
[root@mail ~]# nxsetup --install --setup-nomachine-key
Setting up /etc/nxserver ...done
Setting up /var/lib/nxserver/db ...done
Setting up /var/log/nxserver.log ...done
Adding user "nx" to group "utmp" ...done
Setting up known_hosts and authorized_keys2 ...done
Setting up permissions ...done
Setting up cups nxipp backend ...done

----> Testing your nxserver configuration ...
Warning: Could not find nxdesktop in /usr/bin. RDP sessions won't work.
Warning: Could not find nxviewer in /usr/bin. VNC sessions won't work.
Warning: Invalid value "APPLICATION_LIBRARY_PRELOAD=/usr/lib/libX11.so.6.2:/usr/lib/libXext.so.6.4:/usr/lib/libXcomp.so.2:/usr/lib/libXcompext.so:/usr/lib/libXrender.so.1.2". /usr/lib/libX11.so.6.2 could not be found. Users will not be able to run a single application in non-rootless mode.
Warning: Invalid value "COMMAND_START_CDE=cdwm"
Users will not be able to request a CDE session.
Warning: Invalid cupsd version of "/usr/sbin/cupsd". Need version 1.2.
Users will not be able to enable printing.
Error: Could not find 1.5.0 or 2.[01].0 or 3.[01].0 version string in nxagent. NX 1.5.0 or 2.[01].0 or 3.[012].0 backend is needed for this version of FreeNX.

Warnings occured during config check.
To enable these features please correct the configuration file.

<---- done

----> Testing your nxserver connection ...
HELLO NXSERVER - Version 3.2.0-73 OS (GPL, using backend: not detected)
NX> 105 quit
Quit
NX> 999 Bye
<--- done

Ok, nxserver is ready.

PAM authentication enabled:
All users will be able to login with their normal passwords.

PAM authentication will be done through SSH.
Please ensure that SSHD on localhost accepts password authentication.

You can change this behaviour in the /etc/nxserver/node.conf file.
Have Fun!

=======
启动、查看、停止nx命令 # nxserver --start: 启动NX服务器 nxserver --stop: 停止NX服务器 nxserver --status: 查看NX服务器 nxserver --restart: 重新启动NX服务器 nxserver --help: 查看帮助信息 如果你在使用 iptables防火墙,你必需打开相应端口: # iptables -A INPUT -i lo -s 127.0.0.1 -j ACCEPT #iptables -A INPUT -p tcp --dport 22 -j ACCEPT #iptables -A OUTPUT -p udp --sport 22 -j ACCEPT # iptables -A INPUT -p tcp --dport 5000 -j ACCEPT #iptables -A OUTPUT -p udp --sport 5000 -j ACCEPT 说明:NxFree服务器完全依赖于SSH进行工作,所以请先确保Linux服务器的Openssh配置无误。
=======


下载客户端:
http://www.nomachine.com/download.php

mybeauty 發表在 痞客邦 留言(0) 人氣()

Existing lock /var/run/yum.pid: another copy is running錯誤解決

如果在安裝套裝軟體過程中出現以下錯誤
Existing lock /var/run/yum.pid: another copy is running. Aborting.錯誤,
Loading “installonlyn” plugin
Existing lock /var/run/yum.pid: another copy is running. Aborting.
如果出現上述錯誤,可以通過以下方法解決,在終端中輸入
[root@localhost ~]# rm -f /var/run/yum.pid
[root@localhost ~]# /etc/init.d/yum-updatesd stop
停止yum-updatesd:[確定]
列出倉庫可用包
#yum list available
升級系統
# yum update
檢查系統可用更新
# yum check-update

 

mybeauty 發表在 痞客邦 留言(0) 人氣()