Install WordPress on CentOS/RHEL in Five Minutes Flat (remix)
Posted by
hackerbinhminh
| Monday, June 13, 2011 at 7:59 PM
0
comments
Labels :
web
INSTALL THE SYSTEM PREREQUISITES
# yum install mysql-server httpd nano php php-mysql# chkconfig httpd on# chkconfig mysqld on# service mysqld start# service httpd startCREATE THE DATABASE
# mysqladmin create wordpress# mysqlmysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'please+use+a+strong+password';mysql> FLUSH PRIVILEGES;mysql> quitDOWNLOAD AND INSTALL WORDPRESS
# cd /var/www/# mkdir wordpress# cd wordpress# curl -O http://wordpress.org/latest.tar.gz# tar xvfz latest.tar.gz# rm latest.tar.gz# mv wordpress/ public# mkdir logs public/wp-content/uploads public/wp-content/cache# chown apache:apache logs public/wp-content/uploads public/wp-content/cache# cd public/CONFIGURE WORDPRESS
Create the WordPress config file outside web root:
# mv wp-config-sample.php ../wp-config.php# curl https://api.wordpress.org/secret-key/1.1/salt/Copy the output to your clipboard before editing wp-config.php.
# nano ../wp-config.phpdefine('DB_NAME', 'wordpress'); define('DB_USER', 'wordpress'); define('DB_PASSWORD', 'enter+the+strong+password+you+defined'); define('DB_HOST', 'localhost'); …
define('AUTH_KEY', 'pasted from clipboard'); define('SECURE_AUTH_KEY', 'pasted from clipboard'); define('LOGGED_IN_KEY', 'pasted from clipboard'); define('NONCE_KEY', 'pasted from clipboard'); define('AUTH_SALT', 'pasted from clipboard'); define('SECURE_AUTH_SALT', 'pasted from clipboard'); define('LOGGED_IN_SALT', 'pasted from clipboard'); define('NONCE_SALT', 'pasted from clipboard'); CONFIGURE APACHE
# nano /etc/httpd/conf.d/wordpress.confNameVirtualHost *:80 <VirtualHost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot /var/www/wordpress/public ServerName dummy-host.example.com ErrorLog /var/www/wordpress/logs/error_log CustomLog /var/www/wordpress/logs/access_log common <Directory /var/www/wordpress/public/wp-content> Options FollowSymLinks # for pretty permalink support RemoveHandler .php RemoveType text/html .php </Directory> </VirtualHost> # service httpd restart
Subscribe to:
Post Comments (Atom)