In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Basic knowledge of LAMP combination
II. Installation of WordPress and phpmyadmin
LAMP
Linux
Apache (httpd)
MySQL
Php, Python, perl, ruby, etc.
Combination of An and P:
CGI:common gateway interface universal gateway interface, which can be understood as a simplified version of http protocol, which is used for communication between web server and php application process.
Client-- > web server-- > php-- > web server--client;php process generation and destruction are maintained by web server, so web server is very busy and inefficient
Fast CGI: fast CGI, its principle is the same as CGI (client-> web server-- > php-- > web server--client)
But the difference is that when web server starts, it starts a fastcgi manager, such as phpfpm, and starts multiple processes containing php interpreters at the same time, thus forming a process pool managed by phpfpm, so that when web server receives a request, phpfpm dispatches a process to execute, and the process continues to return to the phpfpm process pool without destroying after execution. Performance is improved by omitting the fork destory process
To put it simply, like httpd, php generates multiple process listeners on the specified socket. It is an independent service. Httpd receives the request, sends it to the php process through the protocol, exchanges httpd after execution by php, and finally httpd encapsulates it to the client. The advantage is that web server and php server can be separated and deployed in multiple servers.
Module:client-- > web server-- > client, because php is already a module of httpd that contains a php interpreter and can execute php
FASTCGI and MODULE: both modes have the concept of process pool, and their performance is higher than that of CGI. The difference is that one process pool is the process pool of web server and the other is the process pool of php. In FASTCGI mode, dynamic and static requests can be better separated, and problems in php will not affect web server.
Amp combination in centos6 (rpm package):
Httpd is generally already installed
# yum install httpd outline
Install php
# yum install php
[root@www ~] # rpm-ql php
/ etc/httpd/conf.d/php.conf
/ usr/lib64/httpd/modules/libphp5.so
/ var/lib/php/session
/ var/www/icons/php.gif
As you can see, httpd is combined in a modular way.
Install mysql-server
# yum install mysql-server
Mysql is a CS program, so the installation server should be specified when installing. However, the MySQL client has dependencies, so it will be installed as well
The service of the service mysqld start MySQL program is called mysqld, which is a separate service program.
Install php-mysql
This is a driver interface for php to connect to mysql
Blog assignment:
Rpm package format installation configuration lamp, which provides two virtual hosts, one for WordPress and one for phpmyadmin, and provides ssl access for the latter
Since we have previously experimented with www.aaa.com www.bbb.com two virtual hosts, in which www.bbb.com provides ssl access, we will now modify it:
Www.aaa.com content is WordPress
Www.bbb.com is phpmyadmin and provides ssl access
1. WordPress part:
/ etc/httpd/conf.d/aaa.conf content:
ServerAdmin webadmin@aaa.com
DocumentRoot / web/vhosts/aaa.com/
ServerName www.aaa.com
ServerAlias aaa.com
ErrorLog / var/log/httpd/aaa.err
CustomLog / var/log/httpd/aaa.access combined
So delete the original default home page and add a new test
Create a new test.php in / web/vhosts/aaa.com/ with the following contents:
Test the connection between php and mysql
Test php version and other information:
Note that if index.php ends with .php, if it is written as html, the code will not run, it can recognize the suffix execution; test OK~
Download WordPress and extract it (brief process)
[root@www aaa.com] # ls
Index.php wordpress wordpress-4.5.2-zh_CN.zip
[root@www aaa.com] # rm index.php
Rm: do you want to delete the normal file "index.php"? Y
[root@www aaa.com] # mv wordpress/*.
[root@www aaa.com] # ls
Index.php wordpress wp-admin wp-config-sample.php wp-includes wp-login.php wp-signup.php
License.txt wordpress-4.5.2-zh_CN.zip wp-blog-header.php wp-content wp-links-opml.php wp-mail.php wp-trackback.php
Readme.html wp-activate.php wp-comments-post.php wp-cron.php wp-load.php wp-settings.php xmlrpc.php
[root@www aaa.com] #
The default mysql does not have a password, so the password is arbitrary because it is a test
Mysql > SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' 1qazXSW')
Open the web page and start installing WordPress
Database name: wordpress
User name: root
Password: 1qazXSW@
Database host: localhost
Table prefix: wp_
There will be an error in the installation process because the database WordPress does not exist. Create:
[root@www aaa.com] # mysql-uroot-p123456
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 5
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Mysql > create database wordpress; # # create a database
Query OK, 1 row affected (0.00 sec)
Mysql >
In fact, you can also modify wp-config.php to set the database, user name, password, etc., but to create these in advance, you are not very good at mysql, so use the installation wizard to create them automatically.
There will also be errors in the process, unable to write to the file, and modify permissions:
[root@www vhosts] # chmod 777-R aaa.com
If nothing happens, it is now a "Welcome" to set the site title, user name, password and other information. "install WordPress" after completion
2. Phpmyadmin section, and use ssl to access
Modify / etc/httpd/conf.d/ssl.conf, modify part:
DocumentRoot "/ web/vhosts/bbb.com/phpmyadmin/" # # Home page path
ServerName www.bbb.com:443 # # servername of the site
ErrorLog logs/ssl_error_log # # error log storage path
TransferLog logs/ssl_access_log # # access log storage path
LogLevel warn
SSLCertificateFile / etc/httpd/ssl/http.crt # # Certificate path
SSLCertificateKeyFile / etc/httpd/ssl/http.key # # key path
Because there was a ssl test before, the previous certificates and keys can continue to be used.
In the course of the experiment, we downloaded the latest version of phpMyAdmin-4.6.1-all-languages, prompting PHP 5.5 + is required. Currently installed version is: 5.3.3
Hint requires a version above php5.5, the current version is 5.3.3. So I downloaded phpMyAdmin 4.0.10.15 again, which can be used normally.
If the mbstring,yum installation php-mbstring cannot be found, reread the httpd configuration file or restart the httpd service.
Complain about the cheetah, use the cheetah browser to open the account password, can not log in and there is no error prompt, change the Google browser can log in normally.
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.