頂九網伺服器搭建手冊之AMPF環境搭建(2)

二、安裝MySQL

1、安裝mysql

# cd /usr/ports/databases/mysql50-server

# make WITH_CHARSET=gbk \

WITH_XCHARSET=all \

SKIP_DNS_CHECK=yes \

BUILD_OPTIMIZED=yes \

BUILD_STATIC=yes

#make install

#make clean

2、使mysql50和系統一起啟動

# vi /etc/rc.conf  加入

mysql_enable=”YES”

3、啟動mysql50

#/usr/local/share/mysql/mysql.server start

/usr/local/etc/rc.d/mysql-server.sh start

如果以上兩條命令不能啟動mysql

那麼請reboot系統來啟動mysql

 

4、設置mysql50的密碼

# /usr/local/bin/mysqladmin -u root password ‘password’

這裡的密碼password可以自由設定。不一定為password.

5、登陸mysql5資料庫.

# mysql -u root –p password

如果見到下面信息,即表示登陸成功。

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 77 to server version: 5.0.22

 

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

 

mysql>

 

三、mysql資料庫優化 .(略)

二、安裝apache2.2.2

一、安裝apache

# cd /usr/ports/www/apache22

# make install clean

在彈出的PYTHON安裝選擇框里選擇:HUGE_STACK_SIZE  Use a larger thread stack

在安裝gettext ,將EXAMPLES 與HTMLMAN 兩項選項都選上。

二、編輯/etc/rc.conf,加入

Apache22_enable=”YES”

三、重啟伺服器。

以下文章點擊率最高

Loading…

     

如果這文章對你有幫助,請掃左上角微信支付-支付寶,給於打賞,以助博客運營