一、安装系统环境
1、系统:centos5
2、测试在vm5.5
准备软件
lighttpd-1.4.18
下载地址
mysql-5.0.41
part1下载地址
part2下载地址
part3下载地址
php-5.2.3
下载地址
SupeSite/X-Space
part1下载地址
part2下载地址
part3下载地址
discuz
下载地址
二、搭建web服务器安装过程
1、mysql5安装
$ tar zxvf mysql-5.0.27.tar.gz
$ cd mysql-5.0.27
# groupadd mysql
# useradd -g mysql mysql
# ./configure --prefix=/data/apps/mysql
# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf
# cd /data/apps/mysql
# bin/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql var
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2、lighttpd安装
# tar -zxvf lighttpd-1.4.18.tar.gz
# cd lighttpd-1.4.18
# ./configure --prefix=/data/apps/lighttpd
# make
# make install
# mkdir /data/apps/lighttpd/conf
# mkdir /data/app ......
一、安装系统环境
1、系统:centos5
2、测试在vm5.5
准备软件
lighttpd-1.4.18
下载地址
mysql-5.0.41
part1下载地址
part2下载地址
part3下载地址
php-5.2.3
下载地址
SupeSite/X-Space
part1下载地址
part2下载地址
part3下载地址
discuz
下载地址
二、搭建web服务器安装过程
1、mysql5安装
$ tar zxvf mysql-5.0.27.tar.gz
$ cd mysql-5.0.27
# groupadd mysql
# useradd -g mysql mysql
# ./configure --prefix=/data/apps/mysql
# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf
# cd /data/apps/mysql
# bin/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql var
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2、lighttpd安装
# tar -zxvf lighttpd-1.4.18.tar.gz
# cd lighttpd-1.4.18
# ./configure --prefix=/data/apps/lighttpd
# make
# make install
# mkdir /data/apps/lighttpd/conf
# mkdir /data/app ......
一、安装系统环境
1、系统:centos5
2、测试在vm5.5
准备软件
lighttpd-1.4.18
下载地址
mysql-5.0.41
part1下载地址
part2下载地址
part3下载地址
php-5.2.3
下载地址
SupeSite/X-Space
part1下载地址
part2下载地址
part3下载地址
discuz
下载地址
二、搭建web服务器安装过程
1、mysql5安装
$ tar zxvf mysql-5.0.27.tar.gz
$ cd mysql-5.0.27
# groupadd mysql
# useradd -g mysql mysql
# ./configure --prefix=/data/apps/mysql
# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf
# cd /data/apps/mysql
# bin/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql var
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2、lighttpd安装
# tar -zxvf lighttpd-1.4.18.tar.gz
# cd lighttpd-1.4.18
# ./configure --prefix=/data/apps/lighttpd
# make
# make install
# mkdir /data/apps/lighttpd/conf
# mkdir /data/app ......
//创建文件夹的方法
//$path 为文件夹参数,如 (c:/program files/makedir)
function createFolders($path) {
if (!file_exists($path)) {
$this->createFolders(dirname($path));
mkdir($path, 0777);
}
}
/////////////////////////
删除文件夹的方法(文件夹里有文件和没有文件都能删除)
function deldir($dir) {
$dh=opendir($dir);
while ($file=readdir($dh)) {
if($file!="." && $file!="..") {
$fullpath=$dir."/".$file;
if(!is_dir($fullpath)) {
unlink($fullpath);
} else {
$this->deldir($fullpath);
&nb ......
PHP Security for Deployers
If you're a Developer
READ THIS and then work with your SysAdmins to step through any and all the layers of security designed to protect your apps.
Example:
Traffic must first pass through a SPI firewall (ensure that ONLY necessary ports/protocols are permitted; ensure that EGRESS BLOCKING is in place so that if your system IS compromised it will be very difficult for the attacker to send data back or attack someone else via the Network Layer. (Need reference; "traditional" SPI-based firewall security).
Traffic may then pass through an in-line IPS (Intrusion Prevention System) to filter out network-based attacks against the OS, web platform, or PHP framework itself
Traffic may then pass through a WAF (Web Application Firewall) such as ModSecurity or a commercial WAF to defeat basic script-based attacks
Traffic may then pass through an additional layer of security such as PHP-IDS to identify other attacks or concerns.
By the time traffic has pa ......
我发现很多的PHP程序员,尤其是学习还不是很久的,都不知道PHP的精华所在。Perl当年如何在商界出名?其强大的正则表达式。而PHP呢?他是一门从Unix下发展起来的语言,当然也就继承了Perl的很多特点,同时C的优点都有。快速、简洁、明了,尤其是C程序员,PHP是至爱,我就是深爱着“PHP”(都忘了女友了:))。这里,我想来写一篇PHP的变量、数组应用技巧和PHP的正则表达式、PHP的模板应用,以后有时间再写PHP与COM、PHP与XML的完全结合。
1、变量、数组的应用技巧
(1)很多人用得不多的数组函数。foreach、list、each。分别举几个例子,应该就能知道了。例:
<?php
$data = array('a' => 'data1', 'b' => 'data2', 'c' => 'data3');
while(list($subscript, $value) = each($data))
{
echo "$subscript => $value :: ";
echo "$subscript => $value <br>";
}
reset($data);
foreach($data as $subscript => $value)
{&nbs ......
用到的XML文件还以“Php Xml处理之simplexml使用方法浅谈”一文中的XML为例,文件名为:me.xml。代码如下:
PHP XML处理XML代码
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
phplamp
>
<
post
>
<
title
id
=
"1"
>
PHP XML处理介绍一
</
title
>
<
details
>
详细内容一
</
details
>
</
post
>
<
post
>
<
title
id
=
"2"
>
PHP XML处理介绍二
</
title
>
<
details
>
详细内容二
</
details
>
&n ......
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
http://www.5ilinux.com/lamp01.html
关键字:apache+mysql+php apache mysql php 配置 lamp 服务器 web
Linux+Apache+Mysql+PHP典型配置
调试环境:Redhat9.0 Apache1.3.29 Mysql3.23.58 PHP4.3.4
Linux系统的安装我就不讲了,这是基本功,其实这篇文章在类似Redhat的其他linux也应该通用,大家只要掌握我提供的方法就行。记得安装Redhat9。0的时候不要安装系统默认的apache,mysql和php以及相关的软件。已经安装的请用rpm -e * 删除已经安装的包。
1.安装Mysql3.23.58
其实老实说直接安装Mysql官方网站提供的rpm包也是一个比较可行的办法,他的官方网站的rpm包的提供基本跟tar包发行是同步的,这点我比较喜欢,至少安装rpm包的在后面的调试中不会出现mysql库文件找不到的情况。但这里还是有必要讲一下自定义安装的步骤,毕竟网友自定义安装的还说挺多的。
软件获取:http://www.mysql.com/downloads/index.html
安装步骤:
tar zxvf mysql-3.23.58.tar.gz
cd mysql-3.23.58
./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql ......
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
http://www.5ilinux.com/lamp01.html
关键字:apache+mysql+php apache mysql php 配置 lamp 服务器 web
Linux+Apache+Mysql+PHP典型配置
调试环境:Redhat9.0 Apache1.3.29 Mysql3.23.58 PHP4.3.4
Linux系统的安装我就不讲了,这是基本功,其实这篇文章在类似Redhat的其他linux也应该通用,大家只要掌握我提供的方法就行。记得安装Redhat9。0的时候不要安装系统默认的apache,mysql和php以及相关的软件。已经安装的请用rpm -e * 删除已经安装的包。
1.安装Mysql3.23.58
其实老实说直接安装Mysql官方网站提供的rpm包也是一个比较可行的办法,他的官方网站的rpm包的提供基本跟tar包发行是同步的,这点我比较喜欢,至少安装rpm包的在后面的调试中不会出现mysql库文件找不到的情况。但这里还是有必要讲一下自定义安装的步骤,毕竟网友自定义安装的还说挺多的。
软件获取:http://www.mysql.com/downloads/index.html
安装步骤:
tar zxvf mysql-3.23.58.tar.gz
cd mysql-3.23.58
./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql ......
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
http://www.5ilinux.com/lamp01.html
关键字:apache+mysql+php apache mysql php 配置 lamp 服务器 web
Linux+Apache+Mysql+PHP典型配置
调试环境:Redhat9.0 Apache1.3.29 Mysql3.23.58 PHP4.3.4
Linux系统的安装我就不讲了,这是基本功,其实这篇文章在类似Redhat的其他linux也应该通用,大家只要掌握我提供的方法就行。记得安装Redhat9。0的时候不要安装系统默认的apache,mysql和php以及相关的软件。已经安装的请用rpm -e * 删除已经安装的包。
1.安装Mysql3.23.58
其实老实说直接安装Mysql官方网站提供的rpm包也是一个比较可行的办法,他的官方网站的rpm包的提供基本跟tar包发行是同步的,这点我比较喜欢,至少安装rpm包的在后面的调试中不会出现mysql库文件找不到的情况。但这里还是有必要讲一下自定义安装的步骤,毕竟网友自定义安装的还说挺多的。
软件获取:http://www.mysql.com/downloads/index.html
安装步骤:
tar zxvf mysql-3.23.58.tar.gz
cd mysql-3.23.58
./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql ......