首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

CentOS-6.4-minimal版中源码安装Apache-2.2.29

CentOS-6.4-minimal版中源码安装Apache-2.2.29 ---------------------------------------------------------------------------------------------------------------------- 源码安装软件时常见的三个步骤 1)配置环境:通常命令为./configure --prefix=DIR(即指定软件安装目录),如果还想启用其它功能,可在后面接着添加指令           比如下面的--enable-ssl用于启用Apache的SSL模块           若不想使用操作系统缺省的SSL库,还可通过--with-ssl=DIR指定自己编译的SSL库 2)编译源码:通常命令为make 3)安装应用:通常命令为make install ---------------------------------------------------------------------------------------------------------------------- 注意事项 1)httpd-2.2.29目录下的configure工具是GNU软件基金会推出的专门用于源码发布的工具 2)配置环境时若出现这个错误[configure: error: no acceptable C compiler found in $PATH],是说明缺少GCC编译环境   这时执行[yum -y install gcc]命令安装编译源码所需的工具和库就可以了 3)执行yum命令时若出现这个错误[Error: database disk image is malformed],是说明yum的缓存出错,需要清理缓存   这时执行[yum clean dbcache]命令即可 4)配置环境时configure的主要工作就是生成Makefile,编译源码时的make命令就是根据Makefile来进行编译的 5)最好以root安装和启动Apache,以root运行之后,apache就会把它的派生进程切换到非root用户 ---------------------------------------------------------------------------------------------------------------------- 安装Perl5 [root@CentOS64 software]# yum -y install wget [root@CentOS64 software]# wget http://www.cpan.org/src/5.0/perl-5.20.1.tar.gz [root@CentOS64 software]# tar zxvf perl-5.20.1.tar.gz [root@CentOS64 software]# cd perl-5.20.1 [root@CentOS64 perl-5.20.1]# ./Configure -des -Dprefix=/app/perl [root@CentOS64 perl-5.20.1]# make [root@CentOS64 perl-5.20.1]# make install [root@CentOS64 perl-5.20.1]# perl -v ---------------------------------------------------------------------------------------------------------------------- 安装OpenSSL [root@CentOS64 software]# tar zxvf openssl-1.0.1i.tar.gz [root@CentOS64 software]# cd openssl-1.0.1i [root@CentOS64 openssl-1.0.1i]# ./config --prefix=/app/openssl [root@CentOS64 openssl-1.0.1i]# make [root@CentOS64 openssl-1.0.1i]# make install [root@CentOS64 openssl-1.0.1i]# /app/openssl/bin/openssl version ---------------------------------------------------------------------------------------------------------------------- 安装Apache [root@CentOS64 software]# tar z

01

Linux新手教程:如何在线升级ssh版本

一、安装 Zlib 1、下载最新版本 Zlib Zlib 官方网站:http://www.zlib.net/ # cd /usr/local/src # wget -c http://www.zlib.net/zlib-1.2.3.tar.gz 2、编译安装 Zlib # tar xzvf zlib-1.2.3.tar.gz # cd zlib-1.2.3 # ./configure --prefix=/usr/local/zlib # make # make install 这样,就把 zlib 编译安装在 /usr/local/zilib 中了。 二、安装 OpenSSL 1、下载最新版本 OpenSSL OpenSSL 的官方网站:http://www.openssl.org # cd /usr/local/src # wget -c http://www.openssl.org/source/openssl-0.9.8d.tar.gz 2、编译安装 OpenSSL # tar xzvf openssl-0.9.8d.tar.gz # cd openssl-0.9.8d # ./Configure --prefix=/usr/local/openssl # make # make test(这一步很重要哦!是进行 SSL加密协议的完整测试,如果出现错误就要一定先找出哪里的原因,否则一味继续可能导致最终 SSH 不能使用,后果很严重哦!) # make install 三、安装 OpenSSH 1、下载最新版本 OpenSSH OpenSSH 的官方网站:http://www.openssh.com # cd /usr/local/src # wget -c ftp://ftp.it.net.au/mirrors/OpenBSD/OpenSSH/portable/openssh-4.5p1.tar.gz 2、编译安装 OpenSSH # tar xzvf openssh-4.5p1.tar.gz # cd openssh-4.5p1 # ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib=/usr/local/zlib --with-ssl-dir=/usr/local/openssl --with-md5-passwords (注意,如果 configure 时提示 PAM 有错误,那一般是因为系统中没有安装 pam-devel RPM 包,找到安装光盘,安装 pam-devel 就可以解决啦) # make # make install 这样就完成了整个安装 SSH 的工作,在安装完成后,我们还需要修改一下 OpenSSH 的配置文件进一步提升安全性。通过以上步骤完成的安装工作,OpenSSH 的配置文件在 /etc/ssh 下,其中 SSH Server 的配置文件是 sshd_config。 # vi /etc/ssh/sshd_config 找到: CODE: #Protocol 2,1修改为: Protocol 2这样就禁用了 ssh v1 协议,只使用更安全的 ssh v2 协议。 X11Forwarding yes修改为: X11Forwarding no禁用 X11 转发。 修改后保存退出。 ● 生成ssh服务管理脚本 进入ssh解压目录 #cd /contrib/redhat #cp sshd.init /etc/init.d/sshd #chmod +x /etc/init.d/sshd #chkconfig --add sshd 最后,启动 SSH 服务使修改生效: # /etc/init.d/sshd restart 重启后确认一下当前的 OpenSSH 和 OpenSSL是否正确: # ssh -v 如果看到了新的版本号就没问题啦!

01
领券