The path of Linux Learning for PHP developers

Source: Internet
Author: User
Tags php development environment thunderbird mail

Talking about the construction of an efficient dynamic website, it is necessary to mention that lamp, the Linux operating system, Apache Web server, MySQL database, Perl, PHP or Python programming language, such as the formation of open-source products, the main advantage is the open, high security, and low cost. As a result, lamp has become an international popular website building scheme. And as a PHP developer, at work, it is common to use lamp to develop a high-performance website, and of course, there are other building plans, such as Lnmp,wamp. Therefore, the Linux system is not only the foundation of a high-performance website, but also a required course for a PHP developer.

Beginning to learn Linux system, book tutorial aspect, I choose is this language concise, easier to use "Linux should learn", it is a practical Linux self-study books, its author Liu Yan engaged in the Linux operation and maintenance technology industry for many years, through the Red Hat Architect Certified RHCA certification, The learning ecosystem is perfect, with complete books, websites, professional training, forums and other community Linux learning ecosystems. Of course, for the slow-paced students, but also through the network of teaching video to study; then, following the tutorial, I used VMware installed a virtual machine under Windows, configure the CentOS system, the first step of course is familiar with the basic operation of Linux commands, such as the document management of the RM, MV, CAT, Disk Management CD, LS, fdisk and so on. Of course, in the familiar with its basic commands, but also learn the Linux directory structure, rights Management, process management and other basic knowledge, I do not repeat. Here I recommend a few commands for process management: PS, used to display the current process status, commonly used with Ps aux, Ps-ef, Ps-efh. Dstat: Dynamic system Resource Statistics command. Top: Dynamic display of the inux process. Htop: Interactive Process Viewer. These commands are very helpful to our process management.

How to build a lamp environment? The first step of course is to download and install the necessary products, the order is generally: Apache, MySQL, PHP, of course, every software under Linux has a variety of dependencies, manual installation depends on a very complex work, so the package manager came into being, CentOS uses the Yum Package Manager, It will automatically install the dependent packages we need to install, just enter this command: yum-y install httpd mysql mysql-server php php-mysql PostgreSQL postgresql-server Php-postgresql php-pgsql php-devel, installation process about a few minutes, installation completed.

The second step is to test if the environment is working (run), first, we start the Apache server:/ETC/RC.D/INIT.D/HTTPD start, detect boot results after startup: PS aux | grep httpd, if a bunch of processes have occurred, then the Apache network server is functioning properly, then, I use the ifconfig command to view the IP of the server and to enter the Web site root directory to create a phpinfo.php program to view the configuration information of PHP, if the configuration information is properly displayed, then the PHP module is configured to complete, then the database configuration, of course, the first step is to start the database:/ Etc/rc.d/init.d/mysqld start, and then check the startup result: NETSTAT-TULNP | grep:3306, the result is normal start, then I go into MySQL database, create a new table for testing, and simply insert a few data, and then write a PHP connection to the MySQL database test code:

After running, if you can query the data normally, then our lamp environment will be built.

To become more familiar with Linux systems, I decided to install another Linux OS for daily development, with many popular distributions such as Debian, Red Hat (Redhat), Ubuntu (including Kubuntu,xubuntu, etc.), OpenSuse (original SuSE), Mandriva (formerly Mandrake), CentOS, Fedora, Veket, etc., each has its advantages and disadvantages, I do not discuss it in depth. I finally chose Ubuntu to be installed because of its friendly interface and the integration of many common software.

After installing Ubuntu, my first step is to build PHP development environment, directly using Apt-get installation software, and of course, the installation of the Deb package and the unique features of Ubuntu new software package management methods. When installing Google Chrome, you find that you are missing a dependency package, and this command will help you install the dependency package automatically: sudo apt-get install-f. Of course, in the Ubuntu system there are many good software, such as browser: Firefox, Google, Opera, music player has: audacious, Rhythmbox. I personally recommend several practical software: Google Chrome, wps file processor, Atom Code Editor, Thunderbird Mail, FileZilla and so on.

After installing the necessary software, I decided to beautify my desktop, Ubuntu has many very beautiful themes, you can even build it as a Mac interface style, you can refer to the online information, adjust the desktop environment, I recommend the use of Unity-tweak-tool, This is a very useful unity graphical management tool, you can modify the workspace, the number of hot zones and so on. Theme I recommend the use of flatabulous, it is a flat theme of Ubuntu, but also I have tried many themes favorite one!

At this point, a personalized Linux OS is a success, but it is recommended that you read the book "Linux should Learn" to learn the Rhel 7 system to cater for more distribution systems. So far, the Linux system has become a part of my development work, simple instruction operation, full open permissions, stable operation efficiency, previously in Windows very cumbersome operation, under Linux only need a command, in the development work greatly save the time cost. I think, for developers, not just PHP developers, Linux system for us is indispensable to the work platform!

The path of Linux Learning for PHP developers

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.