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.pswp.cn/news/453991.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/453991.shtml
英文地址,請注明出處:http://en.pswp.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;這里滿滿的干貨會讓你不虛此行。實施定量風險分析是就已識別…