In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "Mac how to install WordPress", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Mac how to install WordPress" bar!
Mac install WordPress
I. Environmental requirements
PHP 5.2.4 or later
MySQL 5.0 or later
WebServer (you can choose Apache, nginx, etc., which support PHP, here I choose Apache)
2. Software installation 1. Install PHP
Mac OSX comes with PHP, no need to install.
It is not recommended to upgrade PHP7 through brew, source code installation, and so on. It can be tested in a virtual machine if necessary.
2. Install MySQLMySQL download
Visit http://www.mysql.com/downloads/, the official website of MySQL, and you will see a "download" button under "MySQL Community Server" on the page. Click this button.
Go to the MySQL download interface http://www.mysql.com/downloads/mysql/, and the versions of MySQL that are available on Mac OS are listed below. Select the desired version and click download.
Then it jumps to another interface, which prompts you whether you need to register, directly select "No thanks,just take me to downloads!" at the bottom, and then it really jumps to the download interface, which lists a lot of servers for download. Choose a server to download and OK.
MySQL installation
Double-click the downloaded file, there will be several files, there are no MySQL.prefPane files in the package above 5.6, but it will be installed by default; below 5.6, you need to install it manually.
After the installation is complete, the MySQL management button appears in the system (preferences), which allows you to start and stop MySQL.
⚠️ Note: when the MySQL installation is complete, the initial password will be displayed in the form of a pop-up window, please save the password!
MySQL configuration
Open the command line
Edit .bash _ profile and add the following
Add the following under vi .bash _ profile tcsh: add the following under alias mysql/ usr/local/mysql/bin/mysqlalias mysqladmin / usr/local/mysql/bin/mysqladminbash: alias mysql=/usr/local/mysql/bin/mysqlalias mysqladmin=/usr/local/mysql/bin/mysqladmin
Save and exit, and enable configuration
Source .bash _ profile
The password needs to be changed when using MySQL for the first time, which is shown as the following error
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
Details can be solved by referring to the example on the official website.
Http://dev.mysql.com/doc/refman/5.7/en/alter-user.html
Http://dev.mysql.com/doc/refman/5.6/en/alter-user.html
Here is my solution
Mysql > SELECT 1: error 1820 (HY000): You must SET PASSWORD before executing this statementmysql > SET PASSWORD = PASSWORD ('new_password'); Query OK, 0 rows affected (0.01 sec) mysql > quit
You can now log back in to the database with the new password
Create database mysql > create database database-name;2, install Apache
Mac OSX comes with Apache, no need to install.
Apache configuration
The root configuration file is / etc/apache2/httpd.conf
Sudo vi / etc/apache2/httpd.conf search DocumentRoot (operation press ESC + shift +: + / DocumentRoot) to modify to # DocumentRoot: The directory out of which you will serve your# documents. Why did By default, all requests are taken from this directory, but# symbolic links and aliases may be used to point to other locations.DocumentRoot "/ usr/local/www/" put the root directory of Apache's website here in / usr/local/www/? A: there is no need to modify permissions, no need to toss about. Remove the comments from this line # LoadModule php5_module libexec/apache2/libphp5.so
The multi-site profile is / etc/apache2/extra/httpd-vhosts.conf
# # ServerAdmin webmaster@dummy-host2.example.com# DocumentRoot "/ usr/docs/dummy-host2.example.com" # ServerName dummy-host2.example.com# ErrorLog "/ private/var/log/apache2/dummy-host2.example.com-error_log" # CustomLog "/ private/var/log/apache2/dummy-host2.example.com-access_log" common# contains two examples Copy a modified DocumentRoot "/ usr/local/www/WordPress/WordPress01" ServerName WordPress01 ErrorLog "/ private/var/log/apache2/WordPress01-error_log" CustomLog "/ private/var/log/apache2/WordPress01-access_log" common DocumentRoot "/ usr/local/www/WordPress/WordPress02" ServerName WordPress02 ErrorLog "/ private/var/log/apache2/WordPress02-error_log" CustomLog "/ private/var/log/apache2/WordPress02-access_log" common now apache multi-site configuration.
Modify / etc/hosts file
Sudo vi / etc/hosts modifies the following content, # Host Database## localhost is used to configure the loopback interface# when the system is booting. Do not change this entry.##127.0.0.1 localhost255.255.255.255 broadcasthost127.0.0.1 WordPress01127.0.0.1 WordPress02127.0.0.1 phpMyAdmin::1 localhost startup Apache:sudo apachectl start can now access the contents of WordPress01 by typing: localhost/WordPress01 in the browser. Restart Apache:sudo apachectl restart stop Apache:sudo apachectl stop 3. Install WordPress
Go to WordPress's official website
Https://cn.wordpress.org/
Download the installation package, extract it, rename it to WordPress01, and put it in the / usr/local/www/WordPress directory.
Modify the contents of wp-config-example.conf in WordPress01 as follows and rename it to wp-config.conf
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.