In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
System platform: CentOS 7 1611
WordPress download address
PhpMyAdmin download address (CentOS 7 recommends that you do not install the latest version, otherwise you need to compile the latest php-fpm)
Install httpd (192.168.1.200), php-fpm (192.168.1.201) and mariadb (192.168.1.202) on three hosts respectively
And provide WordPress, phpMyAdmin applications
1. Install and configure the httpd server
1.1 install the httpd service
[root@node1 ~] # yum install-y httpd
1.2 Edit the httpd configuration file and create a virtual host
[root@node1 ~] # mkdir-pv / www/ {wp.com Pma.com} / htdocs [root@node1 ~] # vim / etc/httpd/conf/httpd.confServerName localhost:80#DocumentRoot "/ www/wp.com/htdcos" ServerName www.wp.com DocumentRoot "/ www/wp.com/htdocs/" ProxyRequests off ProxyPassMatch ^ / (. *\ .php) $fcgi://192.168.1.201:9000/www/wp.com/htdocs/$1 Options None AllowOverride None Require all granted ServerName www.pma.com DocumentRoot "/ www/pma.com/htdocs/" ProxyRequests off ProxyPassMatch ^ / (. *\ .php) $fcgi://192.168.1.201:9000/www/pma.com/htdocs/$1 Options FollowSymLinks AllowOverride None Require all granted
2. Install and configure the php-fpm service
2.1 install php-fpm, php-mbstring, php-mysql services
[root@node2 ~] # yum-y install php-fpm php-mbstring.x86_64 php-mysql
2.2 modify the php-fpm configuration file
[root@node2 ~] # vim / etc/php-fpm.d/www.conf listen = 0.0.0.0 etc/php-fpm.d/www.conf listen 9000 # means to listen on all ports; when listen.allowed_clients = 127.0.0.1 # is commented out, all hosts are allowed to access by default
2.3 create web page file directories for / wordpress and phpmyadmin, and place WordPress and phpmyadmin files in this folder
[root@node2 ~] # mkdir-pv / www/ {wp.com,pma.com} / htdocs
3. Install and configure mariadb service
3.1Install mariadb service (CentOS 7 comes with mariadb service, just start it)
[root@node3 ~] # yum-y install mariadb-server
[root@node3 ~] # systemctl start mariadb.service
3.2 create a database and add users and grant permissions
MariaDB [(none)] > create database wp; MariaDB [(none)] > CREATE UESR 'wp'@'%.%' IDENTIFIED BY' wppasswd'; MariaDB [(none)] > GRANT ALL ON *. * TO wpuser@'192.168.1.%' IDENTIFIED BY 'wppasswd'
4. Configure WordPress and phpMyAdmin
4.1 extract the downloaded file and create a link for phpmyadmin
[root@node2 wordpress] # unzip wordpress-4.7.4-zh_CN.zip [root@node2 wordpress] # unzip phpMyAdmin-4.0.10.20-all-languages.zip [root@node2 html] # ln-sv phpMyAdmin-4.0.10.20-all-languages pma
4.2 modify the WordPress configuration file
[root@node2 html] # cd wordpress/ [root@node2 wordpress] # cp wp-config-sample.php wp-config.php [root@node2 wordpress] # vim wp-config.php define ('DB_NAME',' wp'); # database name define ('DB_USER',' wp'); # user name define ('DB_PASSWORD',' wppasswd') used to connect to the database # password used to connect to the database define ('DB_HOST',' 192.168.1.202'); # path to the database
4.3 modify the configuration file of phpMyAdmin
[root@node2 wordpress] # cd / www/pma.com/htdocs/pma [root@node2 pma] # cp config.sample.inc.php config.php [root@node2 pma] # openssl rand-base64 15 # generate the random number A42B1Noto1YiqQMC3DV7 [root@node2 pma] # vim config.php$cfg ['blowfish_secret'] =' A42B1Noto1YiqQMC3DV7] in the configuration file; / * YOU MUST FILL IN THIS FOR COOKIE AUTH! * / $cfg ['Servers'] [$I] [' host'] = '192.168.1.202'
4.4 create a php session folder and modify permissions
[root@node2 pma] # mkdir / var/lib/php/session-pv [root@node2 pma] # chown-R apache.apache / var/lib/php/session/ [root@node2 pma] # systemctl restart php-fpm.service
4.4 copy WordPress and phpMyAdmin to the corresponding path on the httpd server
[root@node2 pma] # scp-P 22 / var/www/html/pma/* root@192.168.1.200:/var/www/html/pma [root@node2 pma] # scp-P 22 / var/www/html/wordpress/* root@192.168.1.200:/var/www/html/wordpress
5. Enable acceleration for PHP and install xcache
[root@node1 ~] # yum-y install php-xcache.x86_64 [root@node1 ~] # openssl [root@node1 ~] # opensslOpenSSL > md5test123 (stdin) = cc03e747a6afbbcbf8be7668acfebee5 [root@node1 ~] # vim / etc/php.d/xcache.inixcache.admin.user = "test" xcache.admin.pass = "cc03e747a6afbbcbf8be7668acfebee5" # the MD5 encrypted password must be used here
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.