当前位置:网站首页>Summary method of lamp environment deployment
Summary method of lamp environment deployment
2022-06-12 10:26:00 【We met at the edge of the mountain】
1. First of all to see linux Whether the firewall of the environment is turned off
systemctl status firewalld - If the status parameter of the firewall is inactive, The firewall is closed .
- If the status parameter of the firewall is active, The firewall is on . In this example, the firewall is on , So you need to turn off the firewall .
1.1 Turn off firewall
systemctl disable firewalld2. close SELinux.
vi /etc/selinux/config
Edit bottom SELINUX It is amended as follows disabled Then press In parentheses ( :wq! ) Save and exit
3 install apache
yum -y install httpd httpd-manual mod_ssl mod_perl mod_auth_mysql3.1 function httpd -v The command can be viewed Apache Version number of
3.2 Run the following commands in sequence to start Apache Service and set the service startup and self startup
systemctl start httpdsystemctl enable httpd In the browser address bar of the local machine , Input http:// Instance public network IP The following figure shows that the configuration is successful

4. Install and configure MySQL
Run the following command to update YUM Source
rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpmRun the following command to install MySQL.
yum -y install mysql-community-serverRun the following command to see MySQL Version number
mysql -VRun the following command to start MySQL
systemctl start mysqldRun the following command to set the boot up MySQL.
systemctl enable mysqldsystemctl daemon-reloadRun the following command to see MySQL The initial password for . After executing the following statement Half of the password is the last value
grep "password" /var/log/mysqld.logFirst, you need to log in to according to the default password obtained above mysql Execute the following statement perhaps
Here you can get the default password or directly modify it and enter it
update user set password=password( " Your own password " ) where user= 'root' ;Or you can directly use the following statement to configure mysql The security of ( Recommend the above ) You don't have to worry about the bottom
mysql_secure_installationThe following statement will show the information Knowledge disclosure
Reset root Password of account
Enter password for user root: # Enter the root User initial password
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration of the plugin.
Using existing password for root.
Estimated strength of the password: 100
Change the password for root ? (Press y|Y for Yes, any other key for No) : Y # Whether or not to change root User password , Input Y
New password: # Enter the new password , The length is 8 to 30 Characters , Must contain both uppercase and lowercase letters 、 Numbers and special symbols . The special symbol can be ()` [email protected]#$%^&*-+=|{}[]:;‘<>,.?/
Re-enter new password: # Enter the new password again
Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : YInput Y Delete anonymous user account .
By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y # Whether to delete anonymous users , Input Y
Success.Input Y prohibit root Account remote login .
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y # prohibit root Remote login , Input Y
Success.Input Y Delete test Library and pair test Library access .
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y # Whether or not to delete test Library and access to it , Input Y
- Dropping test database...
Success.Input Y Reload authorization table .
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y # Whether to reload the authorization table , Input Y
Success.
All done!5 install PHP
to update YUM Source .
Run the following command to add epel Source
yum install -y \
https://repo.ius.io/ius-release-el7.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmRun the following command to add Webtatic Source .
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmRun the following command to install PHP.
yum -y install php70w-devel php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-pdo.x86_64 php70w-mysqlnd php70w-fpm php70w-opcache php70w-pecl-redis php70w-pecl-mongodbRun the following command to see PHP edition .
php -vThe return result is as follows , Indicates successful installation .
Run the following command , stay Apache Create a test file from the root of the website .
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.phpRun the following command to restart Apache service .
systemctl restart httpd In the browser address bar of the local machine , Input http:// Instance public network IP/phpinfo.php And press Enter key .
The display page indicates that the installation was successful .
6. install phpMyAdmin
phpMyAdmin It's a MySQL Database management tools , adopt Web Interface management database is convenient and fast .
Run the following command to prepare phpMyAdmin Data storage directory .
mkdir -p /var/www/html/phpmyadmindownload phpMyAdmin Compressed package
cd
wget https://files.phpmyadmin.net/phpMyAdmin/4.0.10.20/phpMyAdmin-4.0.10.20-all-languages.zipdecompression phpMyAdmin Compressed package
yum install -y unzip
unzip phpMyAdmin-4.0.10.20-all-languages.zipRun the following command to copy phpMyAdmin File to the prepared data storage directory .
mv phpMyAdmin-4.0.10.20-all-languages/* /var/www/html/phpmyadmin In the local machine browser address bar , Input http:// Instance public network IP/phpmyadmin And press Enter key , visit phpMyAdmin The login page Then login root + Operate with a password
边栏推荐
- 2022京东618预售定金怎么退?京东618定金能退吗?
- Win10 professional edition user name modification
- Circuitbreaker fuse of resilience4j - circuitbreakerconfig configuration
- CONDA install tensorflow test tensorflow
- Properties Chinese garbled code
- Chapter 3 search
- 2021-02-22
- How to play the 2022 Taobao 618 Super Cat Games? Playing skills of 2022 Taobao 618 Cat Games
- Halcon combined with C # to detect surface defects -- affine transformation (III)
- How high can C language reach by self-study alone?
猜你喜欢

Add jar package under idea2018 web project

IoT简介

Getting started with cloud API basics -- basic knowledge of picgo writing plug-ins

【机器学习】基于鸢尾花(iris)数据集的逻辑回归分类实践
![[CEGUI] concept introduction](/img/a6/695d7f1a4e57c8438e2d1a4cad11dc.jpg)
[CEGUI] concept introduction

Dynamic proxy
![[experiment] MySQL master-slave replication and read-write separation](/img/aa/7d0799013ff749cacf44ba3b773dff.png)
[experiment] MySQL master-slave replication and read-write separation

First NFT platform in dfinity Ecology: impossible thoughts

性能指标的信仰危机
![[Mozilla] basic concept analysis of IPDL](/img/b2/97b4db069052133ee614ecb1a8369e.jpg)
[Mozilla] basic concept analysis of IPDL
随机推荐
[DDS] ddsi-rtps specification
How high can C language reach by self-study alone?
Download Notepad++
Student management system
2022淘宝618超级喵运会玩法来了 超级喵运会有哪些攻略方法
Pagoda chevereto1.6.2 the latest version of stepping on the pit tutorial in Chinese
Machine learning is not something you can use if you want to use it
Antique mfc/gdi+ Frame LCD display control
reflex
[SQLite3] memory debugging
MQTT 协议中文版
[Mozilla] basic concept analysis of IPDL
PHP maximum balance method to solve the problem that the sum of the final percentages is not equal to 100
JVM (V) Virtual machine class loading (parental delegation mechanism)
How to play the 618 super cat games on Taobao? Here comes the introduction to the overall activities of the Super Cat Games
Get array median
Implementation principle of redisson distributed lock
[CEGUI] font resource loading process
[CEGUI] log system
A snare - Cookie spoofing