ArchLinux之LMAP攻略(4、安装discuz7.1)

2009年11月19日 ArchLinux, Linux 暂无评论

这一节来安装discuz。

经过安装之后我发现当初下载的discuz没带UCenter,所以安装过程出了点意外,所以还是下载官方的完成版本比较方便。

先把数据库和服务器启动起来

启动Apache
[root@fantlam /]# /usr/local/www/bin/apachectl start

启动mysql
[root@fantlam htdocs]# /usr/local/mysql/bin/mysqld_safe --user=mysql &

进入mysql创建表和用户

[root@fantlam fantlam]# /usr/local/mysql/bin/mysql
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.1.40-log Source distribution

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> create database discuz;

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| discuz7            |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)
mysql> grant all privileges on *.* to 'fantlam'@'localhost'
    -> identified by 'fantlam' with grant option;
Query OK, 0 rows affected (0.00 sec)

 

接着解压discuz源码,我发现居然没有unzip

[root@fantlam discuz7]# unzip
-bash: unzip: command not found

用pacman却连不上服务器,我只要自己下载源码安装了。

以下是unzip的安装命令

[root@fantlam fantlam]# tar -xzvf unzip552.tar.gz
[root@fantlam fantlam]# cd unzip-5.52/
[root@fantlam unzip-5.52]# cp unix/Makefile .
[root@fantlam unzip-5.52]# make generic
[root@fantlam unzip-5.52]# make install
[root@fantlam unzip-5.52]# ln -sv /usr/local/bin/unzip /usr/bin/

[root@fantlam fantlam]#mkdir discuz7 创建目录
[root@fantlam fantlam]#cd discuz7
[root@fantlam discuz7]# unzip ../Discuz_7.1_FULL_SC_UTF8.zip  解压
[root@fantlam discuz7]# ls
readme  upload  utilities
[root@fantlam discuz7]# cd /usr/local/www/htdocs/
[root@fantlam htdocs]# ls
fantlam.php  index.html

[root@fantlam htdocs]# cp -R /fantlam/discuz7/upload/ .   把目录拷贝过去
[root@fantlam htdocs]# ls
fantlam.php  index.html  upload
[root@fantlam htdocs]# mv upload/ bbs  改名
[root@fantlam htdocs]# ls
bbs  fantlam.php  index.html
[root@fantlam htdocs]# cd bbs

[root@fantlam bbs]# ls
admin               forumstat.php  misc.php          seccode.php
admincp.php         frame.php      modcp             sitemap.php
ajax.php            image.php      modcp.php         space.php
announcement.php    images         my.php            stats.php
api                 include        notice.php        tag.php
archiver            index.php      plugin.php        task.php
attachment.php      install        plugins           templates
attachments         invite.php     pm.php            topic.php
config.inc.php      ipdata         post.php          topicadmin.php
crossdomain.xml     leftmenu.php   redirect.php      trade.php
discuz_version.php  logging.php    register.php      uc_client
eccredit.php        magic.php      relatekw.php      uc_server
faq.php             manyou         relatethread.php  userapp.php
favicon.ico         medal.php      robots.txt        viewthread.php
forumdata           member.php     rss.php           wap
forumdisplay.php    memcp.php      search.php

[root@fantlam bbs]# vi config.inc.php  修改文件参数

ArchLinux之LMAP攻略(4、安装discuz7.1)

 启动浏览器访问 发现出现问题

ArchLinux之LMAP攻略(4、安装discuz7.1)

[root@fantlam bbs]# vi  /usr/local/lib/php.ini 修改一下

[root@fantlam bbs]# /usr/local/www/bin/apachectl restart 重启一下Apache

ArchLinux之LMAP攻略(4、安装discuz7.1)

 现在正常使用了

ArchLinux之LMAP攻略(4、安装discuz7.1)

修改一下文件访问权限

[root@fantlam bbs]# chmod -R 777 attachments/
[root@fantlam bbs]# chmod -R 777 forumdata/
[root@fantlam bbs]# chmod -R 777 uc_client/
[root@fantlam bbs]# chmod -R 777 config.inc.php

检查通过进入下一步  填写相关的信息

ArchLinux之LMAP攻略(4、安装discuz7.1)

discuz已经安装完毕

ArchLinux之LMAP攻略(4、安装discuz7.1)

 

至此,ArchLinux之LMAP攻略系列文章已告一段落,之前自己也没做过php。在windows上装也是傻瓜版安装那种,根本不会了解到细节的东西。这篇文章算做个笔录,也可供新手学习之用。最后感谢网络上的小布老师的视频。

给我留言