编译安装最新LAMP平台

2023年 7月 15日 64.6k 0

前言:总的来说,在httpd2.4.16安装时踩到坑了,问题还没解决!后续更上。本章出现的东西基本上OK

#cd /usr/local/src1,下载mysql-5-5.45#wget http://mirrors.sohu.com/mysql/MySQL-5.5/mysql-5.5.45-linux2.6-x86_64.tar.gz2,解压# tar zxvf /usr/local/src/mysql-5.1.40-linux-i686-icc-glibc23.tar.gz3,移动和重命名# mv mysql-5.1.40-linux-i686-icc-glibc23 /usr/local/mysql4,创建mysql用户# useradd -s /sbin/nologin mysql5,创建mysql数据文件夹# cd /usr/local/mysql# mkdir -p /data/mysql ; chown -R mysql:mysql /data/mysql6,编译安装# ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql7,复制配置文件# cp support-files/my-large.cnf /etc/my.cnf8,复制启动脚本文件# cp support-files/mysql.server  /etc/init.d/mysqld9,修改启动脚本权限# chmod 755 /etc/init.d/mysqld10,修改启动脚本文件mysql目录和数据库目录#  vim /etc/init.d/mysqld “datadir=/data/mysql”11,添加开机启动# chkconfig --add mysqld# chkconfig mysqld on# service mysqld start12,启动mysql# /usr/local/mysql/bin/mysqlapache-2apr安装# wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.16.tar.gz#wget http://mirrors.cnnic.cn/apache/apr/apr-1.5.2.tar.gz#tar -xf apr-1.5.2.tar.gz#./configure#make#make install#wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.5.4.tar.gz#tar -xf apr-util-1.5.4.tar.gz#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/aprapache-2.2.31编译安装:1,下载httpd.2.2.31# wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.31.tar.gz2,解压# tar zxvf httpd-2.4.16.tar.gz 3,安装依赖包# yum -y install zlib-devel apr apr-devel4,编译安装# cd httpd-2.4.16./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --with-pcre#make#make install# /usr/local/apache2/bin/apachectl startphp安装:1,在http://www.php.net/downloads.php下载php-5.6.14#tar -xf php-5.6.14.tar.bz22,安装扩展包#rpm -ivh "http://www.aminglinux.com/bbs/data/attachment/forum/month_1211/epel-release-6-7.noarch.rpm"#yum install -y  libmcrypt-devel# cd php-5.6.143,编译# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc  --with-mysql=/usr/local/mysql --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif --disable-ipv6#make#make test#make install4,复制配置文件# cp php.ini-production /usr/local/php/etc/php.ini5,编辑php文件#vim /usr/local/apache2/conf/httpd.confAddType application/x-httpd-php .php<IfModule dir_module>    DirectoryIndex index.html index.htm index.php</IfModule>ServerName localhost:80打开注释掉Satisfy Al<FilesMatch "^.ht">    Order allow,deny    Deny from all #   Satisfy Al</FilesMatch>6,启动测试#/usr/local/apache2/bin/apachectl start# netstat -lnp |grep httpd

tcp        0      0 :::80                       :::*   LISTEN      7667/httpd

相关文章

LeaferJS 1.0 重磅发布:强悍的前端 Canvas 渲染引擎
10分钟搞定支持通配符的永久有效免费HTTPS证书
300 多个 Microsoft Excel 快捷方式
一步步配置基于kubeadmin的kubevip高可用
istio全链路传递cookie和header灰度
REST Web 服务版本控制

发布评论