| 1.上传代码包 |
| [root@web01 ~] |
| [root@web01 ~] |
| -rw-r--r--. 1 root root 10829853 Dec 7 12:04 Discuz_X3.3_SC_GBK.zip |
| |
| 2.解压 |
| [root@web01 ~] |
| [root@web01 ~] |
| [root@web01 ~] |
| server { |
| listen 80; |
| server_name linux.discuz.com; |
| root /code/discuz/upload; |
| |
| location / { |
| root /code/discuz/upload; |
| index index.php; |
| } |
| |
| location ~* \.php$ { |
| fastcgi_pass 127.0.0.1:9000; |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| include fastcgi_params; |
| } |
| } |
| [root@web01 ~] |
| nginx: the configuration file /etc/nginx/nginx.conf syntax is ok |
| nginx: configuration file /etc/nginx/nginx.conf test is successful |
| [root@web01 ~] |
| 10.0.0.7 linux.discuz.com |
| |
| http://linux.discuz.com/install/ |
| [root@db01 ~] |
| |
| |
| MariaDB [(none)]> create database discuz; |
| Query OK, 1 row affected (0.00 sec) |
| |
| |
| MariaDB [(none)]> grant all on discuz.* to discuz@'172.16.1.%' identified by '123456'; |
| Query OK, 0 rows affected (0.00 sec) |
| [root@web01 ~] |
| |
| server { |
| listen 80; |
| server_name linux.discuz.com; |
| root /code/discuz/upload; |
| |
| location / { |
| root /code/discuz/upload; |
| index index.php; |
| |
| rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last; |
| rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last; |
| rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; |
| rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last; |
| rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last; |
| rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last; |
| rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last; |
| rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/archiver/index.php?action=$2&value=$3 last; |
| rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last; |
| if (!-e $request_filename) { |
| return 404; |
| } |
| } |
| |
| location ~* \.php$ { |
| fastcgi_pass 127.0.0.1:9000; |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| include fastcgi_params; |
| } |
| } |