Dedecms environment in Linux

Source: Internet
Author: User
This article takes Ubuntu as an example. Step 1: Install apache2

1) Check whether Apache is installed: apachectl-V is displayed if it is installed. Server version: Apache/2.2.22 (UBUNTU)2) If the installation is not installed, enter the command sudo apt-Get install apache23. After the installation is successful, enter http: // host IP Address/it works in the browser, indicates that Apache is successfully installed. Step 2: install PHP1) Check whether PHP is installed: PHP-V is displayed if it is installed PHP 5.4.6-1ubuntu1. 2 (CLI) (built: Mar 11 2013 14:57:54)
Copyright (c) 1997-2012 the PHP Group
Zend engine v2.4.0, copyright (c) 1998-2012 Zend Technologies
2) If the installation is not installed, type the following command to install sudo apt-Get install PhP5
Sudo apt-Get install libapache2-mod-php53) test
Restart apache2sudo/etc/init. d/apache2 restart create a new testphp under the/var/www/directory. PHP writes the following test code into the file: <HTML> <? PHP echo '<p> Hello World </P>';?>
</Body>
If "Hello world" is displayed on the webpage, the PHP environment is successfully installed. Step 3: Install MySQL1) Check if MySQL is installed: sudo netstat-tap | grep mysql2) install sudo apt-Get install mysql-server3) Configuration

MySQL only allows connections from the Local Machine (127.0.0.1). If you want to use multiple hosts or open them to the Internet, edit/etc/MySQL/My. CNF

Sudo gedit/etc/MySQL/My. CNF

Find

Bind-address = 127.0.0.1

Comment out with #, as shown in the following figure:

# Bind-address = 127.0.0.1

MySQL does not set the root password by default, and the root user of the local machine does not have the password. Is it risky?

Mysqladmin-u root password your-New-Password

Mysqladmin-h root @ local-machine-name-u root-P password your-New-Password

Sudo/etc/init. d/MySQL restart

4) install MySQL for Apache HTTP Server
Sudo apt-Get install libapache2-mod-auth-mysqlsudo apt-Get install php5-mysqlsudo apt-Get install phpMyAdmin

Note: phpMyAdmin may not be accessible after installation. The causes and solutions are as follows:The reason is that phpMyAdmin is not installed in the WWW directory. It is usually installed in the/usr/share/directory by default, the solution is to find it under/usr/share/and test it under/var/www /.
Now that the lamp environment is set up, you can upload the dedecms program for installation.
Note: After the environment is set up, the dedecms background may be inaccessible.Cause: session_register () and other related features have been removed from php5.4. For details, see update record: http://www.php.net/ChangeLog-5.php#5.4.0
Solution: Modify include/userlogin. Class. php and remove all @ session_register rows in function keepuser.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.