LAMP配置

discuz安装:

mkdir /data/www

cd /data/www

wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GBK.zip

unzip Discuz_X3.2_SC_GBK.zip

rm -rf readme/ utility/ upload/ ...zip

删除 httpd.conf 中的下面这行前面的警号

#Include conf/extra/httpd-vhosts.conf

然后编辑该配置文件

# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf

在最后面,加入如下配置:

DocumentRoot "/data/www"

ServerName www.123.com

/usr/local/apache2/bin/apachectl -t 检测

/usr/local/apache2/bin/apachectl graceful 加载配置

/usr/local/apache2/bin/apachectl restart 重启

配置 mysql ,给 Discuz

/usrl/local/mysql/bin/mysql -uroot (进入MySQL)

create database discuz;

grant all on discuz.* to 'cao'@'localhost' identified by 'asd12345';

(如果想直接用MySQL命令请在/etc/profile.d/中添加一个脚本export PATH=$PATH:/usr/local/mysql/bin)

如果用绝对路径的方法进不了MySQL,就yum remove mysql进入/etc/profile.d添加脚本在执行。

安装discuz

修改权限:cd /data/www

 chown -R daemon:daemon data uc_server/data uc_client/data config

Apache用户认证

vim /usr/local/apache2/conf/extra/httpd-vhosts.conf

AllowOverride AuthConfig

AuthName "alksdjflkasjdf"

AuthType Basic

AuthUserFile /data/.htpasswd

require valid-user


你可能感兴趣的:(lamp)