The most popular Linux VPS installation environment in the blog is the lnmp one click package of the military brother, which is very simple. According to the official installation tutorial, copy+paste+enter, it is OK, but it lacks some DIY spirit. Today, we will see how to manually and quickly Installing the LAMP Environmental Science. This article is in Myhost123 Phoenix XEN PV product test, operating system is CentOS 5.7 32bit.
Upgrade system and install necessary components
yum -y update yum -y install gcc gcc-c++ autoconf automake libtool libevent libevent-devel gmp gmp-devel yum -y install gd gd-devel freetype freetype-devel fontconfig fontconfig-devel libjpeg libjpeg-devel zlib zlib-devel pcre pcre-devel yum -y install ncurses ncurses-devel libmcrypt mhash
Install Apache and MySQL
yum -y install mysql mysql-server mysql-devel yum -y install httpd httpd-devel yum -y install php53*
Start Apache and MySQL
/etc/init.d/httpd restart
/etc/init.d/mysqld restart
Edit PHP test files and view PHP information
vi /var/www/html/info.php
Join:
<? php
phpinfo();
?>
After that http://ip/info.php Visit to view php information.
Similarly, you can upload the probe to the/var/www/html/directory and access the probe to view the server information.
After that, set httpd and MySQL to start.
chkconfig httpd on
chkconfig mysqld on
Profile Location
/Etc/my.cnf MySQL configuration file
/Etc/httpd/apache configuration file
/Etc/php.ini php configuration file
other
If you just want to have a quick look at the probe, you can simply install an httpd and php directly. See the command:
yum install httpd php
service httpd start
Put the probe or php test file into/var/www/html/.
Statement: Blogs are only for sharing information and are not recommendations. Websites do not participate in transactions and are not intermediaries. The content only represents personal views and is not authoritative. Readers should consider it and take their own risks! Every penny and every commodity is still the eternal truth. Juvenile readers (including physical and psychological) should visit this website with their guardians! This article is written by( Zhao Rong )Original compilation, reprint, please keep the link: Linux VPS quick manual installation of LAMP The code is not easy, please do not copy or paste! About using: This website mainly shares server and VPS information, and does not provide any product sales or purchase. All visitors please purchase and use products within the scope of national laws and regulations. QQ group discussion: 683851361 About safety: Any IDC has the possibility of going bankrupt and running away. The host line is even more uncontrollable. Monthly payment and backup are your best choices. Please keep good and regular backup habits