がんばれ~
26 Jun
即使是在本机上建WordPress测试站点,我也希望有个标准的LAMP平台。我原本以为在最标准的Linux上搭WordPress不是件容易的事,哪知道装了Ubuntu后,亲自装下来,才发现这一切都是如此简单。除了下载的时间,整个安装配置过程甚至还不到2分钟……
参考资料:http://www.osxcn.com/ubuntu/ubuntu-feisty-fawn-server.html
1、打开新立得软件包管理器,-编辑 -使用任务分组标记软件包 -勾选 LAMP Server,如下图:
2、到客厅泡杯茶或者找点游戏消磨时间。
3、启用 mod_rewrite 模块
sudo a2enmod rewrite
4、配置 apache2.conf
sudo gedit /etc/apache2/apache2.conf
去掉 AddHandler cgi-script .cgi 前的注释 “#”。
然后在任意地方添加这么一段:
<Virtualhost localhost>
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>
<Directory /var/www/cgi-bin/>
Options ExecCGI
</Directory>
</Virtualhost>
重启服务器
sudo /etc/init.d/apache2 restart
搞定。
以后服务器会随Ubuntu的启动而自动启动。
接下来安装WordPress:
将解压的WordPress目录放到/var/www(假设是/var/www/wordpress/),再到http://localhost/phpmyadmin/建个数据库(用户名root,密码为空),然后配置一下WordPress的config文件,接着再到http://localhost/wordpress/wp-admin/install.php,怎么样,一个很熟悉的界面呈现在电脑屏幕前了~
Leave a reply