Aliyun CENTOS7 Installation Lnmp+wordpress_linux

Source: Internet
Author: User
Tags fpm install php phpinfo create database install wordpress wordpress database yum repolist aliyun

1. Install Nginx

#yum install Nginx      #配置文件处于/etc/nginx
#systemctl start nginx   #启动nginx
#systemctl enable Nginx.service  # set to boot

#systemctl status Firewalld  #检查防火墙, if active (running), then
#vim/etc/firewalld/zones/ Public.xml   # in zone

<zone> ...
<service name= "Nginx"/>
<zone>
#systemctl Reload Firewalld

Test: http://114.215.172.90/114.215.172.90 for extranet IP address

2. Install MySQL (not mariadb)

#rpm-UVH http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
#yum repolist enabled | grep "MySQL". *-community.* "
#yum-y install mysql-community-server

#yum-y install mysql-community-server   #安装社区版
#systemctl start mysqld                  # start MySQL
#mysql_secure_installation              # mysql Security installation, enter the root password, all the way y

3. Install PHP

#yum Install php-fpm php-mysql
#systemctl start php-fpm        # start php-fpm
#systemctl enable PHP-FPM      # Setup Boot c5/> #mkdir/var/www
#chown-R apache:apache/var/www

To modify a Nginx profile: Create a new wordpress.conf in the/ETC/NGINX/CONF.D directory

server {
Listen 8000;
# Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

location ~ \.php$ {
root/usr/www;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Include Fastcgi_params;
}
}

#systemctl Reload Nginx

Creating phpinfo.php in the/usr/www directory

<?php echo phpinfo ();?>

External access: http://114.215.172.90:8000/phpinfo.php

4. Install WordPress

Download wordpress-4.4.2-zh_cn.tar.gz from https://cn.wordpress.org/, extract to/usr/www
Create a WordPress database

#mysql-uroot-p
#create database WordPress

Through Http://114.215.172.90:8000/wordpress access, and installation prompts to install, the middle of the need to add a MySQL username and password, and make WordPress related username and password, and then create success.

http://114.215.172.90:8000/wordpress/access can also be clicked on the page landing page setup and other related management work.

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.