当前位置:网站首页>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
边栏推荐
- JS delete substring in string
- Geoserver: publishing PostGIS data sources
- si446使用记录(一):基本资料获取
- 剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
- Blog theme "text" summer fresh Special Edition
- 綠竹生物沖刺港股:年期內虧損超5億 泰格醫藥與北京亦莊是股東
- Introduction to Hisilicon hi3798mv100 set top box chip [easy to understand]
- Sword finger offer 25 Merge two sorted linked lists
- A few lines of code to complete RPC service registration and discovery
- Win10 system uses pip to install juypter notebook process record (installed on a disk other than the system disk)
猜你喜欢

AP and F107 data sources and processing

Sword finger offer 26 Substructure of tree

简单线性规划问题

How to transfer business data with BorgWarner through EDI?

Does digicert SSL certificate support Chinese domain name application?

PhD battle-11 preview | review and prospect backdoor attack and defense of neural network

Chapter 3 of hands on deep learning - (1) linear regression is realized from scratch_ Learning thinking and exercise answers
![[fluent] dart data type map type (create map set | initialize map set | traverse map set)](/img/02/75d21470ea0ae4cd3d17696a93d1ca.jpg)
[fluent] dart data type map type (create map set | initialize map set | traverse map set)

深度之眼(三)——矩阵的行列式

福元医药上交所上市:市值105亿 胡柏藩身价超40亿
随机推荐
Schoolbag novel multithreaded crawler [easy to understand]
人生的开始
Understand one article: four types of data index system
class和getClass()的区别
Error when uploading code to remote warehouse: remote origin already exists
Does digicert SSL certificate support Chinese domain name application?
Win10 system uses pip to install juypter notebook process record (installed on a disk other than the system disk)
Eye of depth (II) -- matrix and its basic operations
SSB threshold_ SSB modulation "suggestions collection"
几行代码搞定RPC服务注册和发现
移动应用性能工具探索之路
一年顶十年
Eye of depth (III) -- determinant of matrix
chmod命令原理及用法详解[通俗易懂]
【Leetcode】14. 最长公共前缀
PCL知识点——体素化网格方法对点云进行下采样
LSF basic command
Dgraph: large scale dynamic graph dataset
关于我
Vscode setting delete line shortcut [easy to understand]