Server Setup and configuration, server setup and Configuration
1. Use the Administrator to start the local Apache server
Sudo apachectl-k start
2. Restart
Sudo apachectl-k restart
3. Search for the default Apache document directory.
Cd/etc/apache2/
Sudo vim httpd. conf
/DocumentRoot --> (here we need to change the DocumentRoot in two places)
Note: In Mac systems, many System Service configurations are implemented through modification and restart.
4. Create a new website folder Sites in the Finder and change it to read/write permissions. (In show Introduction)
5. Modify the DocumentRoot content in vim.
6: Command mode
1> shift + v: select a row
2> copy a row by y
3> p paste the copied content below the current row
4> d $ Delete to the end of the row
5> x delete a character
6>: wq save and quit
7>: q! Do not save and exit
8> I enter the editing mode
Edit mode: used to edit and Press esc to switch to the command mode.
7. php support
Cd/etc/apache2
Sudo vim httpd. conf
/Php
Delete # And save
Cd/etc/
Sudo cp php. ini. default php. ini
Restart the Apache server
8. Set the alias of the mysql Command
Vim ~ /. Bash_profile
I
Paste the content
# Mysql
Alias mysql = '/usr/local/mysql/bin/mysql'
Alias mysqladmin = '/usr/local/mysql/bin/mysqladmin'
# Ls
Alias ls = 'LS-G'
: Wq
Restart the terminal program
9. Set the mysql administrator password
Mysqladmin-u root password "123456"
10. Change the mysql administrator password.
Mysqladmin-u root-p password "123456"
10. Install mysql management tool-navicat premium