LinuxSir.cn,穿越时空的Linuxsir!

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

手把手教你在Debian上架构自己的BLOG

[复制链接]
发表于 2005-8-3 00:19:49 | 显示全部楼层 |阅读模式
这几天闲来无事突然想自己架构个BLOG玩玩。
系统:Debian sid
基本软件包:drupal-4.6.2.tar.gz   http://www.drupal.org

一.服务器搭建
任务:安装apache2,mysql
gradetwo:/# apt-get install apache2 php5 php5-gd php5-mysql php5-pcre php5-session mysql-server mysql-client
gradetwo:/# tar -xzvf drupal-4.6.2.tar.gz
gradetwo:/# mov drupal-4.6.2 /var/www/blog

二.服务器配置
修改apache2.conf
gradetwo:/etc/apache2# vi apache2.conf
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml //把index.php置前
修改000-default
gradetwo:/etc/apache2# cd sites-enabled/
gradetwo:/etc/apache2/sites-enabled# vi 000-default
RedirectMatch ^/$ /blog/                //把apache2-default改为blog   
修改php.ini  
gradetwo:/etc/apache2# cd /etc/php5
gradetwo:/etc/php5# cd apache2/
gradetwo:/etc/php5/apache2# vi php.ini

;extension=session.so                      //去除;
;extension=xml.so
;extension=gd.so
;extension=mysql.so
;extension=pcre.so


extension=session.so
extension=xml.so
extension=gd.so
extension=mysql.so
extension=pcre.so

修改mysql密码
gradetwo:/# mysqladmin -u root password mypasswd           //mypasswd 为密码

三.建立数据库
gradetwo:/var/www/blog# chmod -R 755 *
gradetwo:/var/www/blog# mysqladmin -u root -p create drupal   //drupal为数据库名
gradetwo:/var/www/blog# mysql -u root -p
mysql> GRANT ALL PRIVILEGES ON drupal.*
     >  TO root@localhost IDENTIFIED BY 'mypasswd';
mysql> flush privileges;
mysql> \q
gradetwo:/var/www/blog# mysql -u root -p drupal < database/database.mysql //导入
gradetwo:/var/www/blog# vi sites/default/settings.php
修改settings.php
$db_url = "mysql://username:password@localhost/database";
修改数据库的用户名和密码
$db_url = "mysql://root:mypasswd@localhost/drupal";
修改url
$base_url = 'http://localhost';
$base_url = 'http://www.gradetwo.org';   //改为自己的域名,我的是假的~ :)

基本已经架构好了,就差内容建设和美化了。
先看看成果
gradetwo:/# apache2ctl restart
打开浏览器看看自己的BLOG吧~ Have fun!
第一个登录的用户将自动成为admin

PS 累了,内容建设和美化就下次再讲了
 楼主| 发表于 2005-8-3 00:24:41 | 显示全部楼层
为方便兄弟们安装php5套件,附上我的sources.list
deb http://people.debian.org/~dexter php5 sid
deb http://debian.ustc.edu.cn/debian sid main non-free contrib
deb-src http://debian.ustc.edu.cn/debian sid main non-free contrib
deb http://debian.ustc.edu.cn/debian ../project/experimental main non-free contrib
deb-src http://debian.ustc.edu.cn/debian ../project/experimental main non-free contrib
deb http://debian.ustc.edu.cn/debian-uo sid misc marillat ustc java jrfonseca firefly
deb-src http://debian.ustc.edu.cn/debian-uo sid misc marillat ustc java jrfonseca firefly
deb http://security.debian.org/ testing/updates main
回复 支持 反对

使用道具 举报

发表于 2005-8-3 02:48:43 | 显示全部楼层
好啊,期待下文。
回复 支持 反对

使用道具 举报

发表于 2005-8-3 03:51:53 | 显示全部楼层
拜读了!
回复 支持 反对

使用道具 举报

发表于 2005-8-3 08:33:19 | 显示全部楼层
顶一个,drupal这个有DEB包吗
回复 支持 反对

使用道具 举报

发表于 2005-8-3 10:17:12 | 显示全部楼层
debian可以直接

apt-get install drupal
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-3 13:06:16 | 显示全部楼层
Post by nothing9
debian可以直接

apt-get install drupal

注意:sid源里头的drupal为 4.5.4-1
Drupal 4.5 and earlier versions will not run on PHP 5
要是直接apt-get 安装drupal 就必须使用PHP4
回复 支持 反对

使用道具 举报

发表于 2005-8-4 01:46:16 | 显示全部楼层
继续..........期待中
回复 支持 反对

使用道具 举报

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

本版积分规则

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