How to deploy the WordPress application on CentOS6 of Linode?

Source: Internet
Author: User
The prerequisites assume that you have installed ApacheWebServer, MySql database, and PHP. If you have not installed ApacheWebServer, see the following document: library. linode. comlamp-guidescentos-6 basic process we take srvwww as our public web program directory, if it does not exist, please first establish

The prerequisites assume that you have installed the Apache Web Server, MySql database, and PHP environment. If not, see the following documents: http://library.linode.com/lamp-guides/centos-6 basic flow we take/srv/www as our public web program directory, if it does not exist, please first establish

Prerequisites

Suppose you have installed Apache Web Server, MySql database and PHP environment; if not, see the following documents: http://library.linode.com/lamp-guides/centos-6

Basic Process

We set/srv/wwwAs the directory of our public web programs, if it does not exist, create it first.
First/srv/wwwCreate a directory for our site, for examplechinese.guru001.com.

cd /srv/wwwmkdir chinese.guru001.com
Program and log directory

Thenchinese.guru001.comThe following two directories are created:public_htmlDirectory is used to place web programs,logsDirectory is used to store log files (which will be configured later in the apache virtual directory ).

cd chinese.guru001.commkdir public_htmlmkdir logs

Modify public_html directory permissions:

chmod 777 /srv/www/chinese.guru001.com/public_html
Download and decompress WordPress

Slavecn.wordpress.orgDownload the latest WordPress Program (here is: http://cn.wordpress.org/wordpress-3.5-zh_CN.tar.gz) and unzippublic_htmlDirectory.

wget http://cn.wordpress.org/wordpress-3.5-zh_CN.tar.gztar zxvf wordpress-3.5-zh_CN.tar.gz

WordPress has been decompressedpublic_htmlThe wordpress directory below.
Delete the downloaded file

rm wordpress-3.5-zh_CN.tar.gz
Create a MySQL database, database account, and password required by WordPress

Create a MySql database and a MySql account

mysql_secure_installationcreate database guruchinese;grant all on guruchinese.* to 'yourusername' identified by 'yourpassword';
Configure Apache virtual directory for WordPress

Configure the Apache virtual directory:

cd /etc/httpd/conf.d

Modify the VM configuration file after su becomes root.

vi vhost.conf
 
  ServerAdmin princetoad@126.comServerName chinese.guru001.comServerAlias chinese.guru001.comDocumentRoot /srv/www/chinese.guru001.com/public_html/wordpress
  
   AllowOverride All
  ErrorLog /srv/www/chinese.guru001.com/logs/error.logCustomLog /srv/www/chinese.guru001.com/logs/access.log combined
 

Note:AllowOverride AllThis is to enable WordPress URL rewriting.

Exit edit and restart apache

/etc/init.d/httpd restart
Web-based Installation

Enter your domain name in the browser, let WordPress automatically create a configuration file, enter the corresponding database information, and install it.

FAQs

The installation of plug-ins and themes requires an ftp account.wp-config.phpFinally, add the following content (if the ftp server has not been installed, install it first)

define('FS_CHMOD_FILE', 0755);define('FS_CHMOD_DIR', 0755);define('FTP_METHOD', 'ftpext');define('FTP_BASE', '/srv/www/chinese.guru001.com/public_html/wordpress/');define('FTP_HOST', 'tomcentos01');define('FTP_CONTENT_DIR', '/srv/www/chinese.guru001.com/public_html/wordpress/wp-content/');define('FTP_USER', 'your_ftp_username');define('FTP_PASS', 'your_ftp_password');define('FTP_SSL', false);

If you are prompted that the upload directory has insufficient permissions, you can use the corresponding directory in chmod 777.

If you have any questions, please discuss them!

Address: http://www.tfan.org/wordpress-on-linode-centos-6/

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.