Debian下编译安装LAMP+SVN(二)
2010-12-23 20:10
399 查看
上一篇写到装完Apache和subversion这一篇继上一篇写PHP和MySql的安装首先来安装MySQL
# tar -zxvf mysql-5.0.40.tar.gz -C /usr/src # cd /usr/src/mysql-5.0.40/ # useradd -s /usr/sbin/nologin mysql //redhat的用户注意,Debian这里不带m参数就不创建宿主目录,而不是-M不创建宿主目录,而且nologin的位置也不一样 # ./configure --prefix=/usr/local/mysql && make && make install // 中间报错 // checking for termcap functions library... configure: error: No curses/termcap library found // 解决办法: # apt-cache search ncurses # apt-get install libncurses5-dev 然后重新编译,然后就静静但等待...或者干点别的 // 编译完成,下面就好开始拷贝配置文件和服务器脚本 # cp support-files/my-medium.cnf /etc/my.cnf # cp support-files/mysql.server /etc/init.d/mysqld # chmod a+x /etc/init.d/mysqld // 设置MySQl开始时第91个启动(开机自动启动mysql) # update-rc.d mysqld defaults 91 // 初始化数据库 # cd /usr/local/mysql/ # bin/mysql_install_db --user=mysql // 更改目录权限 # chown -R root:mysql /usr/local/mysql/ # chown -R mysql /usr/local/mysql/var/ l# ln -sf /usr/local/mysql/bin/mysql /usr/bin/ # echo "/usr/local/mysql/lib/mysql/" >> /etc/ld.so.conf # ldconfig安装PHP
# tar -jxvf php-5.2.10.tar.bz2 -C /usr/src # cd /usr/src/php-5.2.10 // 为了正常安装,需要下面的库支持 # apt-get install libpng12-dev //编译安装 # ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-sockets --with-gd # make && make install // 复制配置文件和链接php # cp php.ini-dist /usr/local/php5/php.ini # ln -sf /usr/local/php5/bin/php /usr/bin/php配置Apache支持PHP
# vi /usr/local/apache2/conf/httpd.conf // 确认以下行存在,如果没有则手动添加 55 LoadModule php5_module modules/libphp5.so ..... 160 DirectoryIndex index.html index.php .... 312 AddType application/x-httpd-php .php 修改完成后,保存退出,重新启动apache # /usr/local/apache2/bin/apachectl restart添加测试文件# vi /usr/local/apache2/htdocs/index.php添加以下内容
<?phpphpinfo();?>在浏览器中输入http://serverip/index.php,出现以下内容说明成功了本文出自 “cold night” 博客,请务必保留此出处http://linuxsvr.blog.51cto.com/2537584/463207
相关文章推荐
- Debian下编译安装LAMP+SVN(一)
- debian下lamp 编译安装F&Q
- Centos6.3编译安装LAMP
- Liunx CentOS6编译安装LAMP
- CentOS 源码编译安装LAMP(Apache MySQL PHP)
- CentOS 6_LAMP/LNMP--mysql的免编译安装
- 在 Debian 上源码编译和安装 Nginx+PHP+FastCGI+MySQL
- 在Debian上安装SVN
- Linux下LAMP环境的安装之编译安装过程(三)
- LAMP组合的编译安装(httpd 2.4+mysql 5.5+php 5.4)
- LAMP编译安装
- centos编译安装svn
- httpd与php交互的三种机制和编译安装LAMP之httpd-2.4.4
- LAMP编译安装只PHP以模块化的方式工作
- 编译安装LAMP之PHP
- 在Debian上安装SVN。
- LAMP环境搭建系列之二:编译安装Mysql5.6.38
- 构建LAMP网站服务器平台一之编译安装Apache服务器
- debian 7上安装svn
- centos 6 编译安装php-5.4/5.5(lamp模式)