yum install httpd -y

nano /etc/httpd/conf/httpd.conf

ServerAdmin galih@truegalih.tk
ServerName wwww.truegalih.tk:80
DirectoryIndex index.html index.php
NameVirtualHost *:80

nano /etc/httpd/conf.d/truegalih.conf

<VirtualHost *:80>
ServerAdmin admin@tengkuzulkarnain.net
ServerName tengkuzulkarnain.net
ServerAlias www.tengkuzulkarnain.net
DocumentRoot “/var/www/public_html/”
<Directory “/var/www/public_html”>
AllowOverride None
Options None
Order allow,deny
Allow from all
ErrorLog “/var/www/public_html/error.log”
CustomLog “/var/www/public_html/access.log” combined

service httpd restart
chkconfig httpd on

yum install php php-mysql -y

nano /etc/php.ini

date.timezone = “Asia/Jakarta”

Membuat Directory file website

[root@mail ~]# mkdir /var/www/html/truegalih/

[root@mail ~]# cd /var/www/html/truegalih/

[root@mail truegalih]# wget https://wordpress.org/latest.zip
–2015-08-13 09:52:08–  https://wordpress.org/latest.zip
Resolving wordpress.org…,
Connecting to wordpress.org||:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 6864353 (6.5M) [application/zip]
Saving to: “latest.zip”

12% [===>                                   ] 851,614      157K/s  eta 43s

[root@mail truegalih]# chown -R apache:apache /var/www/html/truegalih/
[root@mail truegalih]# yum install unzip -y
[root@mail truegalih]# unzip latest.zip
[root@mail truegalih]# mv wordpress/* /var/www/html/truegalih/
[root@mail truegalih]# rm -rf  wordpress/
[root@mail truegalih]# mv wp-config-sample.php wp-config.php

yum install mysql-server zip unzip -y

Allow access from other machines
-A INPUT -p tcp –dport 3306 -m state –state NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp –sport 3306 -m state –state ESTABLISHED -j ACCEPT

/usr/bin/mysqladmin -u root password ‘poas.,’

[root@mail ~]# mysql -u root -p
Enter password:

create database wp_truegalih;
use wp_truegalih;
CREATE USER ‘truegalih’@’localhost’ IDENTIFIED BY ‘password’;
SELECT User, Host, Password FROM mysql.user;
GRANT ALL PRIVILEGES ON wp_truegalih.* to truegalih@localhost;
SHOW GRANTS FOR ‘truegalih’@’localhost’;