The installation environment on Linux VPS that is most introduced on blogs is Jun Ge’s lnmp one-click package. It is very simple. Follow the official installation tutorial, copy + paste + enter, and it will be OK, but it lacks some DIY spirit. Today, we will do it together See how to quickly install the LAMP environment manually. This article was tested on Myhost123Phoenix XEN PV product, and the operating system is CentOS 5.7 32bit.
lamp

Upgrade your system and install necessary components

1
2
3
4
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

1
2
3
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 in:

<?php
phpinfo();
?>

Afterwards, access http://ip/info.php to view php information.
In the same way, you can also upload the probe to the /var/www/html/ directory and access the probe to view server information.
After that, set httpd and MySQL to start at boot.
chkconfig httpd on
chkconfig mysqld on

Configuration file location

/etc/my.cnf    MySQL configuration file
/etc/httpd/    apache configuration file
/etc/php.ini      php configuration file

other

If you just want to take a quick look at the probe, you can simply install httpd and php directly. Please see the command:

yum install httpd php
service httpd start

Just put the probe or php test file into /var/www/html/.

postid
16403

Leave a Reply