一、Linux源码包编译
————————————————————
过程
./configure --prefix=/usr/local/tutils 类似Windows下指定软件安装路径
make (头文件,库文件)
make install
——————————————————————————————————————————
源码包组成
二进制,/usr/local/tutils/bin,/usr/local/tutils/sbin,/usr/local/tutils/libexec
库文件,/usr/local/tutils/lib
头文件,/usr/local/tutils/include
配置文件,/usr/local/tutils/etc
帮助文件,/usr/local/tutils/share
执行
法1,#/usr/local/tutils/bin/queryperf
法2,#export PATH=:/usr/local/tutils/bin:/usr/local/tutils/sbin
#queryperf
——————————————————————————————————————————
系统默认寻找库文件的路径:
/lib,/usr/lib,/usr/local/lib
vim /etc/ld.so.conf
扩展路径/etc/ld.so.conf.d/*.conf
如,/etc/ld.so.conf.d/tutils.conf
#ldconfig -v 重新读取一下自定义的库文件路径
man的默认路径:
vim /etc/man.config定义使用man时到哪个路径找对应文件
. /etc/man.config
或
man MANPATH /usr/local/tutils/share/man queryperf
系统头文件查找位置:
/usr/include或/usr/local/include
ln -sv /usr/local/tutils/include /usr/include/tutils
二、WEB应用
http超文本传输协议stateless--cookie,tcp,80
html
www
http 1.0 1.1协议8中动作表明request-uri资源处理:options,head,get,post,put,delete,trace,connect
url、uri
协议响应码:1××简单的回显信息
2××正常信息
3××301\302-url重定向,正常信息,但信息响应不完整
4××临时性错误信息
5××永久性错误
超文本:ascii美国信息交换标准代码
MIME多用途因特网邮件扩展
cgi通用网关接口---mod_perl
asp,jsp,php+容器、perl,python+框架
高可用,集群,负载均衡
存储,数据库,ERP(Enterprise Resource Planning, 企业资源计划),架构师,咨询师
——————————————————————————————————————
1、web服务器
软件httpd(50%),lighttpd(轻量,开源),nginx(俄罗斯),thttpd
IIS,(IBM)Websphere(40%),Weblogic(30%),Fusion middleware(oracle)、tomcat,resin(开源)、JBoss(redhat)
asp.net
jsp
apache-httpd 1.3 2.0 2.2
安装httpd,关闭selinux
getenforce
setenforce 0
/etc/httpd
/var/www
/var/log/httpd
/etc/httpd/modules
/var/run/
DocumentRoot "/var/www/html"
<Directory "/var/www/html">
——————————————————————————————————————————
Indexes索引目录 Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI是否允许执行cgi脚本 MultiViews内容协商
访问控制: Order allow,deny
Allow from all
DirectoryIndex index.jsp index.html index.html.var
实现:http://192.168.0.27/~redhat/
UserDir disable
chmod o+x /home/redhat
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
AddDefaultCharset UTF-8
Alias /icons/ "/var/www/icons/"给路径做别名
<Directory "/var/www/html">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
————————————————————————————————
测试语法
httpd -t
service httpd configtest
提供帐号密码才能访问:
vim httpd.conf
<Directory "/var/www/html">
AllowOverride AuthConfig
AuthName "Give me money..."
AuthType basic
AuthUserFile /etc/httpd/.htpasswd
Require user redhat student
(允许列表:Require valid-user)
</Directory>
htpasswd -cm /etc/httpd/.htpasswd redhat 第一次使用时加c
htpasswd -m /etc/httpd/.htpasswd student 第二次使用时不加c
单目录认证:
在c下创建.htaccess文件
/var/www/html
a
b
c
index.html
____________________________________________________________________
HTTPS:
yum install mod_ssl*
/etc/httpd/conf.d/ssl.conf
SSLEngine on
cd /etc/httpd/ssl
转载于:https://blog.51cto.com/negiup/490053