分类: LINUX
2010-01-06 15:47:44
[arch@myhost ~]$ yaourt -S lighttpd
:: The following packages will be downloaded:
[extra]
lighttpd
:: Number of Packages: 1
:: Total Download Size: 0.28 MiB
:: Total Installed Size: 0.86 MiB
:: Proceed with download? [Y/n] y
……
正在解决依赖关系...
正在查找内部冲突...
目标 (1): lighttpd-1.4.22-3
全部下载大小: 0.00 MB
全部安装大小: 0.86 MB
进行安装吗? [Y/n] y
正在检查软件包完整性...
(1/1) 正在检查文件冲突 [#############################################################] 100%
(1/1) 正在安装 lighttpd [#############################################################] 100%
lighttpd 的可选依赖
libxml2: mod_webdav
e2fsprogs: mod_webdav
lua: mod_cml/mod_magnet
libmysqlclient: mod_mysql_vhost
sqlite3: mod_webdav
gdbm: mod_trigger_b4_dl
[arch@myhost ~]$ yaourt -S fcgi
:: The following packages will be downloaded:
[extra]
fcgi
:: Number of Packages: 1
:: Total Download Size: 0.06 MiB
:: Total Installed Size: 0.21 MiB
:: Proceed with download? [Y/n] y
……
正在解决依赖关系...
正在查找内部冲突...
目标 (1): fcgi-2.4.0-5
全部下载大小: 0.00 MB
全部安装大小: 0.21 MB
进行安装吗? [Y/n] y
正在检查软件包完整性...
(1/1) 正在检查文件冲突 [############################################################] 100%
(1/1) 正在安装 fcgi [############################################################] 100%
[arch@myhost ~]$ yaourt -S mysql
:: The following packages will be downloaded:
[extra]
mysql
:: Number of Packages: 1
:: Total Download Size: 24.94 MiB
:: Total Installed Size: 55.10 MiB
:: Proceed with download? [Y/n] y
……
正在解决依赖关系...
正在查找内部冲突...
目标 (3): libmysqlclient-5.1.34-1 mysql-clients-5.1.34-1 mysql-5.1.34-1
全部下载大小: 11.98 MB
全部安装大小: 86.86 MB
进行安装吗? [Y/n] y
:: 正在从 extra 软件仓库获取软件包...
libmysqlclient-5.1.... 11.7M 48.3K/s 00:04:09 [############################################################] 100%
mysql-clients-5.1.3... 250.7K 52.7K/s 00:00:05 [############################################################] 100%
正在检查软件包完整性...
(3/3) 正在检查文件冲突 [#############################################################] 100%
(1/3) 正在安装 libmysqlclient [#############################################################] 100%
(2/3) 正在安装 mysql-clients [#############################################################] 100%
(3/3) 正在安装 mysql [#############################################################] 100%
mysql 的可选依赖
perl-dbi
perl-dbd-mysql
[arch@myhost ~]$ yaourt -S php
:: The following packages will be downloaded:
[extra]
php
:: Number of Packages: 1
:: Total Download Size: 8.68 MiB
:: Total Installed Size: 24.12 MiB
:: Proceed with download? [Y/n] y
……
正在解决依赖关系...
正在查找内部冲突...
目标 (1): php-5.2.9-3
全部下载大小: 0.00 MB
全部安装大小: 24.12 MB
进行安装吗? [Y/n] y
正在检查软件包完整性...
(1/1) 正在检查文件冲突 [############################################################] 100%
(1/1) 正在安装 php [############################################################] 100%
php 的可选依赖
bzip2: bz2
curl: curl
gdbm: dba
libpng: gd
libjpeg: gd
freetype2: gd
pam: imap
libldap: ldap
libmcrypt: mcrypt
libtool: mcrypt
libmysqlclient: mysql/mysqli/pdo_mysql
unixodbc: odbc/pdo_odbc
openssl: openssl
postgresql-libs: pgsql/pdo_pgsql
aspell: pspell
net-snmp: snmp
sqlite3: pdo_sqlite
tidyhtml: tidy
libxslt: xsl
mhash: mhash
gmp: gmp
[arch@myhost ~]$ yaourt -S postgresql
:: The following packages will be downloaded:
[extra]
postgresql
:: Number of Packages: 1
:: Total Download Size: 6.43 MiB
:: Total Installed Size: 25.70 MiB
:: Proceed with download? [Y/n] y
……
正在解决依赖关系...
正在查找内部冲突...
目标 (2): postgresql-libs-8.3.7-1 postgresql-8.3.7-2
全部下载大小: 0.43 MB
全部安装大小: 27.10 MB
进行安装吗? [Y/n] y
……
正在检查软件包完整性...
(2/2) 正在检查文件冲突 [###########################################################] 100%
(1/2) 正在安装 postgresql-libs [###########################################################] 100%
(2/2) 正在安装 postgresql [###########################################################] 100%
[arch@myhost ~]$ yaourt -S phpmyadmin phppgadmin pgadmin3
:: The following packages will be downloaded:
[extra]
wxgtk
[community]
libpq++ pgadmin3 phpmyadmin phppgadmin
:: Number of Packages: 5
:: Total Download Size: 15.00 MiB
:: Total Installed Size: 51.32 MiB
:: Proceed with download? [Y/n] y
……
正在解决依赖关系...
正在查找内部冲突...
目标 (5): phpmyadmin-3.1.4-1 phppgadmin-4.2.2-1 wxgtk-2.8.9.2-1 libpq++-4.0-2 pgadmin3-1.10.0beta2-1
全部下载大小: 0.00 MB
全部安装大小: 51.32 MB
进行安装吗? [Y/n] y
正在检查软件包完整性...
(5/5) 正在检查文件冲突 [############################################################] 100%
(1/5) 正在安装 phpmyadmin [############################################################] 100%
phpmyadmin 的可选依赖
libmcrypt: to use phpMyAdmin internal authentication
(2/5) 正在安装 phppgadmin [#############################################################] 100%
(3/5) 正在安装 wxgtk [#############################################################] 100%
(4/5) 正在安装 libpq++ [#############################################################] 100%
(5/5) 正在安装 pgadmin3 [#############################################################] 100%ps:其实可以只用一条命令把上面所有的软件包一起安装
lighttpd、mysql的停止启动命令(root身份执行)
/etc/rc.d/lighttpd stop|start|restart
/etc/rc.d/mysqld stop|start|restart
若要开机自启动lighttpd、mysqld服务,可在/etc/rc.conf文件中的DAEMONS项添加相应的服务
[arch@myhost ~]$ tail /etc/rc.conf
# ———————————————————————–
# DAEMONS
# ———————————————————————–
#
# Daemons to start at boot-up (in this order)
# – prefix a daemon with a ! to disable it
# – prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network netfs crond sshd alsa hal fam gdm lighttpd mysqld)
修改/etc/lighttpd/lighttpd.conf,增加”mod_fastcgi”模块(即取消其前面的#号)并打开相应的服务。
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi” )
#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"
)
)
)修改/etc/lighttpd/lighttpd.conf,打开关于目录浏览的一些选项
###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/srv/http/vhosts/"
#simple-vhost.default-host = ""
#simple-vhost.document-root = "/htdocs/"
##
## Format: .html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/usr/share/lighttpd/errors/status-"
#server.errorfile-prefix = "/srv/http/errors/status-"
## virtual directory listings
dir-listing.activate = "enable"
## select encoding for directory listings
dir-listing.encoding = "utf-8"
## enable debugging
#debug.log-request-header = "enable"
#debug.log-response-header = "enable"
#debug.log-request-handling = "enable"
#debug.log-file-not-found = "enable"修改/etc/php/php.ini,加载相应的动态扩展库
; available extensions ; ;extension=bcmath.so ;extension=bz2.so ;extension=calendar.so ;extension=curl.so ;extension=dba.so ;extension=dbase.so ;extension=exif.so ;extension=ftp.so extension=gd.so extension=gettext.so ;extension=gmp.so ;extension=iconv.so ;extension=imap.so ;extension=json.so ;extension=ldap.so extension=mcrypt.so ;extension=mhash.so ;extension=mime_magic.so extension=mysql.so extension=mysqli.so ;extension=ncurses.so ;extension=odbc.so ;extension=openssl.so extension=pdo.so extension=pdo_mysql.so ;extension=pdo_odbc.so extension=pdo_pgsql.so ;extension=pdo_sqlite.so extension=pgsql.so ;extension=posix.so ;extension=pspell.so extension=session.so ;extension=shmop.so ;extension=snmp.so ;extension=soap.so ;extension=sockets.so ;extension=sqlite.so ;extension=sysvmsg.so ;extension=sysvsem.so ;extension=sysvshm.so ;extension=tidy.so ;extension=xmlrpc.so ;extension=xsl.so ;extension=zip.so extension=zlib.so
测试,在/srv/http/目录下编辑一个 index.html 和 test.php 文件
index.html的文件内容
It Works !
test.php的文件内容
phpinfo();
?>
在浏览器中分别输入 、/test.php,查看输出效果。
1、phpmyadmin中配置文件现在需要绝密的短语密码的解决方法
‘blowfish_secret’用一个任意字符串作为cookie的加密字符串,如果没有加密钥匙,系统会显示“配置文件现在需要绝密的短语密码(blowfish_secret) “ ,修改配置如下:
vi /srv/http/phpMyAdmin/config.inc.php
/*
* This is needed for cookie based authentication to encrypt password in cookie
*/
$cfg['blowfish_secret'] = ‘fhc2007′; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */(其中的”fhc2007″自定义)
ps:phpMyAdmin初始安装后并没有config.inc.php文件,而是config.sample.inc.php文件,所以可以修改config.sample.inc.php并把它更名为config.inc.php
(暂时记下这么多吧,以后有问题再补充)