| Subcribe via RSS

mysql远程连接:Too many connections,mysql unauthenticated user

10月 29th, 2008 | 1 Comment | Posted in 空间制作

几台机器做轮循的时候,独立了一台机器做数据库,当其他机器远程连接的db数据库的时候,总是出现Too many connections,重启几次,进入了msyql进程,发现很多unauthenticated user,百度了下解释说有一个线程在处理客户端的连接,但是该客户端还没通过用户验证,导致原因可能是Mysql在做DNS反向解析。

解决方法,在mysqld_safe 后面加 –skip-name-resolve,启动,ok

Tags: , ,

cannot restore segment prot after reloc: Permission denied

10月 26th, 2008 | No Comments | Posted in 空间制作

在装完Zend后,php启动不了,查了半天日志,出现这个。
Starting php_fpm Failed loading /usr/local/webserver/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so: /usr/local/webserver/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied

在linux上安装有些东西时会出现 Permission denied 的情况:以下就是解决它的办法之一
编辑/etc/selinux/config,找到这段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing

把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
……

编辑/etc/sysconfig/selinux,找到:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing

如果SELINUX已经是 SELINUX=disabled,那么就不用改了,否则就把SELINUX=enforcing 注释掉,新加一行:
SELINUX=disabled
保存,退出。

如果你碰到其他类似提示:
cannot restore segment prot after reloc: Permission denied
哪应该是SELinux的问题,可以考虑把它关闭。
————————————————————————————-
郁闷的是.我把SELinux关闭后还是不行.于是到google上search.发现这个很有用.
在你保证SElinux 被disable后.还执行下
chcon -t texrel_shlib_t
如: chcon -t texrel_shlib_t /路径/路径/名字.so (这个文件视具体执行文件.)

以上两步.已经解决了很多server的问题了.

简单安装pureftpd+mysql+manager

10月 15th, 2008 | No Comments | Posted in 空间制作

从http://www.pureftpd.org下载最新的pure-ftpd软件,这里的版本是1.0.21

#wget -c http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.21.tar.gz
#tar zxvf pure-ftpd-1.0.21.tar.gz
#cd pure-ftpd-1.0.21
#./configure –-prefix=/usr/local/pureftpd –-with-mysql=/usr/local/webserver/mysql/ –-with-puredb –-with-shadow –-with-pam=/etc/log.d/scripts/services/pam -–with-paranoidmsg -–with-welcomemsg –-with-uploadscript –-with-cookie –-with-virtualchroot –-with-virtualhosts –-with-virtualroot –with-diraliases –with-quotas –with-sysquotas –-with-ratios –-with-ftpwho –-with-throttling –-with-language=simplified-chinese

注意pam的路径和mysql路径,不然出错。

在完成后,看到如下的信息,就说明当前选项的编译配置没有问题,可以进行下一步了。

configure: +——————————————————–+
configure: | You can subscribe to the Pure-FTPd users mailing-list |
configure: | to ask for help and to stay informed of new releases. |
configure: | Go to http://www.pureftpd.org/ml/ now! |
configure: +——————————————————–+

在当前目录下执行,

#make
#make check
#make install
#cd configuration-file
#chmod u+x pure-config.pl
#cp pure-config.pl /usr/local/sbin/
#mkdir -p /usr/local/pureftpd/etc
#cp pure-ftpd.conf /usr/local/pureftpd/etc/
#chmod +x /usr/local/sbin/pure-config.pl

下载http://machiel.generaal.net/
#wget -c http://machiel.generaal.net/files/pureftpd/ftp_v2.1.tar.gz
#tar zxvf ftp_v2.1.tar.gz
#cp -R ftp /home/webroot/ftp
#cd /home/webroot/ftp/
#chmod -R 777 config.php

安装完成后,复制代码 nano /usr/local/etc/pureftpd-mysql.conf,保存,注意格式

修改nano /usr/local/pureftpd/etc/pure-ftpd.conf
找到mysql 修改路径为/usr/local/etc/pureftpd-mysql.conf

启动
#/usr/local/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf

在IE中输入FTP地址,直接就OK了,网上看很多资料,都弄的好复杂。。。其实就这么几步。。。以后就可以按这个来。

Tags: , ,