利用xshell从Windows向Linux传输文件
[root@nanainux ~]#yum install lrzsz
[root@nanalinux ~]#rz
 
 MySq二进制包安装
 mysql包——搜狐
 http://222.21.218.207/mirrors.sohu.com/mysql/MySQL-5.0/mysql-5.0.95-linux-x86_64-glibc23.tar.gz
http://mirrors.sohu.com/mysql/MySQL-5.0/ ;

2. cd /usr/local/src                                         
  tar zxvf  mysql-5.0.95-linux-x86_64-glibc23.tar.gz                 //解压二进制包
  mv mysql-5.0.95-linux-x86_64-glibc23  /usr/local/mysql/     //移动到mysql
  cd mysql/

3.useradd -s /sbin/nologin mysql                                    //添加mysql用户
  mkdir  datadir                                  
  chmod -R mysql:mysql /data/mysql/                                 //将刚才创建的mysql添加的mysql组中

4.cp support-files/mysql/mysql_install_ db/my-large.cnf /etc/my.cnf     //拷贝配置文件
  vim /etc/my.cnf  //将bin-log 注释掉                                                   //修改配置文件
  cp support-files/myslql.server /etc/init.d/mysqld                                 //拷贝 启动文件
  vim /etc/init.d/mysqld    //修改 datadir=/data/mysql    basedir=/usrlocal/mysql

5 ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql          //初始化数据库

6.   /etc/init.d/mysqld                                                                    //启动mysql服务

7.  ps aux|grep mysql                                                                  //查看mysql进程是否存在

Apache安装
 安装的三部曲:
1.配置安装参数 以及编译参数

2.make   编译

3.make isntall 安装
apache安装包下载地址
http://archive.apache.org/dist/httpd/

[root@nanalinux src]#cd /usr/local/src
[root@nanalinux src]#rz                                   //传输apache的安装包
[root@nanalinux src]#tar zxvf  httpd-2.2.0.tar.gz    //解压包 ; 注 tar.ga2包需要将参数 zxvf  换为 jxvf  ;  去掉参数V不显示解压过程
[root@nanalinux src]#cd httpd-2.2.0
[root@nanaLinux src]# ./configure --prefix=/usr/local/apache2 --with-included-apr --with-pcre --enable-nodes-shared==most  
                                                        //配置编译参数 apache2为安装的位置, 红字部分很重要(可移植的.....),不加的话影响make install过程;
[root@nanaLinux src]# yum install gcc   //编译所需的$PATH(变量环境),  这是个 C语言在Linux下的 编译器;
 [root@nanaLinux src]# make                    //编译
[root@nanaLinux src]# make isntall           //安装

PHP安装
下载PHP包  http://www.php.net/downloads.php

cd /usr/local/src
rz
tar zxf php-5.5.30.tar.gz
cd php-5.5.30/
./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
                                                                          //配置编译参数;
                                                                          //config-file->配置文件
                                                                          //libxml,jpeg,.......->为各种模块
configure: error: xml2-config not found. Please check your libxml2 installation.         //错误1:缺少libxml2模块
yum list|grep -i 'xml2'                                                                                         //查找本地yum
yum install libxmllibxml2-devel.x86_64                                                     
yum install libxml2-devel.x86_64

configure: error: Cannot find OpenSSL's <evp.h>                                             //同错误1解决方式
yum list |grep openssl-devel
yum install openssl-devel.x86_64

checking for BZip2 in default path... not foundconfigure: error: Please reinstall the BZip2 distribution
 yum list | grep bzip2
 yum install bzip2-devel.x86_64
 
error:jpeg
yum list | grep jpeg
yum install libjpeg-turbo-devel.x86_64

configure: error: png.h not found.
yum list |grep png
yum install libpng-devel.x86_64

configure: error: freetype.h not found.
 yum list |grep freetype
 yum install freetype-devel.x86_64

configure: error: mcrypt.h not found. Please reinstall libmcrypt.       //最经典的一个错误
 yum list|grep mcrypt                                                                   //结果是本地yum中没找到,必须依靠epel扩展源
 rpm -ivh 'http://www.lishiming.net/data/attachment/forum/epel-release-6-8_64.noarch.rpm' //安装epel 扩展源
 yum list|grep mcrypt                                                                 //能在epel扩展源中找到
 yum isntall libmcrypt-devel.x86_64
 
make                                                                                        //编译
echo $?                                                                                   //查看上条命令的执行结果(是否编译成功)
make install                                                                              //安装
/usr/local/php/bin/php -i|less                                                      //查看PHP配置文件
                     //  Configuration File (php.ini) Path => /usr/local/php/etc
                      //  Loaded Configuration File => (none)  (加载配置文件路径不存在)
cp php.ini-production /usr/local/php/etc/php.ini                            //复制配置文件到解决上个路径不存在

apache结合php
vim /usr/local/apache2/conf/httpd.conf                                        //apache的配置文件
找到:

AddType application/x-gzip .gz .tgz
在该行下面添加:

AddType application/x-httpd-php .php
找到:

<IfModule dir_module> DirectoryIndex index.html</IfModule>
将该行改为:

<IfModule dir_module> DirectoryIndex index.html index.htm index.php</IfModule>
找到:

#ServerName www.example.com:80
修改为:

ServerName localhost:80
测试LAMP是否成功
 /usr/local/apache2/bin/apachectl -t                                      //启动apache之前先检验配置文件是否正确->Syntax OK
/usr/local/apache2/bin/apachectl start                                   //启动apache,如果打开之后测试出问题,去修改上边的httpd.conf文件
                                                                                         //一定要重启apache——>/usr/local/apache2/bin/apachectl restart
netstat -lnp |grep httpd                                                        //查看是否启动
curl localhost                                                                       //测试
<html><body><h1>It works!</h1></body></html>
vim /usr/local/apache2/htdocs/1.php                                        //测试是否解析PHP
<?php echo "php解析正常";?>
curl localhost/1.phpphp解析正常[root@localhost ~]#                    //解析正常,如果解析失败,要去仔细检查                
                                                                                               //vim /usr/local/apache2/conf/httpd.conf
初次使用浏览器访问我们的web服务的时候,你可能无法访问,这是因为防火墙的缘故
iftables -F                                                                               //关闭防火墙

在浏览器中输入 127.0.0.1
页面显示     welcome nana                                                  //测试成功

LAMP安装细则的更多相关文章

  1. LAMP安装各种问题解决方案

    LAMP环境配置安装注意安装步骤及说明事项. LAMP安装各种问题解决 1. 访问ftp报错 解决: 关闭selinux vi /etc/selinux/config 内容修改为: selinux=d ...

  2. CentOS7 lamp安装 centoOS6 lamp

    快速lamp安装 How To Install Linux, Apache, MySQL, PHP (LAMP) stack On CentOS 7 Introduction A "LAMP ...

  3. Linux(lamp安装)

    网络配置 1. 配置ip地址和子网掩码 编辑配置文件: > cd  /etc/sysconfig/network-scripts > cp  ifcfg-eth0  ./ifcfg-eth ...

  4. HHvm建站环境搭建方法:Nginx,Mariadb,hhvm及lnmp/lamp安装部署

    HHVM起源于Facebook公司,是一个开源的PHP虚拟机,使用JIT的编译方式以及其他技术,让PHP代码的执行性能大幅提升.HHVM提升PHP性能的途径,采用的方式就是替代Zend引擎来生成和执行 ...

  5. lamp 安装 apache

    lamp安装 httpd-2.2.4.tar.gz :http://download.csdn.net/detail/wulvla020311/8046141 先检查一下装的东西都在不在:rpm -q ...

  6. linux基础——文件挂载,lamp安装

    一. 文件挂载 lsblk -f 显示文件系统信息 mount -t vfat UUID="ffffffffff" /mnt   挂载到/mnt目录 Linux针对于各式U盘挂载方 ...

  7. Lamp安装 php-v5.6【ZendGuardLoader】的问题

    Lamp安装 php-v5.6[ZendGuardLoader]的问题 标签(空格分隔):php,linux Apache日志: 就这个问题导致无法解析运行php文件.下面是网上找的解决方案 Zend ...

  8. DigitalOcean 推荐的ubuntu16下LAMP安装过程

    LAMP安装过程: How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04 (另一个参考例程:Ubuntu 16.0 ...

  9. lamp安装

    一.简介 什么是LAMPLAMP是一种Web网络应用和开发环境,是Linux, Apache, MySQL, Php/Perl的缩写,每一个字母代表了一个组件,每个组件就其本身而言都是在它所代表的方面 ...

随机推荐

  1. BZOJ 3668:起床困难综合症(贪心)

    分析:按位贪心即可. program sleep; var a,g:..]of longint; n,i,m,ans,t,len,x,y,v:longint; c:char; s:string; e: ...

  2. 2018-8-10考试 T3. 朝暮(akekure)

    题目大意:有$n$个点和$m$条边的图($n - 1 \leq m \leq n + 5$),每个点要么黑要么白,两个黑点不可以相邻,问方案数 题解:可以发现当图为一棵树的时候只需要一个树形$DP$ ...

  3. CF840C On the Bench 解题报告

    CF840C On the Bench 题意翻译 给定\(n\) \((1≤n≤300)\) 个数,求问有多少种排列方案使得任意两个相邻的数之积都不是完全平方数.由于方案数可能很大,输出方案数 \(m ...

  4. 洛谷 P2168 [NOI2015]荷马史诗 解题报告

    P2168 [NOI2015]荷马史诗 题目描述 追逐影子的人,自己就是影子 --荷马 Allison 最近迷上了文学.她喜欢在一个慵懒的午后,细细地品上一杯卡布奇诺,静静地阅读她爱不释手的<荷 ...

  5. 【HDU 4300 Clairewd’s message】

    Clairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important ...

  6. Eclipse中的引用项目报Could not find *.apk!解决办法

    百度上很多关于Could not find *.apk!这种编译报错的解决帖子,但是笔主在这里主要说一下在 引用工程项目的场景 下报这个错误消息的问题(不影响本项目的正常编译运行!). 笔主刚从谷歌上 ...

  7. SCOI2008奖励关 [状压dp]

    题目描述 你正在玩你最喜欢的电子游戏,并且刚刚进入一个奖励关.在这个奖励关里,系统将依次随机抛出k次宝物,每次你都可以选择吃或者不吃(必须在抛出下一个宝物之前做出选择,且现在决定不吃的宝物以后也不能再 ...

  8. [hdu 4417]树状数组+离散化+离线处理

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4417 把数字离散化,一个查询拆成两个查询,每次查询一个前缀的和.主要问题是这个数组是静态的,如果带修改 ...

  9. Wpremig和Jhadgre的藏宝图(最大流+二分)

    Wpremig和Jhadgre的藏宝图 题目链接:https://ac.nowcoder.com/acm/contest/333/M Description: Jhadgre在生日那天收到了一张神秘的 ...

  10. intellij IDEA与springboot项目建立

    概念问题: IntelliJ系中的Project相当于Eclipse系中的workspace.IntelliJ系中的Module相当于Eclipse系中的Project.IntelliJ中一个Proj ...