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 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...



时间: 2024-11-09 17:15:07

delphi 开发者 linux 实务(转)的相关文章

在RedHat 和 Ubuntu 中配置 Delphi 的Linux开发环境(转)

原文地址:http://chapmanworld.com/2016/12/29/configure-delphi-and-redhat-or-ubuntu-for-linux-development/   方便大家使用,直接转过来.     Image courtesy of Jim McKeeth. One of the more exciting features of the pending 10.2 release of Delphi and RAD Studio, is support

使用delphi 10.2 开发linux 上的Daemon

   delphi 10.2 支持linux, 而且官方只是支持命令行编程,目地就是做linux 服务器端的开发. 既然是做linux服务器端的开发,那么普通的命令行运行程序,然后等待开一个黑窗口的方式就 太low了(目前就有个别语言大咖,经常在Windows 上开个黑窗口,看起来非常恶心),那么如果 避免这个尴尬的问题?     其实Linux 下也有类似windows 服务的功能,Linux Daemon 就是其中的一种方式,命令行运行后 直接返回,同时在后台建立一个同样的进程.接受客户端的

全面剖析Delphi 2006新增特性

一直以来,Borland公司与其它软件供应商之间明显区别的地方在于其注重实用的方式-为今天的开发人员提供最恰当的极具竞争性的开发工具,而同时引导他们了解未来即将使用的新技术,并使其坚信自己的开发投资会保证会在未来的相关性,可适应性和可扩展性方面立于不败之地. 本文从一个Delphi开发者角度,对这个最新发行的产品作全面的入门性介绍.其中涉及到横跨Delphi,C++和C#等语言的一些特性,但只专注于介绍Delphi的开发能力. Delphi 2006是Delphi的第十个版本,是Borland的

Delphi历史版本介绍(一)从Delphi1到Delphi7

Delphi历史版本介绍(一)从Delphi1到Delphi7        Pascal是一种计算机通用的高级程序设计语言.它由瑞士Niklaus Wirth教授于六十年代末设计并创立.        TurboPascal语言是编译型程序语言,它提供了一个集成环境的工作系统,集编辑.编译.运行.调试等多功能于一体.Pascal有5个主要的版本,分别是UnextendedPascal.Extended Pascal.Object-Oriented Extensions to Pascal.Bo

为什么创建VCL for .NET? -- Delphi编译器架构师撰文

摘要:为什么Borland创建VCL for .NET?什么时候你该使用VCL for .NET而不是.NET系统本身的的Windows Forms框架?Delphi 8 for .NET在Delphi社群中引起了极大的关注!人们在新闻组,聊天室,以及用户们的小型聚会中频繁地谈论.NET基础架构,谈论它与我们都熟悉的Win32平台的关系.其中一个热点话题是Delphi8的VCL for .NET.大部分争论似乎都集中在这个问题上:在这个宏大的规划中,VCL for .NET的目的是什么?它是一个

Ubuntu 中用 delphi 开发 apache

经过近15年的沉默.delphi 10.2 终于重新开始支持linux 开发了. 今天说一下在ubuntu中开发apache的方法. 首先安装ubuntu 的delphi 开发环境,请参考以前的文章 http://www.cnblogs.com/xalion/p/6368899.html   在delphi 10.2 中,只支持apache 2.4(既然有新的,不支持2.2也就无所谓了). 首先我们需要安装apache 在ubuntu里面安装apache 很简单. 我们进入命令行 输入"root

2016年 Delphi Roadmap

2016年delphi Roadmap 发布,这也是新公司的第一次发布路线图. 虽然稍微晚点( 原来说是1月份发布路线图),至少比过去积极点.喧嚣多年的靴子终于落地. Linux 的支持终于正式公布. http://community.embarcadero.com/article/news/16211-embarcadero-rad-studio-2016-product-approach-and-roadmap-2 整体来说,意料之中. The changes in ownership in

你还没成为Delphi QC的成员吗?(转红鱼儿)

Delphi很早就建立了quality.embarcadero.com,简称为QC,质量控制中心,用来接收用户反馈的bug,新功能建议等,是开发者与delphi官方直接交流的平台.无论是否为正版用户,都可以注册账号并反馈bug. 不论你是delphi开发者还是喜欢者,粉细,如果还没有注册为QC的成员,真是件遗憾的事情,或者说,不是一名合格的Delphi fans. 我也是最近才喜欢这个QC的,这得感谢老猫,是他通过提交bug才引我去关注QC的,并且越用越喜欢.为什么呢? 第一,经常浏览QC,你会

Google公司都是些什么牛人?

1 Vinton Cerf :号称互联网之父,TCIP/IP协议和互联网架构的合作设计者.他05年10月3日开始正式为Google工作,职位为"首席互联网传布官". 2 Joshua Bloch :号称java教父,<Effective Java><JAVA PUZZLE>的作者,JSR175标准的leader,J2SE 1.5的主要开发人员之一. 3 Guido Van Rossum: Python之父.Google把Python用的炉火纯青,有了Python