search
HomeBackend DevelopmentPHP Tutorial在Linux平台下使用PHP开发网站

本人php程序员,工作经验即将满一年,现在有跳槽的想法,在拉勾上看了很多中大型公司对php程序员的要求都会提到一点“在Linux平台下使用PHP开发网站”。
本人对这句话不是特别理解,怎样才算在Linux平台下使用PHP开发网站?
在win下开发,然后linux下运行?
在linux下开发,之后在linux下运行?
linux下怎样开发呢?本人对于linux,目前只是知道一些简单指令操作。
希望在这里能有大神、有经验者、大牛为本人解答一下。
无以为报,只能先说感谢——————一个努力的phper!

回复内容:

本人php程序员,工作经验即将满一年,现在有跳槽的想法,在拉勾上看了很多中大型公司对php程序员的要求都会提到一点“在Linux平台下使用PHP开发网站”。
本人对这句话不是特别理解,怎样才算在Linux平台下使用PHP开发网站?
在win下开发,然后linux下运行?
在linux下开发,之后在linux下运行?
linux下怎样开发呢?本人对于linux,目前只是知道一些简单指令操作。
希望在这里能有大神、有经验者、大牛为本人解答一下。
无以为报,只能先说感谢——————一个努力的phper!

这句话具体什么含义确实很难搞清楚,这些职位要求都是大家互相抄,很多 HR 对技术一知半解,照样写职位要求。
不管怎么说,只要你熟练使用 Linux,又有何惧呢?


另外:关于 Linux,我认为开发者不是运维,重点在开发,所以在成为大牛前 Linux 要多牛逼也不是必须的,因为更多的PHPer 写的是业务,不是内核。当然,这并不是你不搞 Linux 的借口。Linux 的基础知识 、常用命令还是要的。建议坚持使用一年的 Linux 桌面(可以考虑 UbuntuFedora 这两个发行版),多用 Shell 处理问题(我曾经就是这么干的。),Linux 自然就熟了。我看到很多人说 Linux 下没有好的 PHP IDE,我就郁闷了,难道他们用的都不是 PHPStorm

开发是一回事,部署是另外一回事,在win上开发的代码部署到linux上环境上不一定能正常运行,特别涉及到文件权限的问题。所以一般开发php的都要求掌握linux相关的知识,因为大部分php都会部署在linxu server上。

额,说得好像linux下没有php的IDE一样。。。还有linux开发网站怎么就不方便了,除了要兼容调试IE

回答这个问题的各位同仁,你们真的是在linux开发和部署项目的吗?你们真的是了解了“在Linux下开发”的真实需求吗?

举个栗子:求PHP高效遍历文件夹的方法
http://www.oschina.net/question/260395_162648

在Linux上开发,要求你了解Linux下最常见的文件操作、网络操作、异常处理、shell、任务、定时、权限。
不管你是在Windows下开发,还是Linux下开发,只要项目能在Linux上运行,我觉得都可以称为是侠义的Linux上开发。但如果连Linux最核心的大招都不会使用(如awk、sed、shell、lvs、Hdfs、计划任务、多进程),即使是在Linux上开发和部署的,用的还是从Windows上学来的冗长、低效的代码,那我觉得也不叫“Linux上开发”。

我觉得“Linux上开发”可以理解为,可以掌握Linux上开发的常见问题及解决办法、性能优化方法、集群搭建方法,掌握Linux下文件(协议)操作、网络(协议)操作、集群搭建方法,能用Linux命令、扩展,能稳定、快速的解决项目的业务,能使用Linux实现较低成本获取较高的性价比的开发。

高手,善于运用工具,而Linux,就是最终极的武器。你用过了吗,会用吗?

这句话翻译过来是这样的:
“熟练使用Linux操作系统完成php开发任务”

开发和运行是分不开的,我个人的习惯是改一点,打开网页测试一下。所以关于这个问题我个人的理解就是在Linux下配置整套开发和运行环境,可以直接在Linux下写php代码,通过访问localhost来测试网站。

你不可能每次写完之后都部署到服务器上去运行吧。php打开个文本编辑器就能写,而且apache和mysql在linux底下也有,在哪里不能开发呢?lamp里面那个l就是linux。

或者可以理解为vim你熟练掌握了没?

我曾经也有这样的疑问,但是linux开发网站会非常不方便,除非是mac 电脑。
纯手写的代码可以比得过IDE?

在widows下使用IDE开发PHP网站,在linux托管运行,我就一直是这么干的。

如果要求高一点的话,这句话可以理解为:会在linux下搭建lamp/lnmp,熟练使用常用命令,会查错误日志,针对一些报错能找到解决方案,熟练运用vim。

个人觉得,首先要熟练Linux下php环境的配置,php开发工具、测试工具的使用。

然后熟悉nginx配置,nginx如何运行php的,与apache的比较(apache以php_module方式运行,nginx以fastcgi方式运行)。

另外要懂一些运维知识,懂一些运维知识对开发是有好处的,就像运维人员需要懂点开发一样。

熟练linux下php性能监控,压测。监控CPU使用率,分析php-fpm输出日志,跟踪进程等,这些使用linux命令就可以完成。

个人见解,希望对你有帮助。

其实在你只要服务器环境是linux就行了,开发在windows也无所谓,像我就是用vbox里面装ubuntu来配置LNMP环境,在windows下做开发。不过想要学好linux最好还是装在自己桌面上,推荐ubuntu,cent也行

有什么大的区别么……配置文件基本一样……
桌面发行版开发和windows没什么大区别,IDE都跨平台的……
部署的时候只能SSH连终端而不是windows的远程桌面这是唯一觉得不爽的。
习惯就好。

linux下开发好处不是很多,比如能避免文件名大小写路径反斜杠读写权限等问题,在windows开发你只有部署上去了才能发现!

很简单的,给自己的windows系统装个虚拟机,虚拟机里是centos或乌班图,然后在虚拟机里装php和mysql,部署并测试程序,多试试即可。

楼主可以搜一下LAMP...

我感觉 就是 让你会 lnmp 配置 和一些 linux web 运维的知识 基本上就够了 当然 也有喜欢在linux开发的 这得看个人爱好 我个人感觉 win 和 linux 各有各的好处

千万别在Win下开发PHP 绝对的坑~win下写的PHP代码在linux下各种异常难调试,
虚拟机也别用,用了虚拟机自己心里还是有退路的(分手就应该要痛快)
用半年ubuntu,上手了果断centOS,2年内争取archlinux,笔记本的话就mac,mac下开发的php 在linux下运行都是99%兼容的

不就是想告诉应聘者要自己会搭LAMP或LNMP嘛,这有啥,Centos配配超简单,Linux下写PHP不是也有sublime text嘛,上传用Filezilla,Linux一样搞,这都不是事儿

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Continued Use of PHP: Reasons for Its EnduranceThe Continued Use of PHP: Reasons for Its EnduranceApr 19, 2025 am 12:23 AM

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python: Exploring Their Similarities and DifferencesPHP and Python: Exploring Their Similarities and DifferencesApr 19, 2025 am 12:21 AM

PHP and Python are both high-level programming languages ​​that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP and Python: Different Paradigms ExplainedPHP and Python: Different Paradigms ExplainedApr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python: A Deep Dive into Their HistoryPHP and Python: A Deep Dive into Their HistoryApr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Choosing Between PHP and Python: A GuideChoosing Between PHP and Python: A GuideApr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP and Frameworks: Modernizing the LanguagePHP and Frameworks: Modernizing the LanguageApr 18, 2025 am 12:14 AM

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHP's Impact: Web Development and BeyondPHP's Impact: Web Development and BeyondApr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool