linux关于安装

一.安装gcc

gcc

cloog-ppl

ppl(libppl.so.7/libppl_c.so.2)

cpp

mpfr(libmpfr.so.1)

gcc-c++

libstdc++-devel

mpfr-2.4.1-6.el6.i686.rpmppl-0.10.2-11.el6.i686.rpm

 

 

快捷键rz  sz

rzsz命令没找到?

安装lrzsz即可

shell># yum -y install lrzsz

 

二.安装zlib压缩库

shell>## cd /home/jinnan/tar

shell># tar –zxvf zlib-1.2.5.tar.gz

shell># cd zlib-1.2.5

shell># ./configure  //这个配置编译命令不要加目录参数

shell># make && make install

 

三.安装apache

shell># cd /home/jinnan/tar

shell># tar -jxvf httpd-2.2.19.tar.bz2

shell># cd httpd-2.2.19

 shell>#./configure --prefix=/usr/local/http2  \

--enable-modules=all \

--enable-mods-shared=all \

--enable-so

shell># make && make install

 

启动Apache

shell># /usr/local/http2/bin/apachectl start/stop/restart

 

#测试apache

浏览器打开: http://虚拟机IP

看到 "it works!",即为成功

 

配置虚拟主机

1)配置host文件

打开C:/windows/system32/drivers/etc/hosts 文件

增加域名记录

如:

192.168.9.38 www.ec1.com

192.168.9.38 www.ec2.com

2) 增加虚拟主机

vi /usr/local/http2/conf/httpd.conf

取消#  Include conf/extra/httpd-vhosts.conf

这一行前面的#

保存退出

 

vi /usr/local/http2/conf/extra/httpd-vhosts.conf

增加虚拟主机记录

 

<VirtualHost *:80>

     ServerAdmin webmaster@dummy-host.example.com

     DocumentRoot "/usr/local/http2/htdocs/ec1"

     ServerName www.ec1.com

     ServerAlias www.dummy-host.example.com

     ErrorLog "logs/dummy-host.example.com-error_log"

     CustomLog "logs/dummy-host.example.com-access_log" common

</VirtualHost>

<VirtualHost *:80>

     ServerAdmin webmaster@dummy-host2.example.com

    DocumentRoot "/usr/local/http2/htdocs/ec2"

     ServerName www.ec2.com

     ErrorLog "logs/dummy-host2.example.com-error_log"

     CustomLog "logs/dummy-host2.example.com-access_log" common

</VirtualHost>

<VirtualHost *:80>

    DocumentRoot "/var/www/shop"

     ServerName www.ec1.com

</VirtualHost>

注意:/var/www/shop  以上三个目录var  www  shop 的其他用户必须有x可执行权限

 

 

 

 

 

3)

   shell># cd /usr/local/http2/htdocs

  shell># mkdir ec1 ec2

   shell># echo this is ec1.com > ec1/index.html

   shell># echo this is ec2.com > ec2/index.html

 

4)重启apache

/usr/local/http2/bin/apachectl restart

 

 

5)浏览器打开www.ec1.com,www.ec2.com

看到不同的网站内容,虚拟主机创建完毕!

 

安装图形库,为编译PHP做准备

libxml2-2.7.2.tar.gz

jpegsrc.v8b.tar.gz

libpng-1.4.3.tar.gz      

freetype-2.4.1.tar.gz

gd-2.0.35.tar.gz

 

四.安装libxml2

shell># cd /home/jinnan/tar

shell># tar zxvf libxml2-2.7.2.tar.gz

shell># cd libxml2-2.7.2

shell>#./configure --prefix=/usr/local/libxml2  \

--without-zlib

shell># make && make install

 

五.安装jpeg8

shell># cd /home/jinnan/tar

shell># tar -zxvf jpegsrc.v8b.tar.gz

shell># cd jpeg-8b

shell>#./configure --prefix=/usr/local/jpeg \

--enable-shared --enable-static

shell># make && make install

--enable-shared  jpeg需要的函数库程序都编译到该软件里边

                  优点:函数调用速度快

  缺点:软件本身比较大

--enable-static   静态方式函数处理,需要什么函数,马上include

              优点:软件本身比较小

              缺点:函数调用速度慢

六.安装libpng

shell># cd /home/jinnan/tar

shell># tar zxvf libpng-1.4.3.tar.gz

shell># cd libpng-1.4.3

shell>#./configure  #zlib一样不要带参数让它默认安装到相应目录

shell># make && make install

 

七.安装freetype(字体库)

shell># cd /home/jinnan/tar

shell># tar zxvf freetype-2.4.1.tar.gz

shell># cd freetype-2.4.1

shell>#./configure --prefix=/usr/local/freetype

shell># make && make install

 

八.安装GD

shell># cd /home/jinnan/tar

shell># tar -zvxf gd-2.0.35.tar.gz

shell># mkdir -p /usr/local/gd

shell># cd gd-2.0.35

shell>#./configure --prefix=/usr/local/gd  \

--with-jpeg=/usr/local/jpeg/ \

--with-png --with-zlib \

--with-freetype=/usr/local/freetype

shell># make && make install

 

九.安装 php5

shell># cd /home/jinnan/tar

shell># tar -jxvf php-5.3.6.tar.bz2

shell># cd php-5.3.6

shell>#./configure --prefix=/usr/local/php \

--with-apxs2=/usr/local/http2/bin/apxs \

--with-mysql=mysqlnd \

--with-pdo-mysql=mysqlnd \

--with-mysqli=mysqlnd \

--with-freetype-dir=/usr/local/freetype \

--with-gd=/usr/local/gd \

--with-zlib --with-libxml-dir=/usr/local/libxml2 \

--with-jpeg-dir=/usr/local/jpeg \

--with-png-dir \

--enable-mbstring=all \

--enable-mbregex \

--enable-shared

shell># make && make install

复制php.ini配置文件到指定目录

shell># cp php.ini-development /usr/local/php/lib/php.ini

 

配置Apache使其支持php

vi /usr/local/http2/conf/httpd.conf

1) httpd.conf(Apache主配置文件)中增加:

AddType application/x-httpd-php .php

 

2) 找到下面这段话:

<IfModule dir_module>

    DirectoryIndex index.html

</IfModule>

index.html 前面添加index.php

 

3) 建立php测试网页

vi /usr/local/apache2/htdocs/index.php  

输入如下内容:

<?php

phpinfo();

?>

 

4) 重启apache

shell># /usr/local/http2/bin/apachectl restart

 

5) 再次浏览器查看http://虚拟机IP

如果看到php信息,工作就完成了!

转载于:https://www.cnblogs.com/dongweichang/p/7929928.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/453991.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

python cmath模块_cmath模块-PYTHON

这是一个float型的常数>>> cmath.e2.718281828459045>>> type(cmath.e)文档>>> import cmath>>> help(cmath)Help on module cmath:NAMEcmathFILE/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cm…

Python 第三方模块之 pdfkit

pdfkit&#xff0c;把 HTMLCSS 格式的文件转换成 PDF 格式文档的一个工具。 其实&#xff0c;pdfkit 是 html 转成 pdf 工具包 wkhtmltopdf 的 Python 封装。所以&#xff0c;首先安装 wkhtmltopdf 。 一般情况下&#xff0c;wkhtmltopdf需要手动安装&#xff0c;网站是 https…

LNMP环境添加第三方模块

一.在LNMP环境下添加memcache模块 1.安装依赖库(libevent) [rootnode1 ~]# tar xvf libevent-2.0.21-stable.tar.gz [rootnode1 ~]# cd libevent-2.0.21-stable [rootnode1 libevent-2.0.21-stable]# ./configure --prefix/usr/local/libevent [rootnode1 libevent-2.0.21-sta…

学生成绩管理系统-程序维护

托管平台地址&#xff1a;https://gitee.com/lucess/StudentMarkManage.git 小组名称:干翻沈师 程序运行方法: 1、后台服务&#xff1a;进入项目文件夹执行 python TeamProject.py runsercer 0.0.0.0:5050 2、前台服务&#xff1a;进入./WEB-INFO/TeamProjectWeb 文件夹执行 ya…

改需求

转载于:https://www.cnblogs.com/gw2010/p/7856484.html

架构师一般做到多少岁_软件测试可以做到多大岁数?

做这个行业也几年了&#xff0c;经常听到有人问&#xff0c;软件测试这个行业能干到多少岁&#xff0c;当然里边包含想要进入这个行业的和已经在这个行业里边发展的&#xff01;基本上软件测试可以分为三条职业发展路线&#xff1a;技术路线、管理路线、产品路线&#xff01;目…

Python 第三方模块之 MySQL数据库连接模块 PyMySQL

PyMySQL的安装 pip install PyMySQL python连接数据库 import pymysqlconn pymysql.connect(hostlocalhost, userroot, password"root",databasedb, port3306, # 数字3306charsetutf8, # 不是utf-8autocommitTrue # autocommitTrue 让每次提交都去调用…

初学Spring Boot

1.Spring Boot注解 (1)SpringBootApplication开启了Spring的组件扫描和Spring Boot的自动配置,实际上&#xff0c;SpringBootApplication是将三个注解组合在了一起&#xff0c;这三个注解分别是 SpringBootConfiguration&#xff0c;ComponentScan&#xff0c;Ena…

15条常用的视频音频编辑脚本命令(mencoder/ffmpeg等)

可以把它当快速简易参考看&#xff0c;主要的功能有&#xff1a; 视频格式转换音频格式转换切割视频及音频连接两段视频视频音频同步将图像系列转换成视频 这里是百鬼丸以前收集的一部分命令行视频音频编辑脚本命令&#xff0c;一直在自己的记事本里随时用&#xff0c;现在…

python rowcount_PyQt(Python+Qt)学习随笔:QTableWidget的currentItem、rowCount、columnCount等部件状态属性访问方法...

老猿将QTableWidget表格部件中反映部件当前情况的一些方法归类为部件状态访问方法&#xff0c;包括部件的行数、列数、当前项、当前行、当前列等属性访问方法。1、行数rowCountQTableWidget的rowCount属性保存表格部件中的行数&#xff0c;在QTableWidget创建时如果没有指定行数…

Python 内置模块之 random

常用API import random# 随机小数 print(random.random()) # 大于0且小于1之间的小数。0< n<1.0 print(random.uniform(1,3)) # 大于1小于3的小数# 随机整数 print(random.randint(1,5)) # 大于等于1且小于等于5之间的整数#从指定范围内&#xff0c;按指定基…

微信jssdk遇到的一些问题汇总

1.用户手动去触发的接口可以直接调用比如wx.startRecord(); 但是写在页面加载完成里就无效&#xff0c;需要写在 wx.ready(function(){wx.startRecord(); }); 才会有效。 2.h5 的audio标签只支持ogg,mp3,wav格式的音频&#xff0c;微信jssdk录制的是amr格式的语音文件&#xf…

mongodb简单的增删改查

数据库操作&#xff1a; show dbs;#查看数据库use test;#如果没有就创建一个db;#查看当前数据库db.dropDatabase();#删除数据库 数据操作&#xff1a;show collections&#xff1b;#查看集合创建集合、插入&#xff1a;create collection;#创建集合db.student.insert({"na…

ffmpeg-0.8 开源编码解码库从linux下移植到windows vs2005

最新 ffmpeg-0.8 开源编码解码库&#xff0c;从linux下移植到windows vs2005&#xff0c;全部开源。需要 Intel C Compile 和 开源的SDL库支持&#xff0c;由于 Intel C Compile支持C99语法&#xff0c;所以源代码改动很小很小。主要的修改1&#xff1a;添加了linux中有而windo…

python3.5.2使用教程_Python3.5.2-初级教程.docx

Python3.5.2-初级教程Python 初级教程Release:3.5.2引言Python 是一门简单易学且功能强大的编程语言。它拥有高效的高级数据结构&#xff0c;并且能够用简单而又高效的方式进行面向对象编程。Python 优雅的语法和动态类型&#xff0c;再结合它的解释性&#xff0c;使其在大多数…

Flask 离线脚本

1. 在 __init__.py中创建db对象from flask_sqlalchemy import SQLAlchemy# 包含了SQLAlchemy相关的所有操作db SQLAlchemy()2. 在 __init__.py中create_app函数中让将app传入到db中def create_app():app Flask(__name__)app.config.from_object(settings.DevelopmentConfig)f…

day13 迭代器和生成器

一、上节回顾和作业讲解&#xff1a; 1、如果这个网页没有被爬取过就真的去访问这个网页&#xff0c;否则就返回之前访问的时候缓存文件中的内容 &#xff08;重要的例子&#xff09; from urllib.request import urlopen def wrapper(func):def inner(*args, **kwargs):with o…

Centos7.0 搭建Zabbix环境

实验环境&#xff1a;Centos7.0IP:192.168.47.140关闭iptables及setenforce导入源 rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm安装zabbix包安装完成安装mysql源wget http://repo.mysql.com/mysql-community-release-el7-5…

用线性插值算法实现图像缩放

用线性插值算法实现图像缩放 猛禽[Mental Studio](个人专栏)(BLOG) http://mental.mentsu.com 在Windows中做过图像方面程序的人应该都知道Windows的GDI有一个API函数&#xff1a;StretchBlt&#xff0c;对应在VCL中是TCanvas类的StretchDraw方法。它可以很简单地实现图像的缩放…

蒙特卡洛分析 pmp_PMP基础名词介绍 | 59. 实施定量风险分析

点击上方蓝字关注我们你好&#xff0c;这是“兔子研习社”为管理新手推出的“PMP基础名词介绍”系列内容。如果你正打算转到管理岗位&#xff0c;或者想要学习国际通行的项目管理知识&#xff0c;那恭喜你&#xff0c;这里满满的干货会让你不虚此行。实施定量风险分析是就已识别…