简体   繁体   English

如何编译Linux应用程序以在共享Web服务器上运行

[英]How to compile a linux app to run on a shared web server

I am trying to get a small C application to run on my web server. 我正在尝试使一个小型C应用程序在我的Web服务器上运行。 The web hosting company is HostGator and we have their least-expensive plan 'Hatchling' 网络托管公司是HostGator,我们有他们最便宜的计划'Hatchling'

Unfortunately this particular plan does not provide access to a compiler, which means I'll need to build it on a similar machine to that server and transfer the executable there. 不幸的是,这个特定的计划不提供对编译器的访问,这意味着我需要在与该服务器类似的机器上构建它,并在其中传输可执行文件。

My question is how 'close' do I have to get to the Linux distribution on that web server for this to work? 我的问题是,我必须多“接近”才能到达该Web服务器上的Linux发行版,才能正常工作? I currently have a recent Ubuntu in a VM and would like to use it for this process but maybe some complex differences in how Ubuntu compiler chain is built versus what can work on the web server are too great? 我目前在VM中拥有一个最新的Ubuntu,并且想在此过程中使用它,但是也许在构建Ubuntu编译器链与在Web服务器上可以运行什么方面有一些复杂的差异?

Would I need to install the CentOS release 6.5 they use and compile on that? 我需要安装他们使用的CentOS版本6.5并在该版本上编译吗?

What do you recommend I do to attack this problem? 您如何建议我解决这个问题?

John, 约翰,

PS Hostgator runs 'CentOS release 6.5 (Final)' and /proc/version returns "Linux version 3.2.52 (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) )" PS Hostgator运行“ CentOS 6.5版(最终版)”,/ proc / version返回“ Linux版本3.2.52(gcc版本4.4.7 20120313(Red Hat 4.4.7-3)(GCC))”

It is worth checking that the architecture is the same eg Intel - 32bit or 64bit. 值得检查架构是否相同,例如Intel-32bit或64bit。 In theory 32bit will work on a 64bit architecture as long as supporting libraries have been installed. 从理论上讲,只要安装了支持库,32位就可以在64位体系结构上工作。

Dependancies are the other challenge you will have. 依赖关系是您将面临的另一个挑战。

Versions of GCC and Kernel versions do not matter too much. GCC版本和内核版本无关紧要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 linux 服务器上使用 web 应用程序运行脚本 - Use web app on linux server to run script 在Linux中运行/编译Android应用 - Run/Compile Android app in Linux 如何在Linux Web服务器中制作一个Android应用程序 - how to make an android app in linux web server 共享linux Web服务器上的JavaVM(JustHost) - JavaVM on shared linux web server (JustHost) 操作系统如何在两个不同的链接中找到共享库路径?:运行时链接(加载)和编译时链接Linux中的共享库 - How the OS find shared library path in two different linking?:run-time linking (loading) and compile time linking shared library in linux .NET Web应用程序可以托管在具有静态IP的专用linux服务器上,并作为网站运行该Web应用程序吗? - Can a .NET web application be host on dedicated linux server with static IP and run this web app as a web site? 如何在我的 Linux Web 服务器上运行 .dll 文件 - How to run a .dll file on my linux web server 可以在没有网络访问和通过隧道访问的情况下在 linux 服务器上运行 Flask web 应用程序吗? - Possible to run flask web app on linux server without web access and access through tunnel? 如何在 ZEDC9F0A5A5D57797BF68E373674 服务器中部署 ASP.NET Web 应用程序到 Docker - How to Deploy ASP.NET Web App To Docker In Linux Server 如何在共享Linux内核上运行Docker deamon? - How to run Docker deamon on shared Linux kernel?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM