当前位置:网站首页>Some small problems encountered in using Baidu lightweight server LS
Some small problems encountered in using Baidu lightweight server LS
2022-07-16 05:50:00 【It's the most beautiful, but it's rainy】
List of articles
- brief introduction
- 1. At first, I didn't find the instance I bought ...
- 2. The application image has been selected at the time of purchase , But I don't see the deployed ones in the system LNMP Environmental Science ?
- 3. default lnmp Under which directory are the environments installed ?
- 4. How to modify / Reset default MySQL password ?
- 5. How to install locally nginx?
brief introduction
First, buy a Baidu lightweight application server , New users only need 25 element ( The lowest configuration , Learning is enough ). Buy links
1. At first, I didn't find the instance I bought ...
In the admin console - You can see in the ordered products , Choose the area above , It may take a few minutes to see your own instance after just purchasing .
2. The application image has been selected at the time of purchase , But I don't see the deployed ones in the system LNMP Environmental Science ?

Enter the instance at the beginning , Carry out orders whereis perhaps find / -name mysql None of them Apache、MySQL、php.
My solution is simple , Click to enter the instance you created , Then reinstall the system , Just choose again .
3. default lnmp Under which directory are the environments installed ?
such as apache, have access to whereis apache find , Empathy mysql and php You can also find .
Apache The default is 80 port , Configuration file in /usr/local/apache/conf Under the httpd.conf and /usr/local/apache/conf/vhost In the catalog conf In file , By default, the root directory of the website points to /var/www Catalog .
You can modify the port , You can also use service start httpd; service stop httpd; Start and stop Apache. Direct browser access to the public network ip You can access .
4. How to modify / Reset default MySQL password ?
Because in /var/log Not found in the directory mysqld.log, Therefore, you cannot use this command directly grep password /var/log/mysqld.log.
1. First find MySQL Configuration file for . namely /etc/my.conf file .
2. stay mysqld Add a line to the configuration ,skip-grant-tables=1.( This line of configuration allows super administrators to enter MySQL You don't need a password )
3. And then execute the command :
use mysql;
update user set authentication_string = password("123456") where user="root";
flush privileges;
It should be noted here that , The password modification field of the previous version is password, stay 5.7 The field after version is authentication_string
4. If you want to use navicate And other tools to connect to MySQL Words , This command needs to be executed .update user set host = '%' where user = 'root';
5. Execute the command at this time select host, user from user; If there are two named root Users of , It can be executed delete from user where user='root' and host = '127.0.0.1'; take host Not for % Users delete .
6. The last restart MySQL The service can be . here MySQL Your password has been changed to 123456, And you can use navicate And other tools are connected .
5. How to install locally nginx?
Reference link 1
Reference link 2
install nginx The four dependencies that need to be installed before , The following is their introduction .
1. (GCC(GNU Compiler Collection,GNU Compiler Suite )), You can compile C,C++,Ada,Object C and Java Other languages )
2. pcre It's a perl library , It is mainly used to provide the related functions of regular expressions ;
pcre and pcre devel Is the relationship between inclusion and inclusion ,devel contain pcre
3. zlib It's a free 、 General purpose 、 Not bound by law —— That is, lossless data compression library without any patent protection , Provide compression and decompression methods
4. OpenSSL Is an open source software library package , Applications can use this package for secure communication , Avoid eavesdropping , At the same time, confirm the identity of the connector at the other end .
Be careful : Baidu cloud lightweight application server I use here ,7-10 The dependency library system of step has been installed .
5. Check that... Is installed nginx, command :sudo find -name nginx
6. install nginx Necessary dependency Libraries
7. install gcc command :yum -y install gcc See if it is installed gcc command :gcc -v
8. install pcre command :yum install -y pcre pcre-devel
9. install zlib command :yum -y install zlib zlib-devel
10. install OpenSSL command :yum -y install openssl openssl-devel
11. install nginx The order is as follows
First, go to the root directory ,cd /
And then execute the command wget https://nginx.org/download/nginx-1.20.2.tar.gz ( download nginx Compressed package , You can go to the official website to find other versions :https://nginx.org/en/download.html)
Then decompress :tar -zxvf nginx-1.20.2.tar.gz
Then compile and install :cd nginx-1.20.2 && ./configure && make && make install
Then it's all right , The installation directory is /usr/local/nginx Directory , Then you can go to the root directory and delete the compressed package and decompressed things .
12. Start here nginx There were some problems when I was ! The problem I have , Please watch carefully .
stay /usr/local/nginx/sbin Execute command under directory ./nginx -s reload, I can't find it /usr/local/Nginx/logs/Nginx.pid!
At this time, you only need to execute the command :/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf that will do .
Then execute the start command again :./nginx -s reload.nginx It will start normally .
see nginx Start status command :ps -ef | grep nginx
hold apache Change the default port number of , And then let nginx Default access 80 port , Direct access to the public network ip You can see that nginx Welcome page of , In this way, these two can coexist .
边栏推荐
- Find a value of tree data
- 内网渗透笔记——注册表自启动与msi提权
- Svelte official introductory tutorial (2) - reactivity
- [Huang ah code] getting started with MySQL - 1. SQL execution process
- handsontable pro 授权码 key 生成器(JS函数)(仅供学习交流)
- North tour project notes
- [Huang ah code] today, someone actually asked me: what does where 1=1 mean?
- [BJDCTF2020]Cookie is so stable
- Flag under buuctf mask
- 【黄啊码】redis实现模糊查询并删除|redis根据前缀获取key
猜你喜欢
![[ASIS 2019]Unicorn shop](/img/e2/c295a83e03eeaa720a631f6d736eb2.png)
[ASIS 2019]Unicorn shop

操作系统笔记——Windows应急响应和安全加固
![[Huang ah code] Why do I suggest you choose go instead of PHP?](/img/c7/3abe59ba4fb275cdf550467bc2b05d.png)
[Huang ah code] Why do I suggest you choose go instead of PHP?

Intranet penetration notes - Three Layer Discovery and four layer discovery

js作用域与作用域链
![[NCTF2019]Fake XML cookbook](/img/d4/e5ff896108c86179526a06911abd38.png)
[NCTF2019]Fake XML cookbook

Single file component

Buuctf Dutch broadband data disclosure
![[Huang ah code] wechat applet +php realizes instant messaging chat function](/img/c4/d571f10588b7b4679105f9552bb727.png)
[Huang ah code] wechat applet +php realizes instant messaging chat function

单文件组件
随机推荐
Svelte official introductory tutorial (3) -- props
[NCTF2019]Fake XML cookbook
Collect form data
[BJDCTF2020]Cookie is so stable
Notes - Chang Geng
简单理解TCP的三次握手和四次挥手
2022第十五届全国大学生信息安全竞赛(ciscn)西南赛区部分WP
BUUCTF 九连环
Svelte official introductory tutorial (2) - reactivity
idea发送邮件
Componentized coding process -- todo list case
Advanced architects, 16 common principles of microservice design and Governance
模块化-CMJ&ESM
Sécurité des réseaux intervention d'urgence - technologie de collecte de données électroniques
Understanding service governance in distributed development
[Huang ah code] PHP cooperates with wechat official account to generate promotion QR code
BUUCTF 荷兰宽带数据泄露
Implementation principle of new keyword in JS
[Huang ah code] getting started with MySQL - 1. SQL execution process
BUUCTF 面具下的flag