talking about the construction of an efficient dynamic website, we have to mention LAMP, the Linux operating system, Apache Web server, MySQL database, Perl, PHP or Python programming language, the structure of the Web site Architecture framework, its greatest advantage is 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.
Start Learning 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.
650) this.width=650; "src=" Https://static.oschina.net/uploads/space/2017/0409/124635_SlMj_3311226.png "alt=" 124635_slmj_3311226.png "/>
How to build 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 the operation, if you can query the data normally, then our The lamp environment is built to complete.
for further familiarity with Linux system, I decided to install another Linux OS for daily development, there are a lot of popular distributions, such as Debian, Red Hat (Redhat) http://www.linuxprobe.com/ chapter-00.html,Ubuntu (including Kubuntu,xubuntu, etc.), OpenSuse (original SuSE), Mandriva (original Mandrake), CentOS, Fedora , Veket and so on, 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.
Install well After Ubuntu, my first step is to build the PHP development environment, directly using the Apt-get installation software, of course, the installation of the Deb package and the unique Ubuntu features of the new software package management and other 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 a lot of 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 using the Unity-tweak-tool, which is a very useful unity graphical management tool that can modify the workspace, number of hot zones, etc. Theme I recommend the use of flatabulous, it is a flat theme of Ubuntu, but also I have tried many themes favorite one!
Thus, a personalized Linux OS is a success, but it is recommended that you look at 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!
This article is from the "12629896" blog, please be sure to keep this source http://12639896.blog.51cto.com/12629896/1914269
The path of Linux Learning for PHP developers