Skip to content

Instantly share code, notes, and snippets.

@bainternet
Created September 29, 2011 21:45
Show Gist options
  • Save bainternet/1252025 to your computer and use it in GitHub Desktop.
Save bainternet/1252025 to your computer and use it in GitHub Desktop.
Install WordPress On clean centos
#Install the required system packages
yum -y install mysql-server httpd php php-mysql unzip wget
#update php since WordPress 3.2.1 needs php5.2 and up
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
yum --enablerepo=webtatic install php php-common php-eaccelerator php-mysql php-devel -y
#to install git uncomment this next line
#yum install --enablerepo=webtatic git-all -y
#start apache and mysql
chkconfig httpd on
chkconfig mysqld on
/etc/init.d/mysqld start
/etc/init.d/httpd start
#configure Mysql root password
mysql -u root
use mysql;
#change root password (replace NEWPASSWORD with your new password)
update user set password=PASSWORD("NEWPASSWORD") where User='root';
flush privileges;
#Create a WordPress database and MySQL User
#you default is database: wordpress user: wordpress_User pass: DataBase_pass
#you can and should change this to what ever you want
CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress_User'@'localhost' IDENTIFIED BY 'DataBase_pass';
FLUSH PRIVILEGES;
quit;
#Download WordPress
cd /var/www/html
wget http://wordpress.org/latest.zip
#Extract WordPress
unzip latest.zip
rm latest.zip
#Move WordPress to Root Directory
mv wordpress/* ./
rmdir wordpress/
#Give WordPress permissions to write
mkdir wp-content/uploads wp-content/cache
chown apache:apache wp-content/uploads wp-content/cache ./
chown -Rf apache *
##############################
# all DONE !!! #
#Open and configure WordPress#
##############################
# http://your-server-ip-or-hostname/ or http://your-server-ip-or-hostname/wp-admin/install.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment