cd /usr/ports/databases/mysql51-client
make install
cd /usr/ports/databases/mysql51-server
make WITH_CHARSET=utf8 WITH_XCHARSET=all WITH_COLLATION=utf8_unicode_ci BUILD_OPTIMIZED=yes BUILD_STATIC=yes install clean
rehash
mysql_install_db
cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf
chown -R mysql:mysql /var/db/mysql
vi /etc/my.cnf
加上
query_cache_size = 32M
[mysqld]
default-character-set = utf8
[client]
default-character-set = utf8
vi /etc/rc.conf
加入
mysql_enable="YES"
/usr/local/bin/mysqld_safe &
mysql -u root
mysql> use mysql ;
mysql> UPDATE user SET password=password('newpasswd') where user='root' ;
mysql> FLUSH PRIVILEGES ;
mysql> exit
2. 安裝Apache
cd /usr/ports/www/apache22
make install clean
vi /etc/rc.conf
加上
apache22_enable="YES"
3. 安裝PHP
cd /usr/ports/lang/php5
make install
cd /usr/ports/lang/php5-extensions
make WITHOUT_X11=yes install clean
cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini
vi /usr/local/etc/apache22/httpd.conf
加入
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
4.
Restart System
No comments:
Post a Comment