wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm yum -y install mysql57-community-release-el7-10.noarch.rpm yum -y install mysql-community-server
systemctl start mysqld
grep "password" /var/log/mysqld.log
mysql -uroot -p
mysql> alter user 'root'@'localhost' identified by 'Lile@5201314';
mysql> create database wordpress; Query OK, 1 row affected (0.00 sec) mysql> create user 'wordpress'@'localhost' identified by 'Wordpress@5201314'; Query OK, 0 rows affected (0.01 sec) mysql> grant all privileges on wordpress.* to 'wordpress'@'localhost'; Query OK, 0 rows affected, 1 warning (0.01 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
一、安裝nginxphp
yum install nginx -y
server { listen 80; server_name opswordpress.transspay.net; root /wordpress; location / { index index.php index.html index.htm; try_files $uri $uri/ /index.php index.php; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ .php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
nginx -s reload
#安裝 yum install php-fpm php-mysql -y #啓動 systemctl start php-fpm.service #9000爲php-fpm的默認端口 lsof -i:9000
https://wordpress.org/latest.tar.gz
cp wp-config-sample.php wp-config.php
define( 'DB_NAME', 'wordpress' ); /** MySQL database username */ define( 'DB_USER', 'wordpress' ); /** MySQL database password */ define( 'DB_PASSWORD', 'wordpress@5201314' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' ); /** Database Charset to use in creating database tables. */ define( 'DB_CHARSET', 'utf8' ); /** The Database Collate type. Don't change this if in doubt. */ define( 'DB_COLLATE', '' );
define('AUTH_KEY', 'h#f>^]S]8_%v|c5y8$r{;OOQ1SWuFV4`1Tk^g=MImlUQ`Z{x(;^aMo)yFvm6}zJ;'); define('SECURE_AUTH_KEY', 'h+Qs$r|5t[^I,}H[$s/~n+)Jt4#<{=D|@RtZU.LJa pX dupeRrUE4Cra-^Bhb)2'); define('LOGGED_IN_KEY', 'zbZEh/#7wZYk_Bz4>t}W-~L{}s8V$!0qLl/*{z^tWj6A}~!3i1I!9Iv`~L>|0z[J'); define('NONCE_KEY', ';ou7nI)_EhxqlT6S)+o/?cF5koyA{c&<n++(--hpor<}jU&s#OnHD`M>az/tMU2['); define('AUTH_SALT', '}mW7Q&W|wbLshXnZ{b rj/vkO3%_<:4Zc$~3.&O4F[S__$_e-W-6!SZ^J!}[e-u&'); define('SECURE_AUTH_SALT', 'r-flzGU2Uu>(sfL?F`_]giyWni%uKt}iym|)wuH^rFom~Q :Lw+m8m}IP9kS0F{['); define('LOGGED_IN_SALT', 'Ox@>-u+@lgS0#(MQyL:Xan|&+s.Gq[$c+:sGG&u]-51T!d]Z}:%*aG7H!6K$;>@7'); define('NONCE_SALT', 'j*dbFR^.;ng_Fm5</5#rmk5/$VngTERa$-D0Vdv#@jow-];abKrT,_p@<_/gne}W');
if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH','/wordpress');
http://domain/wp-admin/install.phphtml
define("FS_METHOD","direct"); define("FS_CHMOD_DIR", 0777); define("FS_CHMOD_FILE", 0777);