LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 730|回复: 3

我的 linux+apache+php+mysql 配置过程,高手帮忙看看

[复制链接]
发表于 2005-10-1 14:49:56 | 显示全部楼层 |阅读模式
配置此服务器的用途:

建立php+mysql网站+论坛,服务器放在电信机房内(实验)

vi /etc/httpd/conf/httpd.conf //编辑apache配置文件

serveradmin webmaster@mail.test.com //网站管理员电子邮件

servername www.test.com //网站域名

---------------------------------------- //虚拟主机配置

namevirtualhost ***.***.***.*** //***.***.***.***为服务器IP

<virtualhost ***.***.***.***>

serveradmin webmaster@mail.test.com

documentroot /home/discuz

servername www.test.com

errorlog /logs/test.com

customlog /logs/test.com common

</virtualhost>

service httpd start //启动apache

useradd discuz //创建网站mysql数据库所需用户

sercice mysqld start //启动mysql

/usr/bin/mysqladmin -u root password ****** //给root设置mysql密码

/usr/bin/mysql -u root -p

mysql > create database discuz; //创建discuz数据库

mysql > grant all on discuz.* to discuz@localhost identified by '******'; //赋予discuz用户discuz数据库所有权限
发表于 2005-10-7 08:55:58 | 显示全部楼层
useradd discuz //创建网站mysql数据库所需用户

这句有必要吗??
回复 支持 反对

使用道具 举报

发表于 2005-10-7 09:04:09 | 显示全部楼层
httpd.conf 配置文件那块好像也不太对...

看看这个...Apache HTTP服务器 2.0版本文档
http://linux.dalouis.com/doc/apache2.0/


操作数据库的部分用图形化的软件吧...
phpmyadmin或者EMS MySQL Manager 3 Lite
回复 支持 反对

使用道具 举报

发表于 2005-10-7 09:18:57 | 显示全部楼层
以下是我的apache,mysql,php编译参数,分享给大家:

Mysql:



./configure --prefix=/opt/mysql --with-mysqld-user=thatday --with-extra-charsets=all --with-unix-socket-path=/opt/mysql/var/mysql.sock





Apache:

./configure --prefix=/opt/apache --enable-track-vars --enable-cgi --with-config-file-path=/opt/apache/conf --enable-so --enable-ssl --with-ssl=/usr/share/ssl --enable-rewrite





PHP:





./configure --prefix=/opt/php \

--with-apxs2=/opt/apache/bin/apxs \

--with-gd=/usr \

--enable-gd \

--enable-gd-native-ttf \

--with-jpeg-dir=/usr \

--with-png \

--with-ttf \

--with-zlib \

--with-freetype-dir=/usr \

--enable-magic-quotes \

--with-mysql=/opt/mysql \

--with-mysql-sock=/opt/mysql/var/mysql.sock \

--with-iconv \

--with-mbstring \

--enable-mbstring \

--enable-track-vars \

--enable-force-cgi-redirect \

--enable-ftp \

--with-config-file-path=/opt/php/etc \

--with-openssl \

--with-openssl-dir=/usr/share/ssl \

--with-cpdflib=/usr/local \

--with-pear=/opt/php/pear
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表