phpstorm connects to the server remotely and updates the release code in real time (thinkphp6.0.7)

I want phpstrom to connect to the server remotely

Step1
打开phpstorm Tools->Deployment->Configuration
Insert picture description here
Step2
Start configuring connection parameters, my Ali cloud server,
Insert picture description here
the next there can test a Test Sftp connection to test the connection of
Insert picture description here
Insert picture description here
choice yes

Insert picture description here
Next
Step3
: After the Text-to-HTML conversion tool
Insert picture description here
Insert picture description here, continue to connect to your server, and click to the end.

Insert picture description here
Then if you want to update this option in real time,
Insert picture description here
I have to click on it. I use thinkphp6. Let’s talk about the installation first
because composer must be used to install above tp6. Visit the composer official website for windows. For details, please see composer . For
linux, follow the prompts to install composer .
Insert picture description here
Due to well-known reasons, the connection speed of foreign websites is very slow. Therefore, the installation time may be relatively long, and it is recommended to use a domestic mirror (Alibaba Cloud). composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
Insert picture description here
After composer is installed, you can follow the documentation to figure it out.
I use the pagoda. First, I have to disable two functions in php.ini, but basically it should be banned in higher versions of php. I guess haha, I use If it is php8.0 or above, lnmp is used.
In php.ini, search for disable_functions and kill putenv and proc_open (otherwise there is a problem with installing composer), and ignore if there are any

Insert picture description here
In addition, if our site is nignx, you need to make the following settings for the site, otherwise the tp6 site cannot be opened.
Insert picture description here
Then if you successfully reach the smiley page, the thunder has not been stepped on, so the tp6 configuration will not be said, just check the document.
When I connected to the database at that time, it appeared Host '8.192.1.1' is not allowed to connect to this MYSQL server.
Before that, make sure that port 3306 is allowed. If not, add it.
Enter mysql first.
Insert picture description hereInsert picture description here

  
mysql>update user set host = '%'  where user ='root';  
  
mysql>flush privileges;  
  
mysql>select 'host','user' from user where user='root';  
  
mysql>quit  

Restart the mysql service service mysql restart

select host,user from user; (分号要加上)

Insert picture description here
You can use the newly created user name or root to access. Just pay attention to the hostname. At this time, you can configure it in the environment variable or config database.
After recommending the database , you can write bugs happily~~~~
Welcome everyone to visit My website pandaqi .

Guess you like

Origin blog.csdn.net/weixin_44088587/article/details/114915313