delphi 开发者 linux 实务(转)

简介: Linux Essentials for Delphi Developers   There is currently no way using Delphi to target Linux. Long ago there was a thing called Kylix that worked...

Linux Essentials for Delphi Developers

 

There is currently no way using Delphi to target Linux. Long ago there was a thing called Kylix that worked on one version of RedHat Linux, barely, back in the 1990s. But in the Community road-map, targeting a fall release, there might be a way to target Linux Servers.  Here's hoping.  If that happens, or even if that's delayed a bit, now is a fantastic time to hone your Linux skills.    I'm not going to tutor you.  You can google probably almost as well as I can.  But I am going to outline a plan of attack for a competent Windows developer to learn the essentials of Unix systems, with a focus on Linux.  I recommend this plan be carried out on a virtual machine inside your main windows PC. You can NOT learn everything there is to know about Linux just by using the Windows Subsystem for Linux.  There's no linux kernel, no linux networking stack, no desktop environment in the WSL.  Learn on an Ubuntu VM.

 



My belief is that Linux matters on the Server because:

  • It is currently the right way to deploy for the web in 2016. 
  • It is the right technology for cluster scale technologies.
  • It is currently the right way to build systems that are easily administered remotely, whether in the cloud, or at remote sites, or in large numbers.
  • It is a lighter weight technology and currently has mature support for containers, big data technologies, and about 1000 other things in that vein.
  • It has a better way of upgrading, without requiring as many reboots.
  • It has a mature set of binary dependency management (package installer tools), container and orchestration tools.
 
There are several aspects to learning to be a competent Linux server developer
 
  • You can install, upgrade, troubleshoot and maintain both client and server Linux systems.  You know the 50 most common command line tools and their everyday uses. You can log in, change your password, obtain root access, check what groups a userid belongs to, install and remove, and upgrade packages.
  • You have installed and learned several different distributions.  The entire concept of distributions deserves some study by a person who wants to know what Linux is. You know not only how to use apt-get (on debian and ubuntu) but several alternatives such as those on RedHat/Centos and others.  You know roughly what changes from one major family of related distributions to another.  I recommend Ubuntu to every beginner, and Debian to every intermediate and advanced user.  In some corporate environments, you may find that RedHat Enterprise Linux (RHEL) or its open-source variants CentOS and or Fedora are preferred.   I recommend you learn Ubuntu first, and learn a RedHat variant later.
  • You know how the Linux boot process works, from BIOS or EFI to the boot loader, to the kernel startup, to the init sequence, and service startups, and you know what runlevels are, and what systemd is, and what /etc/init.d.  You appreciate that unlike Windows, when a system refuses to boot, it's not that hard to repair it.
  • You are comfortable in the Unix style shells, such as bash, csh, and tcsh. You can write shell scripts and read and repair shell scripts.
  • You are familiar with the basics of C development in Linux, including the use of GCC and CLANG, build tools, and associated parts. You  can download something.tar.gz and unpack it, read the instructions and build it from source.  When it breaks you can read the output and figure out what's wrong, and if googling the error doesn't help, you can dig in and fix it yourself.    You know what static and shared libraries are, and you can find and install dependencies (libraries, tools) that some package needs to build.
  • You are comfortable with rebuilding the Linux kernel from source code, you know what kernel modules are and what lsmod and modprobe do, and you know how to reconfigure a kernel, turning options on and off.  You know how to upgrade or add an additional kernel to your system's boot loader.  This is actually really fun.  You may find that having a system you can completely and utterly modify to suit your own needs and requirements becomes a bit of a giddy experience.  I know that I feel like I'm actually in control of my computer when I run on Linux.  On Windows 10, I feel like my machine belongs to Microsoft, and they just let me use it sometimes, when it's not busy doing something for the boys in Redmond.  That being said, I really like Windows 10, and I still primarily enjoy developing for Windows systems.  But knowing both Linux and Windows is a very useful thing to me.
  • You have a decent understanding of system administration core concepts, including the wide set of tools that will be on almost every unix system you use. You can find files using several techniques. You can list processes. You can monitor systems. You know how to troubleshoot networking issues from the command line.
  • You will know you've gotten in deep, when you have taken a side on the vi versus emacs debate, and become extremely proficient in the use of one or the other. (Hint: The correct choice here is vi. Die emacs heretics, die die die.)
The above should give you enough to chew on for a year or two.  What should your first steps be if you know nothing?
 
 

 

  • You will need at least 20 gigs of free space.
  • Download the latest Ubuntu 15.xx as an .ISO file.
  • Install Ubuntu into a virtual machine.  I recommend Client Hyper-V on Windows 10 which is included in Windows 10, or if you're still using that ancient Windows 7 thingy, then download VirtualBox, which is free.  If your Linux install worked perfectly, the client integration piece that makes working with a mouse within a virtual operating system will work perfectly. If the client integration piece didn't work, make sure to learn how to manually "free" your mouse pointer from the VM if it becomes locked inside it and you can't figure out how to release it.
  • Play with virtual consoles (Ctrl+Alt+F1 through F8). Learn what they are.  Watch some tutorials on basic Linux stuff like logging in.  Learn a bit about bash shell.  Learn about the structure of unix filesystems, learn the basics of unix file permissions and ownership.
  • Learn about commands like ls, find, locate, grep, ps, pswd, more, less, wget, ssh, ping. chmod, chown, and others.  Use the man command to learn about them (man grep).
  • Learn to install and start up Apache web server.  Learn a bit about configuring it.   Examine the configuration files in the /etc/apache2 folder
  • Browse from your host (Windows) PC web browser to the IP address of your Virtual Machine.  Use /sbin/ifconfig eth0 command to display your current IP address from a terminal prompt.
  • Learn to start and stop the X Server. When the X server is stopped, you have a text mode only operating system, which is ideal for server deployment. When it's running you have an opportunity to try some of the available IDEs that run on Linux.
  • Optional: Learn some Python and learn to write simple web server applications with Python.  (I do not recommend bothering to learn PHP, if you don't like Python then look into Ruby and Go as server side languages.)
  • Optional: Learn the fundamentals of compiling some small applications from source. Write some small command line applications in C, since that's going to give you a bit of a flavor for the classic Unix environment.  C programming on Unix is easily the single most important skill I have on Linux.  If you can get over your preference for begin/end and learn to work on Unix in C when it's useful to do so, you become a much more well rounded developer.
  • Optional: Install some open source Pascal compiler.   Don't expect things to be exactly like Delphi, because they aren't but you might enjoy messing around with FreePascal (compiler), or Lazarus (IDE).

Come to the dark side. We have fortune cookies...




目录
相关文章
|
8月前
|
Linux 网络虚拟化 虚拟化
Linux虚拟网络设备深度解析:使用场景、分类与开发者指南
Linux虚拟网络设备支撑着各种复杂的网络需求和配置,从基础的网络桥接到高级的网络隔离和加密🔐。以下是对主要Linux虚拟网络设备的介绍、它们的作用以及适用场景的概览,同时提出了一种合理的分类,并指出应用开发人员应该着重掌握的设备。
Linux虚拟网络设备深度解析:使用场景、分类与开发者指南
|
8月前
|
监控 中间件 Linux
深入Linux设备模型:开发者指南
Linux的设备模型是操作系统管理硬件设备的一种高级抽象,它不仅涉及到设备驱动程序的加载和卸载,还包括设备之间的关系、设备的状态管理以及与用户空间通信的机制。理解Linux的设备模型对于应用开发人员来说至关重要,它有助于开发出更加稳定、高效的应用程序。🌟
深入Linux设备模型:开发者指南
|
弹性计算 监控 关系型数据库
利器解读!Linux 内核调测中最最让开发者头疼的 bug 有解了|龙蜥技术
通过在Anolis 5.10 内核中增强 kfence 的功能,实现了一个线上的、精准的、可定制的内存调试解决方案。
利器解读!Linux 内核调测中最最让开发者头疼的 bug 有解了|龙蜥技术
|
Web App开发 监控 安全
开发者曝 Android 13 “彩蛋”功能!虚拟化支持运行 Windows 11 和桌面版 Linux
开发者曝 Android 13 “彩蛋”功能!虚拟化支持运行 Windows 11 和桌面版 Linux
583 0
开发者曝 Android 13 “彩蛋”功能!虚拟化支持运行 Windows 11 和桌面版 Linux
|
Web App开发 Kubernetes 安全
Linux 开发者“赢了”!研究称 Linux 的漏洞修复速度比苹果、微软和谷歌都快
Linux 开发者“赢了”!研究称 Linux 的漏洞修复速度比苹果、微软和谷歌都快
145 0
Linux 开发者“赢了”!研究称 Linux 的漏洞修复速度比苹果、微软和谷歌都快
|
运维 安全 Linux
龙蜥开发者说:学无止境的 Linux ,以及我的第一个定制版本发布之路 | 第4期
经过数月研发,21年7月移动云首个基于龙蜥社区的商用版服务器操作系统正式发布,借此机会向龙蜥社区各位小伙伴表示感谢。
龙蜥开发者说:学无止境的 Linux ,以及我的第一个定制版本发布之路 | 第4期
|
Ubuntu Unix Linux
Windows 10变身开发者利器:内置Linux内核,轻松查看Linux子系统文件
未来我们可以在Windows里访问Linux文件了。微软此前曾透露计划在Windows 10中发布完整的Linux内核,现在该公司计划将Linux文件访问完全集成到内置的文件资源管理器中。在文件资源管理器的左侧导航窗格中将提供一个新的Linux图标,可为Windows 10中安装的所有发行版提供对根文件系统的访问。
411 0
Windows 10变身开发者利器:内置Linux内核,轻松查看Linux子系统文件
|
开发框架 Ubuntu NoSQL
开发者可以在 Windows 10 上运行 Bash Shell 和用户模式 Ubuntu Linux Binaries 啦!
开发者可以在 Windows 10 上运行 Bash Shell 和用户模式 Ubuntu Linux Binaries 啦!
252 0
开发者可以在 Windows 10 上运行 Bash Shell 和用户模式 Ubuntu Linux Binaries 啦!
|
弹性计算 人工智能 Cloud Native
【开发者学堂】2021 Alibaba Cloud Linux 技术图谱发布
#  阿里云开发者学堂是开发者学习成长的一站式学习平台。为开发者构建完善的学习成长体系、技术赋能。目前,阿里云开发者学堂已上线10大技术图谱,覆盖弹性计算、数据库、大数据、云原生、AI、IoT等各大热门领域,为不同能力、不同学习需求和就业需求的开发者,提供专属学习路线实现职场进阶。2021 Alibaba Cloud Linux 技术图谱由开发者学堂首发,首发当周,已超过3万人订阅,图谱结合今年6
504 0
【开发者学堂】2021 Alibaba Cloud Linux 技术图谱发布
|
弹性计算 运维 前端开发
开放下载!《ECS运维指南 之 Linux系统诊断》 | 开发者必读(173期)
经过深入思考、用心、用技术写作,快速提高Linux运维工程师的工作效率,是云运维工程师不可错过的匠心之作。
1099 0