Faster, Higher, Stronger


LAMP is short for Linux, Apache, MySQL, PHP. Of course, you already have a Linux OS (CentOS), so  this article mainly introduces installation of Apache, MySQL and PHP. I need this environment because I use WordPress program which should run on basis of this environment.

Install Apache

To verify the installation of Apache, open “http://your server’s IP address”, and if Apache was successfully installed, you should see an Apache Text Page.

Install MySQL

You will be asked for the root password, because you didn’t set it earlier. Press Enter to set a password now.

Set root password and confirm the new password (this password is the password for your MySQL root account).

You will then be asked a series of questions as part of the security configuration. It’s a best practice to respond “Y” to these system prompts.

Install PHP

Install PHP modules

If your applications requires any PHP modules, you can install them now.

Test PHP processing on Apache

Firstly, create a new PHP file under the /var/www/html directory:

Then, type in the following code to info.php:

Then, save and close the file:

Lastly, open the url in your browser: “http://your server’s IP address/info.php”. You should see a page displaying information such as the PHP version, extensions, build date and etc., if PHP is successfully installed.

  • Build a LAMP stack (Linux, Apache, MySQL, PHP) – CentOS 7:
赞(0) 打赏(金额可任意指定)
未经允许不得转载:峰间的云 » CentOS7安装LAMP环境

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址