Building new Wordpress on CentOS 7
-
I'll go through my process of installing CentOS 7 then LAMP and finally WordPress.
I'm installing this on a fully patches XenServer 7 host using XenOrchestra and XenCenter as needed.
Start by downloading the CentOS 7 minimal ISO.
Copy it to the ISO repository setup for your XS host.Create a new VM. I went for 1 vCPU, and 2 GB RAM and 30 GB disk and attach the CentOS ISO.
Upon booting you see this
https://i.imgur.com/TcPS0Ka.pngI arrowed up and just choose Install CentOS Linux 7
The installer boots, you see lots of text scroll by followed by an ominous black screen. Be patient, it takes like 3 mins to get to the next screen.
I had to flip back and forth between a few different VMs before I was finally showed the next screen.
As you can see here, the language is not right for me, so I'll change it to US English and continue.
https://i.imgur.com/v9iRDID.pngThree things to change on this screen, the timezone, verify the installation destination, and setup networking.
https://i.imgur.com/eUXhWVm.pngI'm going to skip the timezone pictures.
I have a 30 GB disk, I'm giving the whole thing to CentOS, and I'm going to use auto partitioning.
https://i.imgur.com/SQdFBd4.pngTurn on the network adapter, then type in a name for the host.
https://i.imgur.com/spYL1TQ.pngNothing more to change, click Begin Installation
https://i.imgur.com/qk7JmVC.pngSet the Root password - make it a good long hard password (https://www.grc.com/passwords.htm is a good source to pull random long passwords from)
https://www.grc.com/passwords.htmHere is the user add screen, the root screen only has the password fields on it, fill them in and click Done in the upper left corner
https://i.imgur.com/4AvB0aX.pngClick Finish Configuration and installation will proceed.
And reboot.
https://i.imgur.com/X9dN0cR.pngAnd the expected logon screen, logon as root
https://i.imgur.com/5wuktKH.pngWe aren't going to want to work from the console of XC or XO, can't copy and paste, etc. So find out the IP address of the server.
type - ip a sh
https://i.imgur.com/e34iVkT.pngNow use your preferred SSH client and login as root
https://i.imgur.com/Hm0UpTm.pngUpdate CentoOS
type - yum update
https://i.imgur.com/SDGQmdY.pngYou'll be prompted if you want to download the updates,
type - y
https://i.imgur.com/cFuqsIT.pngYou might get some additional prompts like the one below,
type - y
https://i.imgur.com/yagzM8a.pngDo the same thing for upgrades
type - yum upgrades
You might be prompted OK to download.
type - y -
From here I'm going to start by following @jaredbusch's post.
https://mangolassi.it/topic/12501/installing-wordpress-on-centos-7-minimal/2First we install LAMP (Linux Apache, MySQL/MariaDB, PHP)
yum -y install httpd; yum -y install mariadb mariadb-server; yum -y install php php-mysql php-xml php-gd wget nano;
OK no issues there.
-
hold
-
hold
-
hold
-
hold
-
hold
-
-
@Dashrender said in Building new Wordpress on CentOS 7:
Update CentoOS
type - yum update
https://i.imgur.com/SDGQmdYs.pngYou'll be prompted if you want to download the updates,
type - y
https://i.imgur.com/cFuqsITs.pngYou might get some additional prompts like the one below,
type - y
https://i.imgur.com/yagzM8as.pngThe normal thing to do is supply the -y switch to cause it to accept all prompts. Especially on the initial update, prior to anything extra being added.
You either trust the distribution, or you don't. If not, don't install it inthe first place.
yum update -y
-
@Dashrender said in Building new Wordpress on CentOS 7:
Do the same thing for upgrades
type - yum upgrades
You might be prompted OK to download.
type - yCouple things on this.
- It is not a valid command.
- The correct command is
yum upgrade
- The correct command is
- You only use
update
for CentOS 7 and newer normally.- The
update
function is to perform minor version upgrades (7.1 to 7.2) and updates to installed packages (i.e.httpd
,chrony
, etc) - The
upgrade
function is to perform a major version upgrade (7.X to 8.X)
- The
- It is not a valid command.
-
@Dashrender said in Building new Wordpress on CentOS 7:
hold
http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/2/#C9
This is for doing things to secure an installation and would/should be a guide of its own.
I would never bother changing the port. Obscurity is not security. All it does is annoy people trying to connect, the bots don't care.
-
@JaredBusch said in Building new Wordpress on CentOS 7:
@Dashrender said in Building new Wordpress on CentOS 7:
hold
http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/2/#C9
This is for doing things to secure an installation and would/should be a guide of its own.
I would never bother changing the port. Obscurity is not security. All it does is annoy people trying to connect, the bots don't care.
Same here, I only port change for other reasons, and only rarely. I do know that one person changes their port because they find that it lowers the hits to their log, but that's their only reason. It makes systems unnecessarily cumbersome for you and does nothing to stop an intruder.
-
We've had this discussion before, I posted this here so I could find it again when the time comes.
@JaredBusch I don't see any point in securing the server not be part of the entire process. As I continue on this thread, I will be including it. Of course these things will only apply to this specific situation, but it will be an end to end of my journey.
-
@Dashrender said in Building new Wordpress on CentOS 7:
@JaredBusch I don't see any point in securing the server not be part of the entire process. As I continue on this thread, I will be including it. Of course these things will only apply to this specific situation, but it will be an end to end of my journey.
Because they are rather different things.
How do you install Apache? - "yum -y install httpd"
How do you secure Apache? - Well, define your needs and let's talk about the degree to which you feel it needs to be locked down, what threats are pointed at you, what the value of the data is, etc.
One is concrete, one is not at all. They don't go together as a single thing.