最近關注LNMP的搭建伺服器技術,並自己獨立組建網站伺服器,我將遇到的問題列出來以便日後參考,往後我會隨時更新部落格。
/data0/mysql/3306/mysql: line 28: unexpected EOF while looking for matching `)'
/data0/mysql/3306/mysql: line 42: syntax error: unexpected end of file
[root@localhost 3306]# error: Found option without preceding group in config file: /data0/mysql/3306/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
WARNING: Defaults file '/data0/mysql/3306/my.cnf' not found!
error: Found option without preceding group in config file: /data0/mysql/3306/my.cnf at line: 1
Fatal error in defaults handling. Program aborted
WARNING: Defaults file '/data0/mysql/3306/my.cnf' not found!
touch: cannot touch `/usr/local/webserver/mysql/var/localhost.localdomain.err': No such file or directory
chown: cannot access `/usr/local/webserver/mysql/var/localhost.localdomain.err': No such file or directory
/usr/local/webserver/mysql/bin/mysqld_safe: line 107: /usr/local/webserver/mysql/var/localhost.localdomain.err: No such file or directory
/usr/local/webserver/mysql/bin/mysqld_safe: line 144: /usr/local/webserver/mysql/var/localhost.localdomain.err: No such file or directory
/usr/local/webserver/mysql/bin/mysqld_safe: line 107: /usr/local/webserver/mysql/var/localhost.localdomain.err: No such file or directory
connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists
[root@localhost etc]# /usr/local/webserver/php/sbin/php-fpm start
Starting php_fpm PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20060613/pdo.mysql.so' - /usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20060613/pdo.mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
eAccelerator: Could not allocate 67108864 bytes, the maximum size the kernel allows is 33554432 bytes. Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax.
PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0
failed
[root@localhost /]# /usr/local/webserver/php/sbin/php-fpm start
Starting php_fpm eAccelerator: Could not allocate 67108864 bytes, the maximum size the kernel allows is 33554432 bytes. Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax.
PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0
failed
解決方案:echo 128000000 > /proc/sys/kernel/shmmax
[root@localhost sbin]# /usr/local/webserver/nginx/sbin/nginx
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: still could not bind()
[root@localhost ~]# /usr/local/webserver/nginx/sbin/nginx
[warn]: conflicting server name "192.168.208.131" on 0.0.0.0:80, ignored
[root@localhost ~]# service nginx start
nginx: unrecognized service
502 bad gateway!
no input file specified
403 Forbidden
本文出自 “James” 部落格,轉載請與作者聯絡!