linux下thttp移植(1)

1、开始为了了解thttp移植过程,就先尝试再ubuntu上安装使用thttp,因此也谈不上移植。

但是步骤都是类似,属于过度性的学习。

2、安装步骤

(1)源码包

解压thttpd-2.25b.tar.gz

http://www.acme.com/software/thttpd/thttpd-2.25b.tar.gz

#tar -zxvf thttpd-2.25b.tar.gz

cd thttpd-2.25b //进入文件夹

(2)配置和安装

CC=arm-linux-gcc ./configure --target=arm-linux --prefix=/ubuntu_thttpd

make

make install

错误a: 当中如果有错误提示:提示错误:chgrp: 无效的组名称‘‘www’’

那么可以采用下面的语句: addgroup www

错误b: cp: 无法创建一般文件“/usr/local/man/man1/makeweb.1”: 没有那个文件或目录
解决的办法是:在{$prefix}/usr/local/man/目录下手动创建man1目录

安装完成:

(3)建立服务器文件夹

cd /home

mkdir thttpd

cd thttpd

mkdir html run log 

html(然后在下面编写一个测试的网页程序index.html)

(4)启动thttpd服务器

thttpd.conff 这个是服务器配置文件,在启动属性是根据其来启动。

 4-1:复制thttpd.conf文件

root@lin-desktop:/home/soft/thttpd-2.25b# cp contrib/redhat-rpm/thttpd.conf /home/ubuntu_thttpd

4-2:修改内容

  1 # This section overrides defaults
  2 dir=/httpd/html
  3 chroot
  4 user=root# default = nobody
  5 logfile=/httpd/log/thttpd.log
  6 pidfile=/httpd/run/thttpd.pid
  7 # This section _documents_ defaults in effect
  8  port=80
  9 # nosymlink# default = !chroot
 10 # novhost
 11 # nocgipat
 12 # nothrottles
 13 # host=0.0.0.0
 14 # charset=iso-8859-1

************************************************************************************************************************

/home/ubuntu_thtttpd/sbin/thttpd -C /home/thttpd/thttpd.conf

5、测试程序

在浏览器上输入ubuntu系统的IP

http://10.3.77.192/index.html

5-1:此时会有告警

 

网上说这个是对于测试文件没有修改属性的原因

chmod 666 /home/ubuntu_thttpd/html/index.html

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
@Slf4j @SpringBootApplication @MapperScan({"org.jeecg.**.mapper", "com.sky.**.mapper"}) @EnableTransactionManagement() //@EnableFeignClients(basePackages = {"org.jeecg", "com.sky"}) @ComponentScan(basePackages = {"org.jeecg", "com.sky"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = {DynamicDataSourceConfig.class, DynamicTenantInterceptor.class})) public class SkyPlatformSystemApplication extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(SkyPlatformSystemApplication.class); } /** * 监听器:监听HTTP请求事件 * 解决RequestContextHolder.getRequestAttributes()空指针问题 * * @return */ @Bean public RequestContextListener requestContextListener() { return new RequestContextListener(); } public static void main(String[] args) throws UnknownHostException { // log.info("数据库密码:" + SecurityExtUtil.jiami("sky_mall")); ConfigurableApplicationContext application = SpringApplication.run(SkyPlatformSystemApplication.class, args); Environment env = application.getEnvironment(); String ip = InetAddress.getLocalHost().getHostAddress(); String port = env.getProperty("server.port"); String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path")); log.info("\n-----------------------------------------------------------\n\t" + "Application Sky-Platform-Boot is running! Access URLs:\n\t" + "Local: \t\t\thttp://localhost:" + port + path + "/\n\t" + "External: \t\thttp://" + ip + ":" + port + path + "/\n\t" + "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" + "-----------------------------------------------------------"); }这是什么意思
07-15

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值