As Linux servers become more and more widely used, many webmasters in China have begun to use them as their own Web servers. This article describes how to install and configure DedeCMS in a Linux system environment. 1. installation preparation · Linux (Ubuntu) · Apache2 · MySQL5 · PHP5. 3 the server must have the above basic environments.
As Linux servers become more and more widely used, many webmasters in China have begun to use them as their own Web servers. This article describes how to install and configure DedeCMS in a Linux system environment.
1. installation preparation
· Linux (Ubuntu)
· Apache2
· MySQL5
· PHP5. 3
The server must have the above basic environments. Generally, these components are installed by default in Linux Web operating systems. of course, you can install these components on your own. The specific installation methods can be obtained through some online documents, here we will not go into depth.
2. download and decompress the latest DedeCMS version.
Download the latest DedeCMS version through www.dedecms.com. Generally, the download package is in DedeCMS *** .tar.gz format. you can use the command line in Linux:
Tar-zxvf DedeCMS-***** .tar.gz
Upload the unzipped uploads directory to the root directory of the site. here, the root directory of the system site is/var/dedecms/
3. install DedeCMS
Visit http: // my site/install and click confirm to go to server environment monitoring. we can see the server situation (1 ).
Here we find that several directories do not have the write permission. we need to divide this directory into permissions.
First, you need to bind the site directory to the apache service user by using the command line:
Sudo chown-R www-data/var/dedecms/
In this way, the site directory is assigned the permission user www-data.
Here, we need to remove the write permission for several directories without the write permission, and enter:
Sudo chmod-R 755/var/dedecms/data/
Sudo chmod-R 755/var/dedecms/html/
Sudo chmod-R 755/var/dedecms/uploads/
Sudo chmod-R 555/var/dedecms/include/
Sudo chmod-R 555/var/dedecms/install/
Sudo chmod-R 555/var/dedecms/dede/
Sudo chmod-R 555/var/dedecms/plus/
Sudo chmod-R 555/var/dedecms/images/
Sudo chmod-R 555/var/dedecms/member/
Sudo chmod-R 555/var/dedecms/special/
Sudo chmod-R 555/var/dedecms/templets/
Sudo chmod 555/var/dedecms/index. php
Sudo chmod 555/var/dedecms/tags. php
In this way, we continue to perform the next step (2 ).
4. set execution permissions
We can disable the executable permission for several directories in DedeCMS. the executable permission here means that php scripts cannot be run in Apache, then we can make the following settings in the Apache Directory configuration (virtual machines can be set. htaccess)
*: "Sh_symbol">
...
/Var "sh_symbol">/dedecms "sh_symbol">/uploads/>
Php_admin_flag engine off
>
/Var "sh_symbol">/dedecms "sh_symbol">/data/>
Php_admin_flag engine off
>
/Var "sh_symbol">/dedecms "sh_symbol">/html/>
Php_admin_flag engine off
>
/Var "sh_symbol">/dedecms "sh_symbol">/templets/>
Php_admin_flag engine off
>
/Var "sh_symbol">/dedecms "sh_symbol">/images/>
Php_admin_flag engine off
>
>
Because we use PHP5 here, we can set it according to the above method. If it is an old version of PHP, you can only use:
"/Var/dedecms/uploads/" "sh_symbol">
~ "Sh_string"> ". php">
Order allow, deny
Deny from all
>
>
.
5. Complete Installation
Now we have completed DedeCMS installation and configuration.