当前位置:网站首页>Configure lamp+supervisor
Configure lamp+supervisor
2022-07-02 17:22:00 【php_ kevlin】
( Inventory articles )
One . install apache
yum list installed | grep httpd // View local httpd Installation package
yum install httpd -y
systemctl start httpd.service
systemctl enable httpd.service // Boot up
Two . install Mysql
1. download mysql Source installation package
wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
2. Use yum Install the downloaded source installation package locally
yum localinstall mysql57-community-release-el7-11.noarch.rpm -y
3. Check mysql Source installed successfully
yum repolist enabled | grep "mysql.*-community.*"
4. modify yum Source 【 Skippable 】
vim /etc/yum.repos.d/mysql-community.repo
Change the default installed mysql edition . For example, to install 5.6 edition , take 5.7 The source of enabled=1 Change to enabled=0. And then 5.6 The source of enabled=0 Change to enabled=1 that will do .
If you make a mistake :
Source “MySQL 5.7 Community Server” Of GPG Key installed , But not for this package . Please check the public key of the source URL Whether the configuration is correct . The failed package is :mysql-community-libs-compat-5.7.37-1.el7.x86_64
GPG The key is configured as :file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Execute this command :rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
5. install mysql
yum install mysql-community-server -y
- start-up mysql And check its status
Start command :systemctl start mysqld
View its status command :systemctl status mysqld
- Set up mysql Serving the system , Start as the system starts
command :systemctl enable mysqld
command :systemctl daemon-reload
- see mysql Next root The default password of the account
mysql5.7 After installation , stay /var/log/mysqld.log In the document root Generated a default password . Find... In the following way root Default password , Then login mysql.
command :grep ‘temporary password’ /var/log/mysqld.log
[[email protected] package]# grep 'temporary password' /var/log/mysqld.log
2022-01-30T01:39:40.234451Z 1 [Note] A temporary password is generated for [email protected]: >uDedmEH,2*2
among >uDedmEH,2*2 Part is the default password
9.2. modify my.cnf file (/etc/my.cnf)
9.2.1. Change password policy
stay mysql Configuration file for my.cnf Add the following settings to the file
Password selection policy : validate_password_policy = 0
If you don't need a password policy , Disable password policy :
validate_password = off( There is a problem )
First look at the log , Positioning error . Use the following command to view the log :
cat /var/log/mysqld.log | grep 'ERROR'
9.2.2. Modify the character encoding to utf8
stay my.cnf Medium [mysqld] Add the following configuration
character_set_server = utf8init_connect = 'SET NAMES utf8'
restart mysql, Make configuration effective
command :systemctl restart mysqld
- Sign in mysql
command :mysql -uroot -p
Input password : The default is just found Jb2h<%lp9itY
- Change Password
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456'
Or order :set password for 'root'@'localhost'=password('123456');
- Add remote account
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
Make settings effective
FLUSH PRIVILEGES;
3、 ... and . install PHP
1. install epel-release
yum install epel-release -y
2. Switch source
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Use yum list Command to view installable packages (Packege)
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
3. install php56 And related expansion packages
yum install -y --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-fpm php-soap php-gd --skip-broken
Subsequent complement
yum install -y --enablerepo=remi --enablerepo=remi-php56 php-soapyum install -y --enablerepo=remi --enablerepo=remi-php56 php-gd
4. Configure boot service ( restart apache Extension takes effect )
systemctl restart php-fpmsystemctl enable php-fpm
5. Check whether the installation is successful
ps -ef | grep phpnetstat -anp | grep 9000
3. Modify the configuration file , Configure the corresponding virtual domain name , And then restart apache
#/etc/httpd/conf/httpd.conf The last line Include conf/extra/*.conf
#/etc/httpd/conf/extra/httpd-vhost.conf<VirtualHost *:80> DocumentRoot "/project/www.baidu.com/htdocs" ServerName www.dmd.test ErrorLog "/var/log/dmd_error.log" CustomLog "/var/log/dmd_access.log" common <Directory "/project/www.baidu.com"> Options FollowSymLinks ExecCGI AllowOverride All Require all granted DirectoryIndex index.php index.html error/index.html </Directory> Alias /admin /project/www.baidu.com/libs/dmdelivery/admin Alias /x /project/www.baidu.com/libs/dmdelivery/htdocs Alias /mailings /project/www.baidu.com/mailings SetEnv CONFIG_DIR /project/www.baidu.com/admin</VirtualHost>
4. stay php.ini Set in date.timezone The value of is PRC, Set the future as :date.timezone=PRC, At the same time, uncomment this line of code , That is, remove the semicolon in front
[[email protected] libs]# vi /etc/php.ini [[email protected] libs]# systemctl restart httpd
5. Preliminary completion
Four : install supervisor
1. Use yum install supervisor
yum install supervisor -y
Set power on self start
systemctl enable supervisord.service
2. By default /etc/supervisord.conf file , Modify the last line
[include]files = /data/supervisord.d/*.ini
3. start-up
supervisord -c /etc/supervisord.conf # Start with the default configuration file , namely /etc/supervisord.conf
First of all to enter supervisor Console :
supervisorctl
Then read the configuration again :
reread
Update configuration :
update
Start all configurations :
start all
View all status :
status
边栏推荐
- Nexus简介及小白使用IDEA打包上传到Nexus3私服详细教程
- VMware install win10 image
- 海思Hi3798MV100机顶盒芯片介绍[通俗易懂]
- A few lines of code to complete RPC service registration and discovery
- IPtables中SNAT、DNAT和MASQUERADE的含义
- Explanation of traceroute command
- Fuyuan medicine is listed on the Shanghai Stock Exchange: the market value is 10.5 billion, and Hu Baifan is worth more than 4billion
- ROS知识点——ros::NodeHandle n 和 nh(“~“)的区别
- ThreadLocal
- Sword finger offer 27 Image of binary tree
猜你喜欢

Experience home office, feel the completion of the project | community essay solicitation

福元医药上交所上市:市值105亿 胡柏藩身价超40亿

Green bamboo biological sprint Hong Kong stocks: loss of more than 500million during the year, tiger medicine and Beijing Yizhuang are shareholders

Use the API port of the bridge of knowledge and action to provide resources for partners to access

剑指 Offer 21. 调整数组顺序使奇数位于偶数前面

ThreadLocal

例题 非线性整数规划

【征文活动】亲爱的开发者,RT-Thread社区喊你投稿啦

寒门再出贵子:江西穷县考出了省状元,做对了什么?

Weili holdings listed on the Hong Kong Stock Exchange: with a market value of HK $500million, it contributed an IPO to Hubei
随机推荐
si446使用记录(一):基本资料获取
QStyle实现自绘界面项目实战(二)
剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
相信自己,这次一把搞定JVM面试
IPtables中SNAT、DNAT和MASQUERADE的含义
How to transfer business data with BorgWarner through EDI?
[fluent] dart data type map type (create map set | initialize map set | traverse map set)
剑指 Offer 25. 合并两个排序的链表
什么是敏捷开发流程
Qstype implementation of self drawing interface project practice (II)
二、mock平台的扩展
ThreadLocal
一文看懂:数据指标体系的4大类型
例题 非线性整数规划
JS delete substring in string
深度之眼(二)——矩阵及其基本运算
深度之眼(三)——矩阵的行列式
綠竹生物沖刺港股:年期內虧損超5億 泰格醫藥與北京亦莊是股東
剑指 Offer 27. 二叉树的镜像
【Leetcode】14. Longest Common Prefix