阿里云配置linux环境,安装ThinkSNS

一、按照官方帮助装好web环境,我选择的是apache
二、将按照程序上传到/alidata/www,我命名为sns
三、修改apache 配置文件:/alidata/server/httpd-2.2.22/conf/vhosts/phpwind.conf,添加虚拟主机,代码以下php

<DirectoryMatch "/alidata/www/sns/(attachment|html|data)">
<Files ~ ".php">
Order allow,deny
Deny from all
</Files>
</DirectoryMatch>

<VirtualHost *:80>
	DocumentRoot /alidata/www/sns
	ServerName localhost
	ServerAlias localhost
	<Directory "/alidata/www/sns">
	    Options -Indexes FollowSymLinks
	    AllowOverride all
	    Order allow,deny
	    Allow from all
	</Directory>
	<IfModule mod_rewrite.c>
		RewriteEngine On
		RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
		RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2
	</IfModule>
	ErrorLog "/alidata/log/httpd/sns-error.log"
	CustomLog "/alidata/log/httpd/access/sns.log" common
</VirtualHost>

四、重启apache
在putty下执行命令:html

cd /alidata/server/httpd-2.2.22/bin
./apachectl stop
./apachectl graceful

或者执行 ./apachectl restart

五、访问ip地址安装程序
第二步的时候会提示文件不可写,进入安装目录,修改文件夹及其子文件权限
web

cd /alidata/www/sns
chmod 777 -R data
chmod 777 -R _runtime
chmod 777 -R install
chmod 777 -R config

附:阿里云的帮助文档:
shell

http://help.aliyun.com/manual?spm=0.0.0.0.dKjDNa&&helpId=129
在这里有如何一键安装web环境,如何查看ftp和数据库密码数据库

相关文章
相关标签/搜索