linux系统服务总结之五:用lamp建一个自己的BBS(LINUX环境下)

LAMP部分(部分软件包可能老旧,更新为新包即可)


tar zxvf httpd-2.2.4.tar.gz -C /usr/src
cd /usr/src/httpd-2.2.4
./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite
make
make install
chmod 755 /usr/local/apache2/htdocs
/usr/local/apache2/bin/apachectl start



groupadd -g 200 mysql
useradd -u 200 -g mysql -d /usr/local/mysql/data -M mysql
进入软件包所在目录

tar zxvf mysql-5.1.23-ndb-6.2.15-linux-i686-glibc23.tar.gz -C /usr/local/src
mv /usr/local/src/mysql-5.1.23-ndb-6.2.15-linux-i686-glibc23 /usr/local/mysql
cd /usr/local/mysql
cp support-files/my-medium.cnf /etc/my.cnf
/usr/local/mysql/scripts/mysql_install_db --user=mysql

chown -R mysql:mysql /usr/local/mysql
/usr/local/mysql/bin/mysqld_safe --user=mysql &
/usr/local/mysql/bin/mysqladmin -uroot password 新口令
/usr/local/mysql/bin/mysql -u root -p
进入mysql,进行基本操作
建立数据库:create database bbs;

查看数据库:show databases;




tar zxvf php-5.2.5.tar.gz  -C /usr/local/src
cd /usr/local/src/php-5.2.5
./configure --prefix=/usr/local/php5
--with-apxs2=/usr/local/apache2/bin/apxs
--with-mysql=/usr/local/mysql
--with-config-file-path=/usr/local/php5

make;make install
cp /usr/local/src/php-5.2.5/php.ini-dist /usr/local/php5/php.ini
cd /usr/local/php5
可查看安装后的结果。

vi /usr/local/apache2/conf/httpd.conf   
添加 AddType   application/x-httpd-php   .php
修改DirectoryIndex      index.html index.php

重启apache。

将BBS目录上传到/usr/local/apache2/htdocs下,
chmod  -R 777 /usr/local/apache2/htdocs/bbs
然后按照显示步骤进行BBS安装.

你可能感兴趣的:(linux,职场,休闲)