LAMP安装配置过程
Mysql./configure --prefix=/usr/local/mysql
(注意/configure前有“.”,是用来检测你的安装平台的目标特征的,prefix是安装路径)
#make
(编译程序)(此处等待时间较长,不要关闭编辑器)
#make install
(安装程序)
#/usr/local/mysql/bin/mysql_install_db --user=root
(初始化数据库,用户mysql)
#cp support-files/my-medium.cnf /etc/my.cnf
(将MYSQL配置文档复制到/etc目录下保存为my.cnf,如果问是否覆盖原文件,输入“yes"然后回车)
运行mysql 需要设置环境变量
mysql开机启动:
#cp support-files/mysql.server /etc/rc.d/init.d/mysqld
#chkconfig --addmysqld
#chkconfig --revel 2345 mysql on //将init.d的服务链接到rc#(0,1,2,3,4,5,6)中
运行mysq时的问题
编辑mysqld:
#vi /etc/rc.d/init.d/mysqld
找到类似这样一行(我这里是304行):
$bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 &
改为(加上参数--user=root):
$bindir/mysqld_safe --user=root --datadir=$datadir --pid-file=$server_pid_file $other_args >/dev/null 2>&1 &
apache的安装过程
#cd /soft
#tar jxvf httpd-2.2.6.tar.bz2 //解压apache的压缩包
#cd httpd-2.2.6 //定位到httpd-2.2.6 文件夹下
#ls //查看显示httpd-2.2.6 文件夹下内容
#./configure --help | more //查看安装apache配置参数
#./configure--prefix=/usr/local/apache--enable-so //配置apache路径
#make //编译apache
#make install //安装apache
#cd /usr/local/apache //进入apache的目录
#cd conf/
#cp -a httpd.conf httpd.conf- //备份apache配置文件
#chkconfig--list httpd //查看httpd服务是否已存在
#chkconfig httpd off //关闭系统自带了httpd的服务,如果存在httpd服务
#service httpd status //查看自带httpd服务状态
#/usr/local/apache/bin/apachectl -k start //linux启动apache命令
#netstat -an | grep :80 //查看linux80端口是否开启
#ps -aux | grep httpd //linux下查看apache进程
#cd ../..
#cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/apache //拷贝apache启动脚本
#vi /etc/rc.d/init.d/apache // 这里是编辑apache启动脚本
在开头的#!/bin/sh下面加上
#chkconfig: 23458515
#chkconfig --add apache //添加apache服务
#chkconfig --list apache //列出apache服务
需要说明的是 apache添加到开机启动的时候和mysql是相反的 mysql是先add 再revel apache先revel然后add。
php安装配置过程
:http://i-am-birdman.iteye.com/blog/1038273
AddType application/x-httpd-php-source .phps
页:
[1]