欢迎光临
我们一直在努力

CentOS7安装LAMP环境

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.

Reference:
  • Build a LAMP stack (Linux, Apache, MySQL, PHP) – CentOS 7: https://hk.godaddy.com/help/build-a-lamp-stack-linux-apache-mysql-php-centos-7-17344
赞(0) 打赏(金额可任意指定)
未经允许不得转载:峰间的云 » CentOS7安装LAMP环境
分享到: 更多 (0)

评论 抢沙发

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

上海宝山顾村棉被加工店 专业加工新旧棉被

查看详情了解一下

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏