Debian 7 server migration and reconfiguration of Web Services

Source: Internet
Author: User

Next, let's take a look at some details about the Debian 7 server migration and reconfiguration of the Web service. I hope this article will be helpful to you.

First, install the compilation environment. Although we can easily bypass manual compilation through apt-get, some packages may have built-in compilation commands to compile some extensions, if the compilation environment is not installed, these extensions will become invalid. The following command is usually used to directly install the development and compilation kit:

The Code is as follows: Copy code
Apt-get install build-essential

Because some apps are developed in Python, and the packages it depends on include extensions that can improve performance, the following error occurs during compilation:

Src/XXX. c: 31: 20: fatal error: Python. h: No such file or directory
Compilation terminated.
Error: command 'gcc 'failed with exit status 1
The reason is that we have not installed the Python development environment. Use the following command to solve this problem.

The Code is as follows: Copy code
Apt-get install python-dev

Because MySQL is used, we also need to install the MySQL database. When we use the apt-get command to install the MySQL database, we also need to install the corresponding modules for Python. Otherwise, an error will be reported as follows:

No module named MySQLdb is solved by the following installation command:

The Code is as follows: Copy code
Pip install mysql-python

However, the problem persists. When configuring MySQL-Python, an error is returned:

EnvironmentError: mysql_config not found MySQL installed by apt-get does not contain the development file by default, while mysql_config is located in the Development file. You can install the following package to solve this problem:

The Code is as follows: Copy code
Apt-get install libmysqld-dev libmysqlclient-dev

In addition, a small problem in the Pyramid framework is that import zope. deprecation reports ImportError: No module named deprecation error. You can reinstall zope. deprecation to solve the problem:

The Code is as follows: Copy code
Pip -- force-reinstall -- upgrade zope. deprecation

Well, record it here for a long time.

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.