Server Setup and configuration, server setup and Configuration

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.