Linux-Web服务搭建,源码包安装

分类

源码包:c语言,可以在不同版本Linux上安装,c语言环境

封装后的软件包:.rpm----redhat package manage

​ .deb—debain

image-20230803142647371 # 安装http

安装源码包应在软件解压文件

  • tar xf解压

image-20230803142833397

cat -n README | less

image-20230803194913397

cat -n  INSTALL| less

image-20230803195059520

image-20230803195214701

./configure //⽣成makefile⽂件,makefile⽂件决定编译的顺序
make//编译
make install//将编译好的程序复制粘贴到--prefix选项指定的⽬录⾥,默认是 /usr/local/apache2
PREFIX/bin/apachectl start
  • ⽣成makefile⽂件

image-20230803195653751

  • make

image-20230803200552077

  • make install

image-20230803200723084

  • /usr/local/apache2/bin/apachectl start

image-20230803201106190

image-20230803201703144

netstat -antpl

image-20230803201817513

  • url输入127.0.0.1,⽹站根⽬录,放在该⽬录下的⽂件,会被访问者看⻅

image-20230803202001941

image-20230803202046357

image-20230803202142697

  • 编译
vim 2303.c
#include <stdio.h>
int main(){
	printf("hello world!");
	return 0;
}
:wq
chmod +x 2303.c

gcc 2303.c		//编译
./a.out			//执行

image-20230803200145922

image-20230803200033710

image-20230803200401068

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

§666§

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值