简体   繁体   English

Amazon Linux EC2上的PHP服务器

[英]PHP Server on Amazon Linux EC2

I recently created a PHP server on an Amazon EC2 Linux AMI instance and I am struggling to figure out how do to upload the PHP code to in order to be displayed on the browser from a .php file type setting. 我最近在Amazon EC2 Linux AMI实例上创建了一个PHP服务器,并且我正在努力寻找如何将PHP代码上传到的方法,以便通过.php文件类型设置在浏览器上显示该代码。

The only option that was availiable to me to write PHP code and have it displayed was through creating a script directly from the Linux Terminal using the following commands 我编写PHP代码并显示出来的唯一选择是使用以下命令直接从Linux Terminal创建脚本

>SamplePage.php   #this creates the php file
nano SamplePage.php   #this opens the editor to start writing the code in the terminal.

However is there a visual interface that I could use to upload php code files/documents/pictures. 但是,有一个可视界面,我可以用来上传php代码文件/文档/图片。 So that I can click and drag the .php file on to the server without typing it on the terminal? 这样我就可以单击.php文件并将其拖到服务器上,而无需在终端上键入它?

Does the phpMyAdmin do that? phpMyAdmin是否这样做? Or is is only for used managing MySQL (database) tasks and not for uploading PHP files/graphs/pictures needed to develop a fully integrated site? 还是仅用于管理MySQL(数据库)任务,而不是用于上传开发完全集成的站点所需的PHP文件/图形/图片?

By the way, here are the instructions I used to create the LAMP server with PHP as well as MySQL. 顺便说一下,这是我用来用PHP和MySQL创建LAMP服务器的说明。 https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html

  • phpMyAdmin is a web-interface for managing databases. phpMyAdmin是用于管理数据库的Web界面。

  • You could check if there is already some ftp -server installed. 您可以检查是否已经安装了ftp -server。 Like vsfpt (just an example, there are a lot more free & open source ftp-servers available). vsfpt一样(仅作为示例,还有更多免费的开源ftp服务器可用)。 if you encounter any problems with that a good place to ask questions related to hosting and servers is ServerFault 如果您遇到任何问题,那么ServerFault就是一个很好的地方来询问与主机和服务器有关的问题

  • You could also transfer the files via ssh -connection with the help of scp (See: How to copy files from one machine to another using ssh or How to upload local system files to Amazon EC2 using ssh ). 您也可以在scp的帮助下通过ssh -connection传输文件(请参阅: 如何使用ssh将文件从一台计算机复制到另一台计算机,如何 使用ssh 将本地系统文件上传到Amazon EC2 )。 Another option would be to use a visual ssh-client. 另一种选择是使用可视ssh-client。

  • There is also server-management software available that offer a visual file-manager as a website, like plesk , but since you already setup most of the stack this would be hard to do on top of that. 还有可用的服务器管理软件,可以像plesk一样提供可视文件管理器作为网站,但是由于您已经设置了大多数堆栈,因此很难做到这一点。

  • There are many IDEs and Editors that have support for SSH and SCP. 有许多支持SSH和SCP的IDE和编辑器。 Either built in or through plugins. 内置或通过插件。 For example: Eclipse, Netbeans, Atom and VSCode. 例如:Eclipse,Netbeans,Atom和VSCode。 All of which are free and can be configured to support PHP development. 所有这些都是免费的,可以配置为支持PHP开发。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM