Created
September 29, 2011 21:45
-
-
Save bainternet/1252025 to your computer and use it in GitHub Desktop.
Install WordPress On clean centos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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