WordPress Installation SEP 2016

  1. CentOS 7
  2. epel-release
  3. httpd
  4. mysqld
  5. php 7
  6. phpmyadmin
  7. addtl. modules php70w-mysql, php70w-gd
  8. PHP7: http://idroot.net/tutorials/how-to-install-php-7-on-centos-7/
  9. WordPress: https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-centos-7

OS

cat /etc/redhat-release
CentOS release 6.6 (Final)

vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=wordpress.sites

vi /etc/selinux/config
disable

service iptables save
service iptables stop
chkconfig iptables off

vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1

yum install mc wget unzip xclock xauth system-config-network-tui system-config-firewall-tui

launch network config
system-config-network-tui

vi /etc/hosts

127.0.0.1 wordpress.sites localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 wordpress.sites localhost localhost.localdomain localhost6 localhost6.localdomain6

EPEL 6.*

replace RHEL repo with local repository (cdrom) :

HowTo Install redhat package with YUM command without RHN

EPEL repo
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm

EPEL 7.*

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

 

yum repolist
yum install rpm-build

delete wrong repos
rpm -qa | grep epel
yum remove epel-release-6-8.noarch
cd /var/cache/yum/x86_64/6Server/epel
rm *

APACHE

yum install httpd
/etc/init.d/httpd start
chkconfig httpd on

vi /var/www/html/info.php

vi /etc/passwd

vi /etc/httpd/conf/httpd.conf
Listen 80
User apache
Group apache

MYSQL

wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
rpm -Uvh mysql-community-release-el6-5.noarch.rpm
yum repolist all | grep mysql
yum info mysql-community-server
yum install mysql-community-server

service mysqld start
service mysqld status
mysql_secure_installation

cd /etc/init.d/
ls | grep mysql
chkconfig –list | grep mysql
chkconfig mysqld on

Alternaiv mit phpMyAdmin erstellen, per cmd line wird latin1 collation erstellt, empfohlen utf_general_ci
mysql -u root -p
CREATE DATABASE wp_bh;
CREATE USER wp_bh_user@localhost;
SET PASSWORD FOR wp_bh_user@localhost=PASSWORD(“Him6alia”);
GRANT ALL PRIVILEGES ON wp_bh.* TO wp_bh_user@localhost IDENTIFIED BY ‘Him6alia’;
FLUSH PRIVILEGES;
exit

PHP

yum update
yum install php php-devel php-cli php-gd php-mbstring php-mysql
php -v
php -m

VMware SHARED FOLDERS

mkdir /cdrom
In “Virtual Machine” set “install VMware tools”
mount /dev/cdrom /cdrom
uncompress installer
run vmware-install.pl
enable share folders in settings
cd /mnt/hgfs/

PHPMYADMIN

cp /var/www/html/phpMyAdmin
cd phpMyAdmin
mkdir config
chmod o+rw config
http://10.0.29.169/phpMyAdmin/setup
cp ./config/config.inc.php .

WORDPRESS

download http://wordpress.org
cp ./wordpress /var/www/html/wordpress
mv wordpress/ bernhard.hensler.net
cp wp-config-sample.php wp-config.php

vi wp-config.php
define(‘FS_METHOD’, ‘direct’);

chown apache:apache * -R bernhard.hensler.net/

PERMALINKS
enable permalinks %postname%
comment # all AllowOverride none in httpd.conf

file and folder access rights

sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +
sudo chmod 660 wp-config.php