Author Topic: 请教 lighttpd + MySQL + PHP环境搭建的问题!  (Read 1460 times)

0 Members and 1 Guest are viewing this topic.

jizong

  • Guest
请教 lighttpd + MySQL + PHP环境搭建的问题!
« on: May 30, 2009, 10:36:59 am »
wugi大侠,您好~
我是一个MSS的玩家(经改造后的128MB,超频到300HZ)
一直使用你封装的Debian在搭建 Lighttpd + MySQL + PHP环境,希望在MSS上搭建论坛。
由于自己对linux和debian了解不多,常常反复多次,始终不得成功,其间遇到一些问题,希望向您请教



1、关于更新源及安装环境的问题
Code: [Select]
   更新源在原教程中,是使用的
   
Code: [Select]
deb http://mirrors.shlug.org/debian/ etch main contrib non-free
deb http://mirrors.shlug.org/debian-security etch/updates main contrib non-free
deb http://mirrors.shlug.org/debian/ proposed-updates main non-free contrib
   

在您的LMP教程中,您是用
   
Code: [Select]
deb http://debian-bcm47xx.googlecode.com files/
   

这样,会导致
   
Code: [Select]
apt-get update
apt-get install mysql php libpcre lighttpd libfam0
   
中的libfam0无法安装。这个我检查过您的Packages.gz列表,确认,没有这个安装包。

    所以,请问wugi大侠,您搭建LMP的环境是怎么样的?是不是安装DEBIAN后,先用原更新,进行文件

更新后,再用deb http://debian-bcm47xx.googlecode.com files/更新安装的?


2、关于MYSQL的问题
   MYSQL一直是个大问题~~感谢您在这次帖子中,指出了解决的方法。但是,可能是由于我的操作不够熟

练,对DEBIAN和MYSQL不了解,在安装过程中,也遇到一些问题。
   在是用您的GOOGLE更新源之后,确实能够安装MYSQL了。也根据您的提示,增加了mysql用户等,但是

,在进行mysql_install_db的时候,出现了很多错误提示吧。

Code: [Select]
(none):~# groupadd mysql
groupadd: group mysql exists
(none):~# useradd -g mysql -s /sbin/nologin -d /dev/null mysql
useradd: user mysql exists
(none):~# mysql_install_db
/usr/bin/my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Fatal error in defaults handling. Program aborted
WARNING: The host '(none)' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
/usr/sbin/mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
Fatal error in defaults handling. Program aborted
/usr/sbin/mysqld: File '/var/log/mysql/mysql-bin.index' not found (Errcode: 2)
090529 18:51:15 [ERROR] Aborting

090529 18:51:15 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com/.  Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/scripts/mysqlbug script!


3、是否需要安装php5-mysql?
   但是,我每次安装的时候,就告诉我
Code: [Select]
(none):/# apt-get install php5-mysql
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  php5-mysql: Depends: libmysqlclient15off (>= 5.0.27-1) but it is not going to be installed
E: Broken packages

但是我更新libmysqlclient15off的时候,又告诉我,它是最新版本,不能更新~~





问题较多,较杂
希望能够得到指点,谢谢~~~

另外,在您的google更新源中,安装lighttpd也会出现目录不存在(是指www目录)的问题~~

wugi

  • Administrator
  • Newbie
  • *****
  • Posts: 44
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #1 on: May 30, 2009, 11:04:21 am »
原來的apt更新不需要移除, 我的apt設定如下

deb http://debian.linux.org.tw/debian etch main
deb http://mirrors.kernel.org/debian etch main
deb http://debian-bcm47xx.googlecode.com files/

接著
apt-get update
apt-get install mysql php libpcre lighttpd libfam0

至於 libmysqlclient15off 不須要安裝
在安裝完php套件的時候就有包含那個檔了

mysql 的部份先建立一個 /etc/mysql/conf.d/ 的目錄再試一次, 另外可以把錯誤的log貼出來看看

jizong

  • Guest
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #2 on: May 30, 2009, 11:21:15 am »
好的,谢谢!
我马上尝试一下~~~

呵呵呵,谢谢!
有问题,再请教!

jizong

  • Guest
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #3 on: May 30, 2009, 11:54:42 am »
WARNING: The host '(none)' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
/usr/sbin/mysqld: File '/var/log/mysql/mysql-bin.index' not found (Errcode: 2)
090529 20:53:23 [ERROR] Aborting

090529 20:53:23 [Note] /usr/sbin/mysqld: Shutdown complete


Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

You can try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant &

and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mysql -u root mysql
    mysql> show tables

Try 'mysqld --help' if you have problems with paths.  Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com/.  Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.  Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!  And remember, if
you do mail us, you MUST use the /usr/scripts/mysqlbug script!


错误是这个信息~~~~

请wugi大侠指点~

jizong

  • Guest
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #4 on: May 30, 2009, 04:43:48 pm »
我已经创建了/etc/mysql/conf.d/
但是,还是出现错误了!

等待解答啊~~

请问,除了论坛发帖子外,还有什么方法能及时的联系到你啊?
嘿嘿~~心切,心急啊

wugi

  • Administrator
  • Newbie
  • *****
  • Posts: 44
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #5 on: May 30, 2009, 11:28:19 pm »
可以加我的msn, bluewugi@gmail.com

wugi

  • Administrator
  • Newbie
  • *****
  • Posts: 44
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #6 on: June 03, 2009, 10:44:07 am »
總結這次造成安裝無法啟動的問題

php 包缺少 libmhash2, libmcrypt4, libltdl3, libfreetype63, libpng12-0, libjpeg62, libcurl, libxml2 等的相依
mysql 包安裝說還需建立
/etc/mysql/conf.d/
/var/lib/mysql
/var/run/mysqld
/var/log/mysqld

The above permissions should be mysql:mysql
下一個release 時會修正這次發現的問題  :)

jizong

  • Guest
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #7 on: June 27, 2009, 12:36:30 am »
最近,我的MSS出了点问题~~~
可能需要重新装一下了~~·

不知道,大侠您是否更新了MYSQL的安装包呢?嘿嘿~~等着呢~

wugi

  • Administrator
  • Newbie
  • *****
  • Posts: 44
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #8 on: June 29, 2009, 01:53:35 pm »
現在在想要怎麼搞install script, 要先研究下  :D

jizong

  • Guest
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #9 on: July 04, 2009, 07:56:33 pm »
老大,不好意思,又来麻烦了·····在安装PHP的时候,我安装了其他的组件了,但是,在安装libfreetype63的时候,出现了以下的问题,请帮我看看,谢谢!

Code: [Select]
(none):~# apt-get install libfreetype63
Reading package lists... Done
Building dependency tree... Done
Package libfreetype63 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libfreetype63 has no installation candidate

jizong

  • Guest
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #10 on: July 04, 2009, 08:01:13 pm »
安装PHP又有这个提示,不好意思哈,老大!!

Code: [Select]
(none):~# apt-get install php
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  php: Depends: libfreetype63 but it is not installable
E: Broken packages

wugi

  • Administrator
  • Newbie
  • *****
  • Posts: 44
回覆: 请教 lighttpd + MySQL + PHP环境搭建的问题!
« Reply #11 on: July 07, 2009, 12:29:24 pm »
剛在Debian的網站上查了一下並沒有libfreetype63 這個套件, 只有libfreetype6 ...
看來應該是PHP相依套件設錯了.... :(

PS: libfreetype6 主要好像是給PHP GD用的

 

anything