当前位置:网站首页>Linux Installation and deployment lamp (apache+mysql+php)
Linux Installation and deployment lamp (apache+mysql+php)
2022-07-05 11:55:00 【Sanmao who likes to knock code】
List of articles
What is? LAMP?
LAMP:Linux + Apache + MySQL + PHP LAMP framework ( Combine )
- Apache:Apache It's the world's number one user Web Server software
- PHP: One is used exclusively for Web Developed programming language
- MySQL:MySQL Is a relational database management system , It is mainly used to store project data permanently
Preparing the deployment environment
1. install Apache
Use yum Command to install httpd software package
command :
yum install httpd -y
To configure httpd.conf file
Open the configuration file with the command :vim /etc/httpd/conf/httpd.conf
stay vim in
/+ keyword
Enter search keywordSearch for ServerName, Add a line below :
ServerName Localhost:80
Save and exitUse systemctl Command restart httpd service , Use
netstat -ntlp
command , Check to see if there is 80 Port listening
4. Set up httpd Service startup
grammar :systemctl enable httpd
Check whether the startup is set successfully
command :systemctl enable httpd
5. to open up 80 port
command :firewall-cmd --zone=public --add-port=80/tcp
- verification
adoptifconfig
Command view ip
2. install MySQL
1. download MySQL Of yum Source
because yum Not on source mysql-server, Therefore, you must go to the official website to download and install
command :wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
2. add to MySQL Of yum Source repository
command :rpm -ivh mysql-community-release-el7-5.noarch.rpm
3. install MySQL
command :yum -y install mysql-community-server
4. start-up MySQL
restart mysql service
command :systemctl restart mysqld.service
Check to see if there is MySQL Port number 3306
5. Initialize database
command :mysql_secure_installation
Set up super administrator root password , notes : The default is empty. , Just go back
Remove anonymous users
Do not disable root Remote connection
Do not remove the default database ( The test case )
Reload permissions
Test connection MySQL
command :mysql -uroot -p
Input password
3. PHP install
Installation command :yum -y install php
because php It depends on Apache So restart after installation Apache service
command :systemctl restart httpd
restart httpd
test
First step : Use cd Order to enter /var/www/html Catalog
The second step : Use vim Command to create index.php file
The third step : To write php Code
Access... Through a browser
边栏推荐
猜你喜欢
[calculation of loss in yolov3]
[mainstream nivida graphics card deep learning / reinforcement learning /ai computing power summary]
Principle of persistence mechanism of redis
[crawler] bugs encountered by wasm
Reading notes of growth hacker
【主流Nivida显卡深度学习/强化学习/AI算力汇总】
11.(地图数据篇)OSM数据如何下载使用
redis的持久化机制原理
redis 集群模式原理
多表操作-子查询
随机推荐
【云原生 | Kubernetes篇】Ingress案例实战(十三)
Project summary notes series wstax kt session2 code analysis
全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
【yolov5.yaml解析】
Mongodb replica set
【L1、L2、smooth L1三类损失函数】
POJ 3176-Cow Bowling(DP||记忆化搜索)
1 plug-in to handle advertisements in web pages
Mysql统计技巧:ON DUPLICATE KEY UPDATE用法
Go language learning notes - first acquaintance with go language
Reading notes of growth hacker
c#操作xml文件
codeforces每日5题(均1700)-第五天
11. (map data section) how to download and use OSM data
XML解析
Codeworks 5 questions per day (1700 average) - day 5
Solve the grpc connection problem. Dial succeeds with transientfailure
[loss functions of L1, L2 and smooth L1]
SET XACT_ABORT ON
报错ModuleNotFoundError: No module named ‘cv2.aruco‘