RSS
热门关键字:

在Gentoo Linux上本地安装(较容易

来源: 作者: 时间:2006-10-20 Tag: 点击:

Installing MySQL
MySQL is free database for personal use. First you need to emerge MySQL.

# emerge mysqlNow create the main MySQL database which contains administrative information and add password for root user on MySQL server.

# emerge --config =mysql-[version]Next check if MySQL demon has started correctly.

# /etc/init.d/myslq start
* Starting mysqld (/etc/mysql/my.cnf) ... [ ok ]If there aren’t any errors, you’ve installed MySQL correctly.

Installing PHP
OK, next we’ll install PHP as Apache module.

# emerge dev-php/php mod_phpNow PHP is installed, but not active. To enable PHP, edit Apache configuration file

# vi /etc/conf.d/apache2and put there this line

APACHE2_OPTS="-D DEFAULT_VHOST -D PHP4 -D USERDIR "to browsing the directory where you keep your data add -D USERDIR
To check PHP, start the apache2 demon

# /etc/init.d/apache2 startand make example test page

# vi /var/www/localhost/htdocs/test.php
<?php
phpinfo();
?>
When you type in your favorite browser http://localhost/test.php, you should see settings of your Apache server. The next step is Installing WordPress!

Installing WordPress (using emerge)
Go to command line, and log to MySQL as root user.

# mysql -u root -pCreate WordPress database, example name wordpress

mysql> create database wordpress;and WordPress user, example wordpress and add to him all privileges.

mysql> grant all on wordpress.* to wordpress@localhost
identified by 'password_here';Refresh privileges.

flush privilegesNow, leave MySQL command line.

mysql> exitInstalling WordPress is really easy

# emerge wordpressGo to WordPress directory /var/www/localhost/htdocs/wordpress/ and edit wp-config-sample.php file. Change your code as in example.

 // ** MySQL settings ** //
define('DB_NAME', 'wordpress');     // The name of the database
define('DB_USER', 'username');     // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost');
define('DB_HOST', 'localhost'); 99% chance you won’t need
to change this value, but if you crated MySQL user at 127.0.0.1
you have to change localhost to 127.0.0.1
Rename the file wp-config-sample.php to wp-config.php

Using your favorite web browser, visit wp-admin/install.php (example http://localhost/wordpress/wp-admin/install.php) and run the installing script.

This is really simple.

If you get an error about the database while running that script, check username, password etc., in wp-config.php file and be sure the MySQL is running ;)

Installing WordPress (development)
If you need more than one instalation of WordPress, you can copy emerge instalation (directory /var/www/localhost/htdocs/wordpress/) where do you need and modify config.php and create new database of course.

Also you can download the latest stable version WordPress and extract wordpress.tar.gz to your favourite directory. (or directories)

 


最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册