Move the php website to CentOS 6.7 [2]: deploy the website to the server, centos6.7

Source: Internet
Author: User
Tags php website

Move the php website to CentOS 6.7 [2]: deploy the website to the server, centos6.7

First, make sure that the lamp environment is installed. Prepare the project source code and database backup files. Because VNC is not installed, you can only deploy it using ssh.

Decompress the project source code. By default, Linux supports SFTP and uses SFTP to upload the source code compressed package to the/var/www/html directory. For FTP software, I think it is very convenient to use the NPPFtp plug-in of Notepad ++.

Next, use ssh to decompress the source code package. Because I package the source code into a zip package, you can use the unzip command. For other types of compressed packages, you need to find the corresponding decompression command:

# Cd/var/www/html # unzip source.zip

Then, upload the database backup file to a directory on the server and remember the path. Then:

# Mysql-u username-pEnter password: password mysql> set names utf8; mysql> create database database1; mysql> use database1; mysql> source directory where the SQL file is stored/database1. SQL;

Now you can open the browser to access the page. If an error is reported on the page, follow the prompts to solve the error. Common problems include database information configuration errors and insufficient folder permissions. Today, I encountered a folder permission problem. Now I have posted a record.

Error details: the runtime directory has insufficient permissions.

The solution is to add the read and write permissions of other persons to the runtime directory:

# Chmod o + rw/var/www/html/specific path/runtime

For more information about permission settings, see article 1, article 2.

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.