apache\httpd-2.2.20 怎么安装?
发布网友
发布时间:2022-03-01 01:39
我来回答
共1个回答
热心网友
时间:2022-03-01 03:09
源码搭建LAMP平台 你参考下!一.安装httpd
1.解压http源码包进入解压目录
2.#./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-suexec --with-suexec-caller=daemon --with-suexec-docroot=/usr/local/apache2
3.#make
4.#make install二.安装mysql
1.安装软件ncurses* 使用yum安装 yum -y install ncurses*
2.建立mysql用户 useradd -M -s /bin/nolog mysql
3.解压mysql源码包 进入解压目录
4.#./configure --prefix=/usr/local/mysql
5.#make
6.#make install
7.复制mysql的配置文件 在解压目录下 cp support-file/my-medium.cnf /etc/my.cnf
8.初始化mysql /usr/local/mysql/bin/mysql_install_db --user=mysql
9.#chown -R mysql /usr/local/mysql
#chown -R mysql /usr/local/mysql/var
10.调整lib库文件 echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
11.#ldconfig 使库文件立即生效
12.启动mysql服务 #/usr/local/mysql/bin/mysql_safe --user=mysql &
13.查看下mydqld服务有没有启动 netstat -ntpl | grep 3306
14.将mysqld 添加为系统服务 在解压目录下 cp support-files/mysql.server /etc/init.d/mysqld
15.修改/etc/init.d/mysqld 文件的权限 chmod +x /etc/init.d/mysqld
16.chkconfig --add mysqld
17.设置mysql程序的执行路径 export PATH=$PATH:/usr/local/mysql/bin
echo "$PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile三.安装php
1.解压php源码包 进入解压目录
2.#./configure --prefix=/usr/local/php5 --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-config-file-path=/usr/local/php5
3.#make
4.#make install四.修改配置文件
1. 修改http的配置文件
LoadMole php5_mole moles/lobphp5.so
AddType application/x-httpd-php .php
DirectoryIndex index.html index.php