First, build lamp platform
1. What is lamp
Web site: One and more pages are composed of
Languages for writing websites:
PHP, Python, Perl, Java,. Net ...
Database:
Oracle, MySQL, SQL Server ...
Web server:
Apache, Nginx, IIS ...
Operating system:
Linux, Windows, Unix ...
linux+apache+mysql+php (web site to build a gold portfolio)
Windows+iis+sql server+.net
2. Turn off the firewall and SELinux
Shutting down the firewall
[Email protected] ~]# systemctl disable FIREWALLD--now
Turn off SELinux
[Email protected] ~]# Vim/etc/sysconfig/selinux
...
7 selinux=disabled//ensure it is disabled
...
Second, web and database configuration
1.Apache Introduction
Web server, default listener for TCP 80 ports
Package Name: httpd
Master configuration file:/etc/httpd/conf/httpd.conf
Default Web page storage location:/var/www/html
2. Important parameters in the master configuration file
# vim/etc/httpd/conf/httpd.conf
...
Listen//Port number
...
User Apache//running users
The group Apache//Run Team
...
#ServerName www.example.com:80//DNS name registered on this website
...
119 DocumentRoot "/var/www/html"//Web Deployment root directory
...
164 DirectoryIndex index.html//default home name
...
3. Virtual Hosting
Multiple Web services can be implemented on a single Web server, providing users with several different Web sites
Based on the domain name Virtual host:
Users access different domain names, can get different websites, but different domain names point to the same server IP
4./etc/hosts file
Early files that implement DNS domain name resolution capabilities
eg
[[email protected] html]# Ping tts8.tedu.cn
[[email protected] html]# Ping ne.tedu.cn
[Email protected] html]# vim/etc/hosts
Add a row below
127.0.0.1 tts8.tedu.cnne.tedu.cn
Linux Daily notes 5