怎么将proftpd加入守护进程?

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
rhinolt
帖子: 83
注册时间: 2017-01-03 19:08
系统: RHEL7

怎么将proftpd加入守护进程?

#1

帖子 rhinolt » 2018-01-23 10:17

其实本来想启动时加载就够了
还是请朋友们多教一点:怎么加入守护进程并开机启动?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 怎么将proftpd加入守护进程?

#2

帖子 poloshiao » 2018-01-23 12:27

https://www.eranecesario.com/install-an ... tu-debian/
Install and configure a FTP Server using proftp in Ubuntu and Debian
rhinolt
帖子: 83
注册时间: 2017-01-03 19:08
系统: RHEL7

Re: 怎么将proftpd加入守护进程?

#3

帖子 rhinolt » 2018-01-23 23:18

我是编译安装的,这篇文章好像也没提到启动时自动加载?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 怎么将proftpd加入守护进程?

#4

帖子 poloshiao » 2018-01-24 15:25

启动时自动加载?
需要知道你的系統使用何種開機初始化 才能給你合適的建議
upstart
systemd
其它

如果不確定
請提供作業系統及版本
rhinolt
帖子: 83
注册时间: 2017-01-03 19:08
系统: RHEL7

Re: 怎么将proftpd加入守护进程?

#5

帖子 rhinolt » 2018-01-24 17:08

Ubuntu 16.04.3 LTS

应该是systemd?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 怎么将proftpd加入守护进程?

#6

帖子 poloshiao » 2018-01-24 18:44

Ubuntu 16.04.3 LTS
应该是systemd?
1. 對
我是编译安装的
2. 如果你基於某些理由 想要自己编译安装
2-1. 安裝 proftpd-doc 會包含下述檔案
/usr/share/doc/proftpd-doc/howto/index.html
2-2. 在 firefox 網址欄 輸入下述網址
file:///usr/share/doc/proftpd-doc/howto/Compiling.html
Compiling ProFTPD
指令
/usr/local/sbin/proftpd
2-3. 在 firefox 網址欄 輸入下述網址
file:///usr/share/doc/proftpd-doc/howto/Stopping.html
使用 start 搜尋
2-3-1. 或 在 firefox 網址欄 輸入下述網址
file:///usr/share/doc/proftpd-doc/howto/Stopping.html
可以找到
Stopping and Starting ProFTPD
網頁

3. 補充
3-1. 你也可以從 Ubuntu 官方套件庫 安裝 proftpd 有關的套件 就幫你搞定了
https://packages.ubuntu.com/search?suit ... ds=proftpd
3-1-1. 如果你是從 Ubuntu 套件庫 安裝
https://packages.ubuntu.com/xenial/amd6 ... c/filelist
/etc/init.d/proftpd
指令 預設是
/etc/init.d/proftpd
3-2. 如果你是自己编译安装
file:///usr/share/doc/proftpd-doc/howto/Compiling.html
Compiling ProFTPD
/usr/local/sbin/proftpd
指令 預設是
/usr/local/sbin/proftpd
rhinolt
帖子: 83
注册时间: 2017-01-03 19:08
系统: RHEL7

Re: 怎么将proftpd加入守护进程?

#7

帖子 rhinolt » 2018-01-24 22:37

似乎被搞砸了
过程:
1.apt install proftpd,安装过程似乎一切正常,包括

代码: 全选

https://www.eranecesario.com/install-and-configure-ftp-server-proftpd-ubuntu-debian/
中出现的安装界面

发现端口与原先编译安装的proftpd冲突了,service起不来
2.apt autoremove proftpd
进度条猛跳,出现一大堆安装包的卸载过程,慌了,ctrl+z中断……按提示修复dkpg进程……
3.想想还是手动吧,find / -name proftpd,逐一删除……包括/etc/init.d/proftpd……
4.继续apt autoremove proftpd
提示apt autoremove proftpd-basic,照做
5.重新apt install proftpd-basic,好,没有出现刚开始

代码: 全选

https://www.eranecesario.com/install-and-configure-ftp-server-proftpd-ubuntu-debian/
中出现的安装界面
然后就发现

代码: 全选

service proftpd status
● proftpd.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
/etc/init.d/proftpd也没有了


:Aadterboom :Aadterboom :Aadterboom :Hehe :Hehe :Hehe :Cry :Cry :Cry

我知道我很菜……可是肿么办……
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 怎么将proftpd加入守护进程?

#8

帖子 poloshiao » 2018-01-24 23:28

重新 apt install proftpd-basic
你是使用 root 登入 ?
rhinolt
帖子: 83
注册时间: 2017-01-03 19:08
系统: RHEL7

Re: 怎么将proftpd加入守护进程?

#9

帖子 rhinolt » 2018-01-25 10:40

poloshiao 写了:
重新 apt install proftpd-basic
你是使用 root 登入 ?
是的
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 怎么将proftpd加入守护进程?

#10

帖子 poloshiao » 2018-01-25 11:47

一般使用者 常常認為 使用 root 登入 一定權力最大 無所不能
在 Ubuntu 其實這個想法 需要修正
root 登入 常常發生錯誤 而很難找出原因 或者說 常常碰壁

參見
http://forum.ubuntu.com.cn/viewtopic.ph ... 2#p3201062
4. 猜測
你的系統 混淆了 使用者權限
rhinolt
帖子: 83
注册时间: 2017-01-03 19:08
系统: RHEL7

Re: 怎么将proftpd加入守护进程?

#11

帖子 rhinolt » 2018-01-25 18:01

那现在要怎么把程序加入init.d?
好像是比较麻烦的吧
有没有教程?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 怎么将proftpd加入守护进程?

#12

帖子 poloshiao » 2018-01-25 19:48

那现在要怎么把程序加入init.d?
1. 使用 非 root 登入
sudo apt install proftpd-basic
就會包含
/etc/init.d/proftpd
1-1. 參見
https://packages.ubuntu.com/xenial/amd6 ... c/filelist
在 xenial 發行版中 amd64 硬體架構下的 proftpd-basic 套件文件清單
/etc/init.d/proftpd
apt install proftpd-basic
2. 如果沒有
/etc/init.d/proftpd
表示你的安裝可能沒有順利完成

3. 如果你是 自行編譯 proftpd
sudo cp -a /usr/local/sbin/proftpd /etc/init.d
3-1. 也許 還需要微調其它設定檔

4. 新手 建議 直接從 Ubuntu 套件庫 使用 apt install 安裝
rhinolt
帖子: 83
注册时间: 2017-01-03 19:08
系统: RHEL7

Re: 怎么将proftpd加入守护进程?

#13

帖子 rhinolt » 2018-01-26 21:40

poloshiao 写了:
那现在要怎么把程序加入init.d?
1. 使用 非 root 登入
sudo apt install proftpd-basic
就會包含
/etc/init.d/proftpd
1-1. 參見
https://packages.ubuntu.com/xenial/amd6 ... c/filelist
在 xenial 發行版中 amd64 硬體架構下的 proftpd-basic 套件文件清單
/etc/init.d/proftpd
apt install proftpd-basic

代码: 全选

xxxx@PC-xxxx:/home$ sudo apt install proftpd-basic
[sudo] password for xxxx: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  openbsd-inetd | inet-superserver proftpd-doc proftpd-mod-ldap proftpd-mod-mysql proftpd-mod-odbc proftpd-mod-pgsql proftpd-mod-sqlite proftpd-mod-geoip
The following NEW packages will be installed:
  proftpd-basic
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/1,989 kB of archives.
After this operation, 4,476 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package proftpd-basic.
(Reading database ... 127027 files and directories currently installed.)
Preparing to unpack .../proftpd-basic_1.3.5a-1build1_amd64.deb ...
Unpacking proftpd-basic (1.3.5a-1build1) ...
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up proftpd-basic (1.3.5a-1build1) ...
usermod: no changes
xxxx@PC-xxxx:/home$ exit
failed....no proftpd in /etc/init.d
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 怎么将proftpd加入守护进程?

#14

帖子 poloshiao » 2018-01-27 11:25

failed....no proftpd in /etc/init.d
1. 找找看
sudo dpkg -L | grep proftpd
我是编译安装的
1.apt install proftpd,安装过程似乎一切正常
2. 如果以前曾經安裝過 相同的套件名稱
試試
2-1. 使用 --reinstall 參數
sudo apt-get install --reinstall proftpd-basic
2-2. 或者
先徹底移除以前安裝的
重新開機
sudo apt-get update
sudo apt-get upgrade
再安裝新的
sudo apt-get install proftpd-basic
2-3. 新手 比較推薦 2-2 的方法
rhinolt
帖子: 83
注册时间: 2017-01-03 19:08
系统: RHEL7

Re: 怎么将proftpd加入守护进程?

#15

帖子 rhinolt » 2018-01-27 23:51

poloshiao 写了:
failed....no proftpd in /etc/init.d
1. 找找看
sudo dpkg -L | grep proftpd

代码: 全选

XXXX@PC-XXXX:/home$ dpkg -L | grep proftp  
dpkg-query: error: --listfiles needs at least one package name argument

Use --help for help about querying packages.
似乎不对?
我试了试这个

代码: 全选

XXXX@PC-XXXX:/home$ dpkg -l | grep proftp
rc  proftpd-basic                        1.3.5a-1build1                             amd64        Versatile, virtual-hosting FTP daemon - binaries
没清理干净?我已经apt autoremove proftpd-basic了,怎么办?
回复