發佈日期:

使用centos 7+nginx+mariadb+bedrock架設wordpress網站

1.sudo yum -y install epel-release

2.sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm

rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm

yum install yum-utilsyum-config-manager –enable remi-php71

 

 

3.sudo vi /etc/yum.repos.d/nginx.repo

[nginx]

name=nginx repo

baseurl=http://nginx.org/packages/centos/7/$basearch/

gpgcheck=0

enabled=1

4.sudo yum -y update

5.sudo yum -y install nginx mariadb-server git libpng12

  1. yum -y install php-devel php-mysql php-opcache php-gd php-common php-xmlrpc php-mcrypt php-zip php-cli php-xml php-mbstring php-curl php-fpm

7.sudo firewall-cmd –permanent –zone=public –add-service=http

8.sudo firewall-cmd –permanent –zone=public –add-service=https

9.sudo firewall-cmd –permanent –zone=public –add-service=ftp

10.sudo firewall-cmd –reload

11.sudo systemctl restart nginx

12.sudo systemctl enable nginx

13.sudo vi /etc/nginx/conf.d/lab.conf

14.sudo vi /etc/opt/remi/php71/php.ini

   cgi.fix_pathinfo=0

15.sudo vi /etc /php-fpm.d/www.conf

user = nginx

group = nginx

listen.owner = nobody

listen.group = nobody

16.sudo systemctl restart php-fpm

17.sudo systemctl enable php-fpm
17-1 install composer

17-2 install nodejs

17-3 install yarn

18.

cd ~/.ssh

ssh-keygen -t rsa

 

git clone git@github.com:Alter-Studio/aopen.git

mkdir /usr/share/nginx/lab.web.aopen.com

19.copy alter source code to /usr/share/nginx/lab.web.aopen.com

19-1.yum install tomcat

19-2 run ‘composer install’ in folder /usr/share/nginx/lab.web.aopen.com/web

19-3 run ‘composer install’ in folder /usr/share/nginx/lab.web.aopen.com/web

19-4 run ‘yarn” in folder /usr/share/nginx/lab.web.aopen.com/web

19-5 run ‘yarn build:production” in folder /usr/share/nginx/lab.web.aopen.com/web

19-6 chown -R nginx:nginx /usr/share/nginx/lab.web.aopen.com/

20.sudo systemctl restart nginx

  1. sudo systemctl restart mariadb
    22.sudo systemctl enable mariadb

23. mysql_secure_installation24.mysql –u root –p25. create database alter_DB;26. grant all on alter_DB.* to ‘alter’@’localhost’ identified by ‘Aopen@1122’;27. flush privileges;28.exit