Learn the simplest LAMP combination in Linux

Source: Internet
Author: User
Learn the simplest LAMP combination of Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. Author: nickchen

The last time we solved the problem that we could not enter XWINDOWS in the virtual machine. This is the LAMP (LINUX + APECHE + MYSQL + PHP) We want to configure today) the environment plays a very important role (in fact, it is convenient. why? Remember when we learned how to install LINUX on the first day, we used custom installation and then chose all services? After you install all the services, the system has configured the LAMP configuration. You only need to do some simple configuration to use it. Let's take a look at how to make these simple configurations.

If we are not sure whether these services are installed in the system, run the following command to view them:

#> Rpm-qa httpd

This is for viewing APECHE. If it is installed, the system prompts XXX4.4 and so on. You can see it at a Glance. If it is not installed, there will be nothing.

#> Rpm-qa mysql

View MYSQL.

#> Rpm-qa php

View PHP.

If it is not installed, it is easy to find the Add/delete service in XWINDOWS and install it as prompted.

Start these three services: the command is as follows:

#> Service httpd start
Start APECHE
#> Service mysqld start
Start MYSQL

Next, let's see if we can access the APECHE service configured by the system in a browser. In a WINDOWS environment, you can use a browser to access it. You can also use a browser to access it in a LINUX environment. You can use the IP address of the network card to access the network card without changing the IP address. (The ip address of the network adapter refers to the ip address you configured for the network adapter.) in my computer, for example, I used IE in WINDOWS to enter 192.168.1.5 (LINUX ip address). Haha. I can see the LOGO of APECHE and some English letters. This indicates that the access is normal. You will ask, aren't I installed PHP too? Don't be alarmed. Let's take a step. Now we use NotePad to compile a PHP information display page with the following content:

   Phpinfo ();
?>

Save it as TEST. PHP. The question is, how can I get the file I wrote in windows to LINUX? Linux is ready for you, so the SAMBA service can solve your problem. Click Little Red Hat, Just Like clicking the Start menu, and then select the server settings in the system settings, when you select SAMBA server configuration, a software will pop up, which is very simple. But first click the option to add SAMBA users, select ADM under LINUX users, and set the password, if you don't know the password, let me set it, hey. Be careful with your computer. Ga. WINDOWS users can create one. Now, set the shared directory. Okay. Now we can talk to WINDOWS in LINUX. Copy the TEST. PHP we just compiled to LINUX. Note. The default directory of APECHE is/VAR/WWW/HTML. If you do not share the directory with SAMBA, copy TEST. PHP to this directory.

Enter 192.168.1.5/test. php In the browser to view the content? Haha, ga, hey. Haha. Congratulations, you have succeeded. Now you can debug PHP in LINUX.

(PS: The default installation of apeche configuration does not support Chinese, please go to/ETC/APECHE/HTTPD. CONF, find AddDefaultCharset = ISO9660, modify adddefacharcharset = GB3221 or UTF-8 can be)

MYSQL is a little more complex, so I decided to talk about MYSQL tomorrow. This method is suitable for learning content when you first install and learn LINUX server configurations. If you are familiar with LINUX later, we recommend that you use the source code to install it so that you can customize some features, make your server more secure and fast. For beginners, we should learn about LINUX step by step. It is impossible to dig a golden doll when doing anything. I hope we can make progress together.

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.