DAY14: 课堂记录-Apache和LAMP架构–技术流ken

Apache介绍
:80 — 端口 http对应80端口,https对应443端口
默认发布目录:/var/www/html/
默认发布文件:index.html
默认端口:80
200:ok,请求下载成功
304:not modified,标识一个缓存的资源是否发生过更改
403:forbidden,表示客户端没有权限访问所请求的资源
404:Not Found,表示客户端所请求的资源不存在
500:Internal Server Error,服务器内部错误
502:Bad Gateway,代理服务器从上游服务器获取到的是伪响应
编译安装Apache(http)
1. 编译安装apr
第一步:上传相关的软件包
[root@ken ~]# ls
apr-1.5.2.tar.gz apr-util-1.5.4.tar.gz httpd-2.4.20.tar.gz
第二步:解压
[root@ken ~]# tar xf apr-1.5.2.tar.gz
[root@ken ~]# tar xf apr-util-1.5.4.tar.gz
[root@ken ~]# tar xf httpd-2.4.20.tar.gz
第三步:进入安排apr解压目录,进行编译
[root@ken ~]# cd arp- apr-1.5.2
[root@ken apr-1.5.2]# ./configure –prefix=/usr/local/apr
第四步:解决依赖
configure: error: no acceptable C compiler found in $PATH #提示缺少编译器
See `config.log’ for more details
[root@ken apr-1.5.2]# yum install gcc -y
第五步:继续编译
[root@ken apr-1.5.2]# ./configure –prefix=/usr/local/apr
第六步:安装
[root@ken apr-1.5.2]# make && make install
2. 编译安装apr-utils
第一步:进入并开始编译
[root@ken ~]# cd apr-util-1.5.4
[root@ken apr-util-1.5.4]# ls
aprutil.dep buckets config.layout encoding libaprutil.mak NOTICE uri
aprutil.dsp build configure export_vars.sh.in libaprutil.rc NWGNUmakefile xlate
aprutil.dsw buildconf configure.in hooks LICENSE README xml
aprutil.mak build.conf crypto include Makefile.in README.cmake
apr-util.pc.in build-outputs.mk dbd ldap Makefile.win renames_pending
apr-util.spec CHANGES dbm libaprutil.dep memcache strmatch
apu-config.in CMakeLists.txt docs libaprutil.dsp misc test
[root@ken apr-util-1.5.4]# ./configure –with-apr=/usr/local/apr –prefix=/usr/local/apr-util #需要制定apr位置
第二步:编译安装
[root@ken apr-util-1.5.4]# make && make install
3. 编译http
第一步:进入解压文件并开始编译
[root@ken httpd-2.4.20]# ./configure –prefix=/usr/local/httpd2.4 –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util –enable-cache –enable-deflate –enable-ssl –enable-rewrite –with-mpm=event
第二步:解决依赖
依赖一:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/ #提示缺少pcre
You have new mail in /var/spool/mail/root
[root@ken httpd-2.4.20]# yum install pcre pcre-devel -y
依赖二:
checking whether to enable mod_deflate… configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
[root@ken httpd-2.4.20]# yum install openssl openssl-devel -y
第三步:安装
[root@ken httpd-2.4.20]# make && make install
编译安装的apache常用操作
在任何路径下执行apachectl:
[root@ken bin]# cat /etc/profile.d/httpd.sh
export PATH=/usr/local/httpd2.4/bin:$PATH
[root@ken bin]# export /etc/profile.d/httpd.sh
-bash: export: `/etc/profile.d/httpd.sh’: not a valid identifier
[root@ken bin]# source /etc/profile.d/httpd.sh
验证操作:
[root@ken bin]# ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:111 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 *:22 *:*
LISTEN 0 100 127.0.0.1:25 *:*
LISTEN 0 128 :::111 :::*
LISTEN 0 128 :::22 :::*
LISTEN 0 100 ::1:25 :::*
[root@ken bin]# cd
[root@ken ~]# pwd
/root
[root@ken ~]# apachectl stop
[root@ken ~]# ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:111 *:*
LISTEN 0 128 *:22 *:*
LISTEN 0 100 127.0.0.1:25 *:*
LISTEN 0 128 :::111 :::*
LISTEN 0 128 :::22 :::*
LISTEN 0 100 ::1:25 :::*
apache配置文件常用参数
Listen 80
User apache
Group apache
DocumentRoot “/var/www/html”
DirectoryIndex index.html
基于端口创建虚拟主机
第一步:修改配置文件
[root@ken ~]# vim /etc/httpd/conf/httpd.conf
<VirtualHost *:81>
DOCUMENTROOT /var/www/ken1
DIRECTORYINDEX index.html
</VirtualHost>
<VirtualHost *:82>
DOCUMENTROOT /var/www/ken2
DIRECTORYINDEX index.html
</VirtualHost>
Listen 80
Listen 81
Listen 82
第二步:创建网站根目录
[root@ken ~]# mkdir /var/www/ken{1,2}
第三步:创建网页首页文件
[root@ken ~]# echo “111” >> /var/www/ken1/index.html
[root@ken ~]# echo “222” >> /var/www/ken2/index.html
第四步:重启apache
[root@ken ~]# systemctl restart httpd
第五步:linux中访问
[root@ken ~]# curl 192.168.64.4:81
111
[root@ken ~]# curl 192.168.64.4:82
222
基于域名创建虚拟主机
第一步:修改配置文件
[root@ken ~]# vim /etc/httpd/conf/httpd.conf
<VirtualHost 192.168.64.4>
DOCUMENTROOT /var/www/ken1
DIRECTORYINDEX index.html
servername www.ken1.com
</VirtualHost>
<VirtualHost 192.168.64.4>
DOCUMENTROOT /var/www/ken2
DIRECTORYINDEX index.html
servername www.ken2.com
</VirtualHost>
第二步:创建网站根目录
[root@ken ~]# mkdir /var/www/ken{1,2}
第三步:创建网页首页文件
[root@ken ~]# echo “111” >> /var/www/ken1/index.html
[root@ken ~]# echo “222” >> /var/www/ken2/index.html
第四步:重启apache
[root@ken ~]# systemctl restart httpd
第五步:解析域名
[root@ken www]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.64.4 www.ken1.com www.ken2.com
第六步:linux中访问
[root@ken www]# curl www.ken1.com
111
[root@ken www]# curl www.ken2.com
222
第七步:window中访问
修改window hosts文件
略
apache上线静态网站
第一步:关防火墙
[root@ken www]# systemctl stop firewalld
[root@ken www]# setenforce 0
第二步:上传京东静态页面至网站根目录
[root@ken html]# rz
[root@ken html]# ls
jd.zip
[root@ken html]# unzip jd.zip #需要yum install unzip -y
第三步:访问京东网页
略
apache上线动态网站
第一步:需要先部署LAMP架构
[root@ken jd]# yum install httpd php php-mysql mariadb-server -y
第二步:启动apache和数据库
[root@ken jd]# systemctl restart httpd mariadb
第三步:上传安装包并解压
[root@ken html]# ls
wordpress-3.3.1-zh_CN.zip
[root@ken html]# unzip wordpress-3.3.1-zh_CN.zip
第四步:复制wordpress文件到本目录下
[root@ken html]# cp wordpress/* . -a
[root@ken html]# ls
index.php wordpress-3.3.1-zh_CN.zip wp-blog-header.php wp-cron.php wp-login.php wp-settings.php
license.txt wp-activate.php wp-comments-post.php wp-includes wp-mail.php wp-signup.php
readme.html wp-admin wp-config-sample.php wp-links-opml.php wp-pass.php wp-trackback.php
wordpress wp-app.php wp-content wp-load.php wp-register.php xmlrpc.php
第五步:配置数据库文件
[root@ken html]# cp wp-config-sample.php wp-config.php
[root@ken html]# vim wp-config.php
/** WordPress 数据库的名称 */
define(‘DB_NAME’, ‘ken’);
/** MySQL 数据库用户名 */
define(‘DB_USER’, ‘ken’);
/** MySQL 数据库密码 */
define(‘DB_PASSWORD’, ‘123’);
第六步:配置数据库
[root@ken html]# mysql -uroot
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.56-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]> create database ken;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all on *.* to ken@’localhost’ identified by ‘123’;
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]> exit
Bye
第七步:访问网站
略
1. Weddi graduation dresses for cheap ng sarees work best on women who wedding dresses online sale have a pear shaped figure. If your figure is one with a very perfect waistline, but y mother of the bride dresses uk ou are heavier on the upper part of the body and lighter on the bottom half then the saree is the best way to go about it. Don a color that best suits your complexion and try
The mesmerizing land of beauty a prom dresses 2019 cheap nd beaches, Goa attractions has been charming travelers a beach wedding dresses plus size cross globe since a very long time. The magnificent plethora of sights and sounds that can be experienced in Goa is simply fascinat cheap wedding dresses uk ing and awe-inspiring. With Goa Travel Guide, a vacation in Goa has become easy
This is the modern era where we can find a plus size prom dresses uk good and compatible partner with ease and commodiousness onli evening dresses 2019 online ne. It is really tough to find long term relationships in bars and night clubs. It is a complete wastage of time and money. The same goes for every human being cheap graduation dresses uk whether black or white. The black da
Gold has been consistently kjøp aftenkjoler som sendes med en gang on the top of the list of World of War tilpassede aftenkjoler craft players. It enables players to do a lot of things. Some even make a living out of the gold they farmed in WoW. So how do you really farm massive amounts of gold? What is the b klaff stil kjole est gold farming technique for you? In order for you t
http://limousinen-vipfahrdienste.de/most-secure-mature-dating-online-website-without-registration/ looking for older women in colorado
http://maycuacatco.com/no-subscription-cheapest-senior-singles-online-dating-service mature local dating
http://vahidblog.ir/biggest-senior-singles-dating-online-services/ looking for older senior citizens in phoenix
What’s up Dear, are you genuinely visiting this site regularly, if so afterward you will without doubt take nice experience.
Normally I do not read article on blogs, however I would like to say that this write-up
very pressured me to take a look at and do it!
Your writing taste has been amazed me. Thank you, quite nice article.
Hello there, just became aware of your blog through
Google, and found that it is really informative. I’m gonna watch out for brussels.
I’ll be grateful if you continue this in future. Numerous people will be benefited from your writing.
Cheers!
I was recommended this blog by my cousin. I am not sure whether
this post is written by him as no one else know such detailed about my
problem. You are incredible! Thanks!
Epson and Canon have the lowest opera shapewear panties ting temperatures wherea Casual Dresses For Women s HP and Lexmark have the highest,shapewear panties. These print head fire at many thousands of degrees Fahrenheit. If you are us Cheap Casual Dresses Plus Size ing an ink that is not designed to withstand temperatures of this magnitude then you are likely to run into pr
Now, depending on the amount lin height wedge shoes for women es the publisher allows you,height wedge hidden high heel sneakers shoes for women, you may have to shorten your offer. So be very mindful of what you include in your ad. FREE! Dramatically Increase YOUR Website Traffic 7 Sec hidden heel casual shoes w01H rets To An Instant Traffic StampedeSpecial characters such as (!, $,
I’ve always figured sneakers with hidden heel that,sne height wedge shoes for women akers with hidden heel, when I get older, I was going to live alone in isolation. That way I could just slip away as opposed to being a burden on anyone else. I won’t have to live be Hidden Wedge Loafers l37Heightenshoes shoes add to your height ing spoon fed, with the contents dripping down the front of my adult bib.Of course, many
Leading hidden heel women shoes companies offer a Women hidden wedge shoes great range of promotional printed pens. You can see the samples of its collection online. Hidden Wedge Womens Shoes The top suppliers have different categories of pens from low cost to high priced pens manufactured by some famous brands. You can avail ball pens, gel pens, fountain pens, highlighter
If you want to secure the future o best hidden heel shoes f your family when you cannot be there to financiall hidden height shoes y provide for them, life insurance may be a good option. However, if you are looking for cheap life insurance,best hidden heel shoes give you height l53Heig shoes, you may end up being under insured. Determine your needs first and then go shopp
And lets women hidden heel shoes not forget the ever popular cold and flu viruses that height wedge shoes for women always seem to be making the rounds. There is one thing however that does the rounds more often than you might realize,women hidden heel shoes, but always seems 29820 (3) to be overlooked or passed off lightly,height wedge shoes for women, and th
It is always obv women hidd ious tha hidden wedge sneakers t bookends are made of metals, marble, brass and bronze. The reason for this is that, the hidden heel sport shoes y hold the books securely even if you place a long line of books between the book ends. Bronze bookends have been a decorative piece because of its appearance, shiny and more resembles li
It takes few claims and tickets to be label Hidden Wedge Flats ed as hidden wedge sports shoes n79Elevator high heel sh a high risk driver. A driver can be considered as risky if he is of the age group between 18 to 25 years because the young drivers are more prone to rash driving, a new driver who has recently gone throug shoes that add height h the driving learning program and has no exper
Plan out an age Hidden Heel Trainers nda like plays and activities keeping in mind the party them Best value Hidden Heel Shoes e; area of party hall and the age of children, for example small kids love fun whereas pre-teenagers want some drama, games and music and dance.There are many thi hidden heel casual shoes ngs that you can include in your high fibre diets, you don
Ar shoes that make you look taller e you just starting out with online marketing? This type of compensa hidden heel flats tion plan is going to be difficult for you.If you are just starting your work from home business and onli Hidden Heel Trainers ne marketing your sponsor well begin to help you make your first two sales but upon which you and your home based business no
The most popular colors are blue and yellow, however a (topaz bracelet) cou 38962 ld have pink, yellow,38962, blue, and brown, purple, green and ma cheap plus size bodycon dresses ny other shades in it.Rockabilly clothes are characterized by bright,cheap plus size bodycon dresses, bold prints in striking colors. The footwear for this par cheap bandage dress t
When it came to jeans in the 90s, the rule was Cheap Bodycon Dress online ; the baggier, the bet cheap black bodycon dress ter. These supersized pants were a must-have of the day and quintessential to any streetwear look. They were also worn low on the hips and often accompanied by a chain cheap body shapers for plus s with a Velcro wallet attached to the end.The cheap cell phone o
The Nex cheap red bodycon dress – Esa us One opts for the older style trackball for physical navigation of its men best shapewear bodysuit u system,cheap red bodycon dress – Esa, however this is not overly needed as multi touch screen technology means that the user can a cheap plus size bodycon dresses ccess everything via the main screen. Most of them prefer silk sarees, as traditi
The Samsung S5200 is a new compact sliding phone. Ther cheap black bodycon dress e are several color schemes of the S5200 including black & bronze, Cheap Casual Dresses Online black & red as well as the newer pink & white color combination. The phone features a gradient finish to the rear of the g plus size dresses for women adget which looks great as the colors combine.The manager
Men feel all cheap bodycon dresses uk the same things that women do – they’re just not supposed to expre cheap bandage dress ss it. Fear,cheap bodycon dresses uk, sadness,cheap bandage dress, giddy joy, frustration,plus size plus size strapless shapewear strapless shapewear, all of these emotions are supposed to be played out in a “manly” fashion,shapewear bathing suit, wit
You can also use green tea with aloe vera, which itse Cheap Bodycon Dress online lf is very useful for hair. Blend al 15725 (2) oe vera with green tea and apply this mixture on your hair. Take the mixture and massage it gently over the length of your scalp and hair. Keep it like th best cheap shapewear is for 10 minutes and wash it well.The report focuses on
Your wedding is 5954 (8) a wonderful opportun plus size shapewear ity to express your joy and share it with those you love. Use the tips provided in this article and plan a great wed Cheap Bodycon Dress online ding you will always remember.1. Fill both the teapot and the cup about halfway with hot water to pre-heat them,5954 (8),plus size shapewear. Tilt t
Your cheap bandage dress reg buy cheap bandage dress uk istration is the first step you can contact other singles in an online dating site.Atlanta is the capital and largest city in Georgia. This U.S. best cheap shapewear state has thousands of singles looking for love and relationship on the Internet,cheap bandage dress. Where to meet single women in Atlanta is a go
Gone are th postpartum shapewear e days best cheap shapewear when women just stay at home and become servants of their husbands. Today, w cheap bodycon dresses omen are going to the mainstream and are starting to fit in to the society, particularly corporate society. They work in the office and at the same time take care of their families. It is not always easy to
Now I am going away to do my breakfast, afterward having my breakfast coming yet again to read additional news.
adreamoftrains best web hosting sites
I have read so many articles or reviews on the topic of the blogger lovers except this article is genuinely a good paragraph, keep it
up.
Thanks for finally talking about > DAY14: 课堂记录-Apache和LAMP架构–技术流ken – 技术流ken < Liked it!
While the easiest way to change a color to black and white is to desaturate it Cheap Casual Dresses Online with your photo editor, this technique doesn’t let you con Cheap Shapewear Online Sale trol how the primary colors work together to produce a grayscale brightness. If you have good white balance in your picture, then simple desaturation may be all y full body shapewear o
This panel on cheap glasses online will give y Cheap Shapewear Online Sale ou a range of filters that will help you choose the glasses you wan Cheap Casual Dresses Online t. Choose the brand that you are looking for (you can choose multiple), choose your gender,Cheap Shapewear Online Sale, type of frame and its style and full body shapewear colour and other specifications and
This design is incredible! You certainly know how to
keep a reader amused. Between your wit and your videos,
I was almost moved to start my own blog (well,
almost…HaHa!) Excellent job. I really enjoyed what you had to
say, and more than that, how you presented it. Too cool!
adreamoftrains web hosting reviews
If you are just starting your work from home b hidden heel casual shoes us Hidden Heel Trainers iness and online marketing your sponsor well begin to help you make your first two sales but upon which you and your home based business now have turn into the sponsor’s competition. You want to consider yourself w sneakers with hidden heel hat reason does your sponsor have to h
Offered by the United States Postal services, this is Women hidden wedge shoes an email marketing prog sneakers with hidden heel ram that delivers post to every door on the selected route. However, there are size requirements; they consider the thickness and size of the delivery. These services allow you to e Hidden Heel Trainers mphasize on print marketing and content, w
A lot of car owners like seeing their cars looking spotless and sparkly at al hidden heel shoes l times. Nevertheless,hidden heel shoes, what many fail to understand is that shoes that make you look taller this can be achieved by regular and proper cleaning. A well maintained car will certainly serve its owner for many years while a badly maintaine Women hidden wedge shoes d
Simply relax and sit at hidden heel casual shoes your ho hidden heel shoes me. You can search for your true love on these online places and you will definitely get a partner soon. You want long term love relationship and not just one night stand. hidden heel flats You can definitely find the best black male or female for you out of millions of black singles av
Last thing about Online Shopping that appeals to women is the seasonal off shapewear for dress e cheap body shapers for plus size rs, especially festive and wedding Offers when the excitement to buy best fashion wear kicks in. Every woman purchases huge collection o cheap shapewear bodysuit for plus size f fashion wears, jewelleries and other apparels during festive and wedding occasions, and
The black dating in line is recreation and easy. Very t plus size shapewear hat you must act one on the other with other single black men is cheap plus size dresses personnel dating the advertisement. A profile leaves the other on line chooses know you. You can mention on your profile of which person you seek. You can say such things in your best cheap shapewear p
Every teacher and parent knows it’s important to keep chi shapewear for dress ldr Bodycon Dresses For Women en’s interest. Although most kids are inquisitive, they also have shorter attention spans than most adults. One of the best ways to o Cheap Casual Dresses Plus Size vercome a child’s tendency to get bored is by changing the topic frequently. Nothing combines just the righ
Have you ever best cheap shapewear dated a wo cheap plus size bodycon dresses man and you noticed that she deliberately did something to make you jealous or insecure Women love to play men. Especially t Cheap Bodycon Dress online he super attractive ones. They want to rap you around their little finger. Well sir, my good buddy, that is what I do with women THEY taught me!!! I pl
As the world has gotte best cheap shapewear n faster paced some parents have started buying for their kids,best cheap bandage dress cheap shapewear, electronic toys. This is because they think that these toys will help them in learning more as well as encouraging their imagination more. But cheap plus size shapewear actually, the toy that really teaches kids and dev
You will surely fal Hidden High Heel Shoes l in love with slim elephant bangles, if you are a diehard natural beauty fan. Hidden Wedge Loafers The tiny aspects of exquisite Boho jewelry will impress you. If you are looking for complex designs that are shared with vivacious colors Women hidden wedge shoes , then be positive to take a look at the mosaic bangles and the t
The gold farming industry is large and growing, he found its hidden heel flats genesis in about 2001. Due to this worldwide demand the farms have Hidden Wedge Heel Women Shoes grown exponentially. Because we are connected via the web, state boundaries are no longer an obstacle, it is this new paradigm that has fed the gold farming i hidden wedge sneakers ndustry. You m
Note: You may want to turn on the air conditioner before removing t Hidden High Heel Shoes he bag to allow the excess water on the rotor blade to be spinned off int shoes that make you taller o the bag,Hidden High Heel Shoes. Wipe dry and replace the filters and cover. Done,shoes that make you taller! There are 2 premium hours that are the best for Hidden Wedge Heel Women Shoes m