I would like to ask you how all the projects developed in combination with Linux are deployed on the Linux server. The development process also advocates using the Linux environment to run programs for testing, don't trace the problem until the final launch is detected. we know that the Linux problem is not taken into account in Windows testing. of course, this problem may be rare, the classic problem I encountered was that the file name was not case-sensitive, and the file could not be found after being deployed to Linux. In addition, the file directory read and write permissions were not set, which made some Upload functions unavailable, it was a long time ago, and now I am running programs in Linux, so I can find out
I want to know how the project is deployed on Linux and how it is implemented during the development process?
1. first, I learned that some people use wamp on their own work machines to build an apache/nginx environment on windows to run their own test programs, after confirming that the function is developed, submit it to the company's Linux testing machine for further testing, and finally deploy and launch it.
2. if you have to test the linux environment in your computer, you can either run the code in windows and upload the file to the linux virtual machine. Then, create a host pointing to linux, in this way, I access this host for testing. I am using this method. I don't know if most phper uses this method, or it is still running in windows.
My first question is: what is the necessity of running a program test in linux during personal development? Because running a linux virtual machine consumes some memory, the machine gets stuck a little more. The Boss is the most boring and only gives you 1 GB physical memory. although our company comes standard with 4 GB memory, I am 8 GB, but I also sympathize with 2 GB colleagues who are running the program. in linux, is the advantage of running a personal test far greater than the cost of reducing the machine running speed? It doesn't seem to work. some colleagues secretly ran back to windows for a personal test.
The second question is, if most phper runs personal development in linux, does it write a file in windows or write code in linux? If a file is written in windows, five or six files are involved in a single function, and each time a file is written, the file is uploaded? However, if I write code in linux, although I realize that it is not fast to use a variety of vim commands, but sometimes it does not seem so convenient, I am maintaining a class, I want to quickly locate the method I want, but I don't remember the spelling. in this case, I can find the method name through character search, however, you cannot directly double-click the method list of a Class like IDE to jump to the fixed line. so I can only use vim in linux. I don't know if this is true, I have heard of people like this, and it seems that there are only a few
Of course, I developed it in windows and uploaded it to linux for running. here I want to know how to solve this file transfer problem. there are actually many methods, the old samba, ftp/sftp, ssh, and I use mount. I tried to change it once to transfer the specified file through FTP. switching the window is too frequent and troublesome.
So now we share the directory D:/dev/project in windows and name it project.
Create a windows user test and password test
In linux, mkdir/var/www/project
Mount-t cifs-o user = test, pass = test, rw, uid = uid of a linux user, gid = gid of the linux group // 192.168.1. physical Machine/project/var/www/project
Of course, the Mount command is also written in/etc/rc. local.
In this way, files are modified in windows. linux will be synchronized immediately. I don't know if this is the case for everyone. I still use ftp to drag files again and again, the disadvantage is that the physical machine requires a little hardware performance. However, even if this is done, it may not be easy to find the problem caused by the read and write permissions, that is, it is closer to the online environment and more comfortable to develop.
Reply to discussion (solution)
Onlookers
Directly develop on windows. you can avoid some problems in windows. for windows development, directly use svn. you can deploy the Test environment on linux and directly use svn up.
Write files directly in Linux. if the server is a Linux client Win, use FTP.
Window development, through svn, git submitted to the server. during development under window, you need to pay attention to a series of issues such as case and permission in Windows and linux, if it is a rented server or vps, you can upload files in the window to the server through ftp.
In this way, it seems that the above replies are all coded in Windows and then run directly in Windows.
After the test, it will be handed over to the server through FTP or svn for running, right?
Because the program on the online server cannot be modified at will, it is impossible for a developer to submit SVN and upload the file to the remote server, resulting in online changes, after development, any developer can only submit the SVN check file to the intranet uniform test server. after the test, the technical manager will review and confirm that the file is correct and then package it online separately.
But the relationship is not big. what I care about is how many people directly run their own code in Linux. if so, do you really use vim? How can we solve code navigation problems with vim? it seems that IDE operations on Windows are more convenient and convenient. besides, vim cannot reconstruct variables.
There are also available IDE development tools in Linux, and it is smoother than running in Windows. the specific deployment method depends on your work environment. on the server, VIM is sometimes a last resort... who wants to use that VIM to crack the code...
There are also available IDE development tools in Linux, and it is smoother than running in Windows. the specific deployment method depends on your work environment. on the server, VIM is sometimes a last resort... who wants to use that VIM to crack the code...
I know that linux has a desktop environment and Eclipse and other things. I did not try this aspect. I will try it later.
In terms of VIM, we have heard that the editing speed is far higher than that of the Windows editor. it is mainly used to familiarize yourself with various commands and shortcut keys, which requires a relatively high level of proficiency, in general, I agree, but recently I found that there is no way to view a method list like IDE and jump to the specified method body. A class that hasn't been moving for a long time suddenly had to maintain that method and had to look at the number of lines in windows and then go back to change it, so I began to question whether VIM is faster than the editor or IDE in windows, or is it just a small part of it not convenient enough?
How many phper playing VIM in linux today?