1. The goal is to install a scalable WebApplication operating environment. Therefore, the system consists of multiple roles: LBServer, WebServer, APPServer, and DBServer. The purpose of this article is to install LAMP (Linux, Apache, Mysql, and php), so here we only describe the installation and deployment of WebServer and DBServer. Ubuntu13.04 install LAMP \ Vsftpd
I. Objectives
The goal is to install a scalable Web Application operating environment. Therefore, the system consists of multiple roles: LB Server, Web Server, APP Server, and DB Server.
The purpose of this article is to install LAMP (Linux, Apache, Mysql, and php), so here we only describe the installation and deployment of Web Server and DB Server.
Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04Http://www.linuxidc.com/Linux/2013-06/86250.htm
Compile and install LAMP (Apache 2.2.44 + MySQL 5.6.10 + PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm in CentOS 5.9
Source code construction of Web Server Architecture in RedHat 5.4 LAMP environment and application PHPWind http://www.linuxidc.com/Linux/2012-10/72484p2.htm
LAMP source environment to build WEB Server Linux + Apache + MySQL + PHP http://www.linuxidc.com/Linux/2013-05/84882.htm
Ii. Software Version
Linux: CentOS6.3
Apache: 2.2
Mysql: 5.1/5.5 (upgrade required)
PHP: 5.3/5.2 (old code running requirements)
As for the Linux release version, the Linux release version is inconsistent with the software version to be run, and it often takes a considerable amount of time for installation, compilation, and configuration.
Here is a summary of some experiences:
- We took a detour in configuring the Server and thought that Apache, php, and mysql should be separately installed on different servers. In fact, there is no need to install but disable the service to be consistent with the configuration target. In addition, you can enable local testing when a problem occurs.
- Mysql versions have also been entangled for a long time. We should set up an App in the most easy-to-use way from the very beginning to ensure that the App is no problem (that is, after we are familiar with the App configuration ), select, configure, and optimize the system version.
Iii. Installation Process
1. Install DB Server
Mysql version: 5.1
1.1 install Mysql
First, install MySQL. Open the Super Terminal and enter:
[root@localhost ~]# yum install mysql mysql-server |
After installation, MySQL can be automatically started with the system:
[root@localhost ~]# chkconfig --levels 235 mysqld on
[root@localhost ~]# /etc/init.d/mysqld start |
Set the password for the root account of MySQL Data:
[root@localhost ~]# mysql_secure_installation |
Press enter, enter the new password, and confirm the settings when the following prompt appears:
Enter current password for rootSet root password? [Y/n]New password:Remove anonymous users? [Y/n]Disallow root login remotely? [Y/n]Remove test database and access to it? [Y/n]Reload privilege tables now? [Y/n] |
So far, MySql installation is complete.
1.2 install Apache
Since CentOS has encapsulated Apache, run and install it directly:
[root@localhost ~]# yum install httpd |
Configure the system to enable Apache with the system:
[root@localhost ~]# chkconfig --levels 235 httpd on[root@localhost ~]# /etc/init.d/httpd start
Now you can access your server. If you don't miss it, you can see the Test Page of "Apache 2 Test Page powered by CentOS. As shown in
NOTE: If other machines cannot access this service and the page is accessible directly on this server, the built-in firewall of CentOS is generally disabled.
Processing Method:
Note: In CentOS, the default Apache root directory is/var/www/html, and the configuration file/etc/httpd/conf/httpd. conf is used. Other configurations are stored in the/etc/httpd/conf. d/directory.
1.3 install PHP
Run the following command to install PHP:
[root@localhost ~]# yum install php
You need to restart the Apache service:
[root@localhost ~]# /etc/init.d/httpd restart
1.4 test PHP related information
This step can be omitted, but to test whether the installation is successful, you can create a new PHP page for testing and use the vim editor to create a new one:
[root@localhost ~]# vi /var/www/html/info.php
Press the "I" key and enter:
At this time, you can access your site address, such as "http: // localhost/info. php", to check whether the relevant PHP information can be seen
The following figure shows that PHP is successfully installed.
For more details, refer to the highlights on the next page.: Http://www.linuxidc.com/Linux/2014-04/100484p2.htm