设为首页 收藏本站
查看: 399|回复: 0

[经验分享] lamp架构之centos6+apache2.4+.mysql5.6+php5.6.30

[复制链接]

尚未签到

发表于 2018-11-17 12:03:59 | 显示全部楼层 |阅读模式
  1  ifconfig
  2  vi /etc/sysconfig/network-scripts/ifcfg-eth0
  3  service network restart
  4  ping www.baidu.com
  5  mkdir /root/.ssh
  6  chmod 700 /root/.ssh
  7  cd /root/.ssh
  8  vi authorized_keys
  9  reboot
  10  vi /etc/selinux/config
  11  reboot
  12  ifconfig
  13  init 0
  14  ifconfig
  15  uanme -a
  16  uname
  17  uname -a
  18  servcie stop iptables
  19  service iptable status
  20  service iptables status
  21  service iptables stop
  22  chkconfig iptables off
  23  cd /usr/local/src
  24  ll
  25  wget
  26  yum install wget
  27  yum install epe
  28  yum install epel
  29  ping www.baidu.com
  30  ping www.baidu.o
  31  ping www.baidu.com
  32  cd /usr/local/src
  33  ll
  34  yum install wget -y
  35  wget http://mirrors.sohu.com/apache/httpd-2.4.29.tar.gz
  36  wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
  37  cd /usr/local/src/
  38  ll
  39  wget http://mirrors.sohu.com/php/php-5.6.9.tar.gz
  40  wget http://mirrors.sohu.com/nginx/nginx-1.9.3.tar.gz
  41  history
  42  0
  43  init 0
  44  history
  45  cd /usr/local/src
  46   yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers make
  47  wget https://netix.dl.sourceforge.net/project/pcre/pcre/8.42/pcre-8.42.tar.gz
  48   wget https://jaist.dl.sourceforge.net/project/pcre/pcre/8.41/pcre-8.41.tar.gz
  49  wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.bz2
  50  history
  51  wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
  52  ll
  53  rm mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
  54  cp mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz.1 mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
  55  ll
  56  rm mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz.1
  57  ll
  58  rm wget-log
  59  ll
  60  wget http://mirrors.cnnic.cn/apache/apr/apr-1.6.3.tar.gz
  61  wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.bz2
  62  ll
  63  init 0
  .一、mysql5.6安装
  64  cd /usr/local/src
  68  wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
  71  tar zxvf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
  72  mv mysql-5.6.35-linux-glibc2.5-x86_64 /usr/local/mysql
  73  cd /usr/local/mysql/
  75  mkdir -p /data/mysql
  76  useradd mysql
  77  ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
  79  cp support-files/my-default.cnf /etc/my.cnf
  80  vi /etc/my.cnf
  81  cp support-files/mysql.server /etc/init.d/mysqld
  82  vi /etc/init.d/mysqld
  83  chmod 755 /etc/init.d/mysqld
  84  chkconfig --add mysqld
  85  chkconfig --list
  86  service mysqld start
  87  netstat -lnp
  88  ps aux |grep mysqld
  90  cd src
  二、apache2.4安装
  92  tar zxvf httpd-2.4.29.tar.gz
  94  tar zxvf  apr-1.6.3.tar.gz
  96  tar jxvf apr-util-1.6.1.tar.bz2
  97  cd apr-1.6.3
  98  ./configure --prefix=/usr/local/apr
  99  yum install libtool -y
  100  ./configure --prefix=/usr/local/apr
  101  echo $?
  102  make && make install
  103  echo $?
  104  cd ..
  105  cd apr-util-1.6.1
  107  ./configure --prefix=/usr/local/apr-util
  108  ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
  109  echo $?
  110  make && make install
  111  yum install expat -y
  112  make && make install
  113  echo %?
  118  cd /usr/local/src
  119  cp -r apr-1.6.3 /usr/local/src/httpd-2.4.29/srclib/apr
  120  cp -r apr-util-1.6.1 /usr/local/src/httpd-2.4.29/srclib/apr-util
  121  cd httpd-2.4.29
  122  ./configure --with-included-apr --prefix=/usr/local/apache2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most
  123  cd ..
  125  tar jxvf pcre-8.41.tar.bz2
  126  cd pcre-8.41
  127  ./configure --prefix=/usr/local/pcre
  128  echo $?
  131  cd httpd-2.4.29
  134  yum install -y pcre-devel
  135  ./configure --with-included-apr --prefix=/usr/local/apache2.4 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-mods-shared=most --with-pcre=/usr/local/pcre
  136  echo $?
  137  make
  138  echo $?
  139  make install
  140  echo $?
  141  cd /usr/local/apache2.4/conf/
  142  vi httpd.conf
  ServerName localhost:80
  143  /usr/local/apache2.4/bin/apachectl start
  144  netstat -lnp
  145  service stop iptables
  146  service iptables stop
  147  service iptables disable
  148  chkconfig iptabes off
  149  chkconfig iptables off
  三、php安装
  158  wget http://mirrors.sohu.com/php/php-5.6.30.tar.gz
  160  tar zxvf php-5.6.30.tar.gz
  161  cd php-5.6.30
  165  cd ..
  166  wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz
  167  tar zxvf libmcrypt-2.5.7.tar.gz
  168  cd libmcrypt-2.5.7
  169  ./configure --prefix=/usr/local/libmcrypt
  170  make && make install
  171  echo $?
  174  cd php-5.6.30
  178  yum install epel*
  179  yum install -y libmcrypt-devel
  180  ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php/etc  --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --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
  182  make
  184  make install
  186  cp php.ini-production /usr/local/php/etc/php.ini
  188  vi /usr/local/apache2.4/conf/httpd.conf
  1
  AllowOverride none
  Require all granted
  
  2AddType application/x-compress .Z
  AddType application/x-gzip .gz .tgz
  AddType application/x-httpd-php .php
  3      
  DirectoryIndex index.html index.php
  
  189  /usr/local/apache2.4/bin/apachectl -t
  191  vi /usr/local/apache2.4/htdocs/1.php
  
  192  ls /usr/local/apache2.4/modules/libphp5.so
  193  cd /usr/local/apache2.4/htdocs/
  195  chmod 755 index.html
  199  /usr/local/apache2.4/bin/apachectl -M
  205  /usr/local/apache2.4/bin/apachectl restart
  若打不开测试页,就重启一下电脑。再开启HTTP服务
  /usr/local/apache2.4/bin/apachectl start


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-636198-1-1.html 上篇帖子: Apache的相关优化 下篇帖子: Apache 启动遇到问题解决
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表