How to install WordPress on CentOS
1. Make sure LAMP is ready
2. Download wordpress latest version
# cd ~/tmp
# wget http://wordpress.org/latest.zip
Current version is 3.3.1.
3. Extract the zip file and move to host folder
# unzip latest.zip
# mv wordpress /var/www/html/wp
# chown -R apache:apache /var/www/html/wp ————— change the owner as “apache”
4. Create a database for wordpress
mysql> CREATE DATABASE wordpress;
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'my-password';
mysql> FLUSH PRIVILEGES;
4. Set up configure file
4. Set up configure file
# cd /var/www/html/wp
# cp wp-config-sample.php wp-config.php
# vi wp-config.php
Replace following as yours:
database_name_here --> database name, such as "wordpress"
username_here -------> database user name, for instance "wp1"
password_here -------> database password, eg. "mypassword"
5. Start installation from web
http://192.168.1.1/wp/wp-admin/install.php
And then, follow the page to setup site information.
yum install gnome for CentOS
1. Verify group components installed
# yum grouplist
2. Install x-window
3. Install Gnome
# yum groupinstall “GNOME Desktop Environment”
4. Remove Gnome
# yum groupremove “GNOME Desktop Environment”
5. Start Gnome
libmcrypt.so.4()(64bit) is missing
Issue:
# yum install php-mcrypt
reported: libmcrypt.so.4()(64bit) is missing
Solution:
1. Install rpmforge repository
2. # yum –enablerepo=rmpforge install libmcrypt libmcrypt-devel
3. # yum –enablerepo=remi install php-mvrypt
4. # yum –enablerepo=remi install phpmyadmin
yum install phpMyAdmin
# yum –enablerepo=remi update
–> This will update php and mysql
#yum –enablerepo=remi install phpmyadmin
LAMP installation
1. Install LAMP
After installed OS, then:
# yum install httpd php php-mysql mysql-server
2. Set the httpd start up
# chkconfig –add httpd
# service httpd start
# chkconfig --levels 235 httpd on
3. Change MySql password for root
# mysqladmin -u root password new-password
4. Set mysql start up
# chkconfig –add mysqld
# service mysqld start
# chkconfig --levels 235 mysqld on
5. Test httpd with php
Add following content to /var/www/html/test.php file.
<?php phpinfo(); ?>
6. Install phpMyAdmin
# yum –enablerepo=remi install phpmyadmin
7. Test MySql
# mysql -u root -p
mysql> drop database test;
mysql> use mysql;
mysql> delete from db;
mysql> delete from user where not (host=”localhost” and user=”root”);
mysql> flush privileges;
CentOS install gcc/c/c++
Under CentOS 6
1. Install with internet connection
# yum groupinstall 'Development Tools'
2. Install with local DVD
# yum --enablerepo=c6-media groupinstall Development Tools'
3. Kernel heads should be installed sometimes
# yum install kernel-devel*
Install MySQL under CentOS via yum
1. Install MySQL
#yum install mysql mysql-devel mysql-server
2. Set MySQL as a service and auto run with system
# chkconfig –add mysqld
# chkconfig –level 3 mysqld on
3. Set password for root — for first time only
# service mysqld start
# mysqladmin -u root password ‘new-password’
4. Test MySQL running
# mysql -u root -p
mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| test |
+——————–+
3 rows in set (0.00 sec)
mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)
yum update excluding *386 packages
Update CentOS 64 bits only, no any 386 packages.
1. Edit yum configuration file
# vi /etc/yum.conf
2, Append below line at the bottom:
exclude=*.i386 *.i586 *.i686
3. Start update system
#yum update