跳至主要内容

Ubuntu/Debian LAMP+wordpress完全傻瓜安装攻略

原文出处

Table of Contents

1 环境配置

1.1 安装必要软件

sudo apt-get install apache2
sudo apt-get install libapache2-mod-php5 php5
sudo apt-get install mysql-server-5.0 mysql-common mysql-admin
sudo apt-get install php5-mysql

1.2 mysql初始配置

设置mysql密码:

sudo mysql-admin

第一次运行用root登录不需要密码。可以进去后添加用户同时修改root密码。
然后点击Catalogs,在下面的Schemata里面新建一个数据库。
然后进入User Administrator,在新建的User上选Schema Privileges,赋予其对该数据库操作的权限。

(mysql-admin比较好的一个东西,操作性也比较方便,极大的提高了对于tables的表达和实用)

1.3 启动apache2和mysql server

启动apache2和mysql

sudo /etc/init.d/mysql start;sudo /etc/init.d/apache2 start

2 Wordpress安装

2.1 准备工作

下载,解压缩,放到apache2的目录里,修改权限。

wget -c http://wordpress.org/latest.tar.gz(由于权限问题,本机下载的时候保存在~$ 下,需要你ls)
tar xvzf wordpress-2.2.tar.gz(解压的时候先新建一个dir然后sudo一下,如果直接复制该命令会导致无法解压,权限问题比较重要)
sudo cp -rf wordpress /var/www/(Apache2所在)
sudo chown -R www-data:www-data wordpress/(没有完全明白)

2.2 wordpress配置

然后进入http://localhost/wordpress/
check一下

修改wp-config-sample.php文件

sudo gvim wp-config-sample.php

主要是前面三个

define('DB_NAME', 'wordpress');    // The name of the database
define('DB_USER', 'username'); // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password

修改成刚才建立的数据库名称,用户名和密码。 然后运行

sudo mv wp-config-sample.php wp-config.php (建议做下backup虽然比较简单)

现在进入入http://localhost/wordpress/
check一下

(这里我发现的问题是当我直接进入的测试的时候,系统提示为不能找到该数据库,我在linux下重启mysql也没有用,提示是mysql有错误,无奈reboot一下,然后就可以了)

然后点 Install.php 就可以了:)
总结:总体来说安装步骤还是比较简单,其中的内容也比较的详细,后台设计的比较漂亮,模板需要自己去下载,对于一个初学者来说是比较强大,至于稳定性并没有太过的测试。对于喜欢尝新鲜的人来说,wordpress确实是一个比较好的BLOG系统。

评论

此博客中的热门博文

Python学习笔记20100117

映射list   Dictionary 是用{}. list 是一那个[]. turple是用() 当你定义过dictionary后,你可以使用d.keys(), d.values(),d.items()将定义后的时候分别显示出来 当然可以将list里的值加减乘除,也可以如一般的定义直接重新复制这个list. 链接与分割字符串的 li=";", join(li) 则显示的就是 分隔符为;的数 如果使用li=li.split(";")则将刚刚;的分隔符删除,而split里也可定义域,如li.split(";",1)   自省 <---这是啥 之前在使用的时候发觉有些书本上的模块不能调用,很多是py脚本定义过的函数。 下载该脚本s,然后上传至指定位置。 >>>import sys >>>sys.path >>>sys.path.append("绝对位置")然后就能调用这些脚本和参数了。 删除 >>>sys.path.pop() 定义一个参数是 def info(test, test1=10.test2=12): info是函数名,test是必备参数,因为没有定义值,test1和test2是可选参数,定义了初始值   以上是外部函数的调用,下面转到内部函数 内部函数有type,str,dir及其他   ---type 返回任意字符的类型,模块也可以。types模块 >>> type(1) <type 'int'> >>> li=[] >>> type(li) <type 'list'> >>> import odbchelper >>> type(odbchelper) <type 'module'> >>> type(sys) <type 'module'> >>> import types ...

Setagaya park

  We visited Setagaya Park (世田谷区) yesterday. This park reminds us when we in Europe, which has a fancy fountain in the middle, and free entrance. People just laid down on the grass, enjoy the day time they can waste. people who have kids together,  play all different kinds of sports. you really can't image whether you are in Europe or  Japan. I would prefer to use a Bus instead of the metro, the metro is fast, but you only can see the dark, light, people sit or stand as Sardine, without any emotion. but on the bus, you can see the traffic, the shop, everything on the road. When we on our way to the park, we stop by a good chocolate shop named " craft chocolate works ",  this is a very good place to have ice cream, you probably can choose half & half, you can enjoy the feeling when you smell the chocolate smell and eat with it.  or you can enjoy beer or cake in "globe antiques (ザ グローブアン ティ ークス) .   also, we checked the Blue Bottle Coffee Sangenjaya ...