CentOS6.2下安装wordpress

 

  
  
  
  
  1. [root@www ~]# rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm //安装EPEL的rpm包 
  2. Retrieving http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm  
  3. warning: /var/tmp/rpm-tmp.ehFT0T: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY  
  4. Preparing...             ########################################### [100%]  
  5. 1:epel-release           ########################################### [100%]  
  
  
  
  
  1. [root@www ~]# yum --enablerepo=epel -y install wordpress //安装wordpress

    ###########################省略部分内容#####################################

      Installing : php-common-5.3.3-14.el6_3.i686                                                                                                                      1/13  
  2.   Installing : php-mbstring-5.3.3-14.el6_3.i686                                                                                                                    2/13  
  3.   Installing : php-xml-5.3.3-14.el6_3.i686                                                                                                                         3/13  
  4.   Installing : php-pdo-5.3.3-14.el6_3.i686                                                                                                                         4/13  
  5.   Installing : php-IDNA_Convert-0.8.0-1.el6.noarch                                                                                                                 5/13  
  6.   Installing : php-simplepie-1.3.1-3.el6.noarch                                                                                                                    6/13  
  7.   Installing : php-PHPMailer-5.2.2-1.el6.noarch                                                                                                                    7/13  
  8.   Installing : php-mysql-5.3.3-14.el6_3.i686                                                                                                                       8/13  
  9.   Installing : php-enchant-5.3.3-14.el6_3.i686                                                                                                                     9/13  
  10.   Installing : php-cli-5.3.3-14.el6_3.i686                                                                                                                        10/13  
  11.   Installing : php-5.3.3-14.el6_3.i686                                                                                                                            11/13  
  12.   Installing : php-process-5.3.3-14.el6_3.i686                                                                                                                    12/13  
  13.   Installing : wordpress-3.5.1-2.el6.noarch                                                                                                                       13/13  
  14. Unable to connect to dbus  
  15.  
  16. Installed:  
  17.   wordpress.noarch 0:3.5.1-2.el6  
  18.  
  19. Dependency Installed:  
  20.   php.i686 0:5.3.3-14.el6_3               
  21. php-IDNA_Convert.noarch 0:0.8.0-1.el6   
  22. php-PHPMailer.noarch 0:5.2.2-1.el6      
  23. php-cli.i686 0:5.3.3-14.el6_3  
  24.   php-common.i686 0:5.3.3-14.el6_3        
  25. php-enchant.i686 0:5.3.3-14.el6_3            
  26. php-mbstring.i686 0:5.3.3-14.el6_3        
  27. php-mysql.i686 0:5.3.3-14.el6_3  
  28.   php-pdo.i686 0:5.3.3-14.el6_3           
  29. php-process.i686 0:5.3.3-14.el6_3            
  30. php-simplepie.noarch 0:1.3.1-3.el6        
  31. php-xml.i686 0:5.3.3-14.el6_3  

 

  
  
  
  
  1. [root@www ~]# mysql -u root -p   //连接mysql数据库 
  2.  Enter password:  
  3. Welcome to the MySQL monitor.  Commands end with ; or \g.  
  4. Your MySQL connection id is 4  
  5. Server version: 5.1.67 Source distribution  
  6.  
  7. Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.  
  8. This software comes with ABSOLUTELY NO WARRANTY. This is free software,  
  9. and you are welcome to modify and redistribute it under the GPL v2 license  
  10.  
  11. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  
  12.  
  13. //创建wordpress的数据库
  14.  
  15. mysql>create database wordpress character set utf8 collate utf8_bin;   
  16.  
  17. Query OK, 1 row affected (0.00 sec)  
  18.  
  19. mysql>grant all privileges on wordpress.* to wordpress@'localhost' identified by 'password';   
  20.  
  21. Query OK, 0 rows affected (0.00 sec)   
  22.  
  23. mysql>flush privileges;   
  24.  
  25. Query OK, 0 rows affected (0.00 sec)
  26.  
  27. mysql>exit   
  28.  
  29. Bye  
  30.    
  31. [root@www ~]# vim /etc/wordpress/wp-config.php //修改wordpress的配置文件   
  32.  
  33. # line 19: specify database  
  34.  
  35. define('DB_NAME', 'wordpress');   
  36.  
  37. # line 22: specify DB user  
  38.  
  39. define('DB_USER', 'wordpress');   
  40.  
  41. # line 25: specify DB password  
  42.  
  43. define('DB_PASSWORD', 'password');   
  44.  
  45. # line 72: specify your language  
  46.  
  47. define('WPLANG', 'zh_CN');
  48. [root@www ~]#mkdir /usr/share/wordpress/wp-content/languages   
  49.  
  50.  
  51. [root@www ~]#wget -P /usr/share/wordpress/wp-content/languages \  
  52.  http://svn.automattic.com/wordpress-i18n/zh_CN/tags/3.1.2/messages/zh_CN.mo \  
  53.  http://svn.automattic.com/wordpress-i18n/zh_CN/tags/3.1.2/messages/continents-cities-zh_CN.mo   
  54.  //下载支持对应的语言,这里是中文
  55.  
  56. [root@www ~]#/etc/init.d/httpd restart   //重启httpd服务
  57. Stopping httpd:  [ OK ]  
  58.   Starting httpd:    [ OK ] 

 

 

 

 

 

 

 

 

本文出自 “老徐的私房菜” 博客,谢绝转载!

你可能感兴趣的:(linux,centos,wordpress)