How To Build Working CentOS Server with LightTPD and PHP5 (Part 2)

Saturday, August 6th 2016. | how to

#howto ,#tutorial #VPS – How To Build Working CentOS Server with LightTPD and PHP5 (Part 2) – This tutorial explains step by step guide (with pics) about How To Build Working CentOS Server with LightTPD and PHP5 (Part 2)

In this part 2 of the tutorial how to build and setup Lighttpd on CentOS server I will try to explain how to install other requirements for a working web server when you can host your websites in it, or at least a WordPress-based blog that requires PHP and MySQL database. In case if you came to this page from search engine, you can catch my previous article, the part 1 of this tutorial here.

Index of this guide: Part 1 – Part 2 – Part 3 – Part 4.

How to Install MySQL 5 on CentOS 6.4

Step 0 – I assumed you’ve followed all the steps in the Part 1. So if at some point you feel confused, go back to read the part 1.

Step 1 – Issue basic command syntax to install MySQL 5 via yum:

yum install mysql mysql-server

It looks like this in the beginning:

yum install mysql

As usual, it will then ask you to confirm. Simply type Y then hit Enter. Once done, you will see the “Complete!” message like this:

mysql installed

Step 2 – Next, this one is optional but very recommended: create system startup links for MySQL so it can start automatically each time and whenever the system boots. Use this simple command:

chkconfig --levels 235 mysqld on

Step 3 – Now lets start MySQL service for the very first time. Issue this familiar command syntax:

/etc/init.d/mysqld start

Step 4 – Caution, this step is very important step to setting up MySQL. You’ll need to define the password to use MySQL as root. Use this command:

mysql_secure_installation

You’ll see something like this:

setup mysql

It asks you “Enter current password for root (enter for none):” In this point you can simply hit Enter.

Next, it will also ask you to set root password. Type Y then hit Enter. Now you can type the new password for root user.

install mysql

Next question you have to answer is “Remove anonymous users? [Y/n]”. At this point simply type Y and hit Enter.

Another question is “Disallow root login remotely? [Y/n]”. Again, simply type Y and hit Enter.

When you asked “Remove test database and access to it? [Y/n]”. Again, simply type Y and hit Enter.

The last question is “Reload privilege tables now? [Y/n]”. Again, simply type Y and hit Enter.

install mysql

That’s it. You can read my previous guide about top common MySQL commands you better know it to help you with basic MySQL operations.

Index of this guide: Part 1 – Part 2 – Part 3 – Part 4.

Next Part 3:

How to Install PHP5 with FPM on CentOS with Lighttpd server.

This post How To Build Working CentOS Server with LightTPD and PHP5 (Part 2) is part of ServerMom.

Source link