WordPress install on LAMP(wordpress本地安裝)
Wordpress 是世界上用戶最多的blog 工具,其優點就不多說了。
1. 下載所需軟件包
MySQL-5.5.2-m2.tar.gz httpd-2.2.15.tar.gz PHP-5.3.2.tar.gz WordPress-2.9.2.tar.gz
都是最新的。
2. 安裝軟件包
tar xvf MySQL-5.5.2-m2.tar.gz
./configure –prefix=/usr/local/mysql
tar xvf httpd-2.2.15.tar.gz
裝Apache是需要其他包
wget http://labs.renren.com/apache-mirror/apr/apr-util-1.3.9.tar.gz
wget http://apache.freelamp.com/apr/apr-1.4.2.tar.gz
先裝apr
./configure –prefix=/usr/local/apr
在裝apr-util
./configure --with-apr=/usr/local/apr
安裝Apache
./configure --prefix=/usr/local/apache \
--with-apr=/usr/local/apr \
--enable-rewrite \
--enable-so
安裝php
./configure –prefix=/usr/local/apache/php \
--with-zlib \
--with-jpej \
--with-png \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql
(若是不選zlib,可能在安裝WordPress theme和plusin無法在線安裝)
3.修改Apache配置文件
/usr/local/apache/conf/httpd.conf
添加
AddType application/x-httpd-php .php
AddType application/x-httpd-php-sourece .phps
<IfModule dir_module>
DirectoryIndex index.php index.html
#若是不添加 index.php打開blog只顯示目錄,無法正常顯示blog首頁
</IfModule>
其他的根據自己的需要修改
3. 創建數據庫
Mysql –u root
Create database wpdb;
Grant all privileges on wpdb.* to ‘wp’@127.0.0.1 identified by ‘wpdbpwd’;
Flush privileges
\q
4. 修改WordPress的wp-config.php
mv wp-config-example.php wp-config.php
/** The name of the database for WordPress */
define('DB_NAME', 'wpdb');
/** MySQL database username */
define('DB_USER', 'wp');
/** MySQL database password */
define('DB_PASSWORD', 'wpdbpwd');
/** MySQL hostname */
define('DB_HOST', '127.0.0.1');
5. 開始安裝WordPress
/usr/local/apache/bin/apachectl start
(這一步可能出現libphp5.so訪問拒絕,修改/etc/selinux/conf 改成SELINUX=disabled reboot)
在瀏覽器中打開http://ip/wp-admin/install.php若顯示error其繼續修改以上配置文件
1. 下載所需軟件包
MySQL-5.5.2-m2.tar.gz httpd-2.2.15.tar.gz PHP-5.3.2.tar.gz WordPress-2.9.2.tar.gz
都是最新的。
2. 安裝軟件包
tar xvf MySQL-5.5.2-m2.tar.gz
./configure –prefix=/usr/local/mysql
tar xvf httpd-2.2.15.tar.gz
裝Apache是需要其他包
wget http://labs.renren.com/apache-mirror/apr/apr-util-1.3.9.tar.gz
wget http://apache.freelamp.com/apr/apr-1.4.2.tar.gz
先裝apr
./configure –prefix=/usr/local/apr
在裝apr-util
./configure --with-apr=/usr/local/apr
安裝Apache
./configure --prefix=/usr/local/apache \
--with-apr=/usr/local/apr \
--enable-rewrite \
--enable-so
安裝php
./configure –prefix=/usr/local/apache/php \
--with-zlib \
--with-jpej \
--with-png \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql
(若是不選zlib,可能在安裝WordPress theme和plusin無法在線安裝)
3.修改Apache配置文件
/usr/local/apache/conf/httpd.conf
添加
AddType application/x-httpd-php .php
AddType application/x-httpd-php-sourece .phps
<IfModule dir_module>
DirectoryIndex index.php index.html
#若是不添加 index.php打開blog只顯示目錄,無法正常顯示blog首頁
</IfModule>
其他的根據自己的需要修改
3. 創建數據庫
Mysql –u root
Create database wpdb;
Grant all privileges on wpdb.* to ‘wp’@127.0.0.1 identified by ‘wpdbpwd’;
Flush privileges
\q
4. 修改WordPress的wp-config.php
mv wp-config-example.php wp-config.php
/** The name of the database for WordPress */
define('DB_NAME', 'wpdb');
/** MySQL database username */
define('DB_USER', 'wp');
/** MySQL database password */
define('DB_PASSWORD', 'wpdbpwd');
/** MySQL hostname */
define('DB_HOST', '127.0.0.1');
5. 開始安裝WordPress
/usr/local/apache/bin/apachectl start
(這一步可能出現libphp5.so訪問拒絕,修改/etc/selinux/conf 改成SELINUX=disabled reboot)
在瀏覽器中打開http://ip/wp-admin/install.php若顯示error其繼續修改以上配置文件
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.