Commonly used vim keys:
Select when forward
Y copy
P Sticky Sticker
X Delete
I edit
ESC Exit Edit
: Wq Save Exit
: q! Do not save exit
/ Find string
The command line to use
sudo executes commands with Administrator privileges
LS Displays the file name in the current directory
PWD Displays the current directory path
Clear Clear Screen
CD Entry Directory
sudo rm deletes files with Administrator privileges
CP Copy File
sudo apachectl-k start Apache
On your Mac, the Apache server is installed by default.
1. Check whether the Apache server is started
Enter localhost or 127.0.0.1 in the Safari browser (Firefox is not recommended)
2. Open Apache
Open terminal, input sudo apachectl-k start, enter
Enter password, password for Mac user login password, enter
3. Check Apache Open, open
4. Modify Apache path for later operation
Go to Apache Path: cd/etc/apache2
View current path: pwd
To view files in the current directory: LS
Backup Apache configuration file httpd.conf:sudo cp httpd.conf Httpd.conf.bak
Go to httpd.conf file: sudo vim httpd.conf
To modify a path:
1). Find/documentroot
2). Press I to edit, modify the path to/users/eazy/sites
Path directory: Go-"enter" ~ "Symbol-" New folder sites
Put demo.html and info.php files in sites (Baidu Cloud: Http://pan.baidu.com/s/1i38NCrV Password: H5QB)
3). Press ESC to exit edit
4). Add Indexes
5). Open PHP, remove the comment symbol #
6). Save exit:: Wq
5. Copy the Php.ini.default file to PHP.ini
1) CD.
2) sudo cp php.ini.default php.ini
6. Restart Apache service: sudo apachectl-k restart
7. Check if the configuration is successful
Apache Server Configuration