LAMP环境搭建安装
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-03-23
-p shutdwon //关闭mysql #/usr/local/bin/mysqld_safe --user=mysql & //后台运行启用 设置自启动 #ls /etc/rc.local #echo "/usr/local/apache2/apachectl start" >>/etc/rc.local //加载自动 启动HTTPD #echo "/usr/local/mysql/bin/mysqld_safe --user=mysql &" >> /etc/rc.local //加载自启动mysql [root@localhost mysql]# chown -R mysql var //修改VAR目录为MYSQL用户 [root@localhost mysql]# chgrp -R mysql var //修改VAR目录为MYSQL用户组 配置PHP [root@local php]#./configure --prefix=/usr/local/php --with-config- file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-libxml-dir=/usr/local/libxml2/ -- with-png-dir=/usr/local/libpng/ --with-jpeg-dir=/usr/local/jpeg6/ -- with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd2/ -- with-mcrypt=/usr/local/libmcrypt/ --with- mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable- mbstring=all --enable-sockets make make install 配置php模块: 复制源文件目录的php.ini-dist到/usr/local/php/etc下: [root@localhost php-5.2.6]# cp php.ini-dist /usr/local/php/etc/php.ini 配置APACHE配置文件 httpd.conf #vim /usr/local/apache2/etc/conf/httpd.conf 插入一行 AddType application/x-httpd-php .php .phtml # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php .phtml 安装好LAMP后测试, # tail -f /usr/local/apache2/logs/error_log //查看HTTP错误访问日志 错误: [notice] caught SIGTERM, shutting down [Fri Nov 04 17:18:01 2011] [notice] Apache/2.2.9 (Unix) PHP/5.2.6 configured -- resuming normal operations 加速器安装 [root@localhost ZendOptimizer-3.2.6-linux-glibc21-i386]# ./install.sh phpmyadmin安装 [root@localhost ~]# cp -a /usr/src/phpMyAdmin-3.0.0-rc1-all-languages/ /usr/local/apache2/htdocs/phpmyadmin [root@localhost ~]# cd /usr/local/apache2/htdocs/phpmyadmin/ [root@localhost phpmyadmin]# cp config.sample.inc.php config.inc.php 关闭防火墙 开启: service iptables start 关闭: service iptables stop
本文出自 “LAMP搭建安装” 博客,请务必保留此出处http://liuguanle.blog.51cto.com/3405526/729855 |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |