AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

全部问题(server)

Martin Hope
Mikhail Morfikov
Asked: 2014-06-19 09:27:53 +0800 CST

vm.overcommit_memory 是如何工作的?

  • 71

当我使用默认设置时:

vm.overcommit_memory = 0
vm.overcommit_ratio = 50

/proc/meminfo我可以从文件中读取这些值:

CommitLimit:     2609604 kB
Committed_AS:    1579976 kB

但是当我从 更改vm.overcommit_memory为0时2,我无法启动在更改之前可以启动的同一组应用程序,尤其是 amarok。我不得不更改vm.overcommit_ratio为300,因此可以增加限制。现在,当我启动 amarok 时,/proc/meminfo显示以下内容:

CommitLimit:     5171884 kB
Committed_AS:    3929668 kB

这台机器只有 1GiB 的 RAM,但是当vm.overcommit_memory设置为 0 时 amarok 可以正常工作。但是在设置为 的情况下2,amarok 需要分配超过 2GiB 的内存。这是正常行为吗?如果是这样,谁能解释为什么,例如,firefox(它比 amarok 消耗 4-6 倍的内存)在更改前后以相同的方式工作?

memory
  • 2 个回答
  • 131413 Views
Martin Hope
Jason Sturges
Asked: 2014-03-31 16:36:51 +0800 CST

设置gitlab外部web端口号

  • 71

如何将gitlab的默认端口80更改为自定义端口号?

我尝试过两种方法:

在 /etc/gitlab/gitlab.rb 中设置端口

external_port "8888"

然后运行重新配置:

gitlab-ctl reconfigure

在 /var/opt/gitlab/gitlab-rails/etc/gitlab.yml 中设置端口

production: &base
  #
  # 1. GitLab app settings
  # ==========================

  ## GitLab settings
  gitlab:
    ## Web server settings (note: host is the FQDN, do not include http://)
    host: gitlab.blitting.com
    port: 8888
    https: false

然后重启gitlab

gitlab-ctl stop
gitlab-ctl start

有了这两个,gitlab 继续在默认的 80 端口号上运行。

gitlab
  • 8 个回答
  • 161404 Views
Martin Hope
MacGyver
Asked: 2013-08-20 10:42:43 +0800 CST

获取用户所属的 AD 组列表

  • 71

假设我有 Active Directory 中用户的用户 ID。我想获取该用户当前所属的所有 AD 组的列表。如何从 Windows 命令行执行此操作?

我尝试了以下方法:

dsget user "DC=jxd123" -memberof

错误:

dsquery failed:'-memberof' is an unknown parameter.
type dsquery /? for help.
windows
  • 15 个回答
  • 601608 Views
Martin Hope
Jim Rubenstein
Asked: 2013-07-31 12:21:30 +0800 CST

`mysql_upgrade` 在没有给出真正原因的情况下失败

  • 71

我正在从 MySQL 5.1 升级到 5.5,运行mysql_upgrade并获得以下输出:

# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed

关于在哪里寻找正在发生的事情(或者,没有发生?)的任何想法,以便我可以修复任何错误并实际运行mysql_upgrade?

谢谢!

更多输出:

# mysql_upgrade --verbose
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed

# mysql_upgrade --debug-check --debug-info
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed

# mysql_upgrade --debug-info
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed

User time 0.00, System time 0.00
Maximum resident set size 1260, Integral resident set size 0
Non-physical pagefaults 447, Physical pagefaults 0, Swaps 0
Blocks in 0 out 16, Messages in 0 out 0, Signals 0
Voluntary context switches 9, Involuntary context switches 5

# mysql_upgrade --debug-check
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed

关闭mysqld --skip-grant-tablesviamysqladmin shutdown并重新启动 mysql viaservice mysql start后,错误日志会一遍又一遍地循环这组错误:

130730 21:03:27 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
130730 21:03:27 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
130730 21:03:27 InnoDB: The InnoDB memory heap is disabled
130730 21:03:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130730 21:03:27 InnoDB: Compressed tables use zlib 1.2.3.4
130730 21:03:27 InnoDB: Initializing buffer pool, size = 20.0G
130730 21:03:29 InnoDB: Completed initialization of buffer pool
130730 21:03:30 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 588190222435
130730 21:03:30  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 588192055067
130730 21:03:30  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
InnoDB: Last MySQL binlog file position 0 81298895, file name /var/log/mysql/mysql-bin.006008
130730 21:03:33  InnoDB: Waiting for the background threads to start
130730 21:03:34 InnoDB: 5.5.32 started; log sequence number 588192055067
130730 21:03:34 [Note] Recovering after a crash using /var/log/mysql/mysql-bin
130730 21:03:34 [Note] Starting crash recovery...
130730 21:03:34 [Note] Crash recovery finished.
130730 21:03:34 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130730 21:03:34 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
130730 21:03:34 [Note] Server socket created on IP: '0.0.0.0'.
130730 21:03:34 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

启动期间的 MySQL 日志通过mysqld_safe --skip-grant-tables

130730 21:19:36 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130730 21:19:36 [Note] Plugin 'FEDERATED' is disabled.
130730 21:19:36 InnoDB: The InnoDB memory heap is disabled
130730 21:19:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130730 21:19:36 InnoDB: Compressed tables use zlib 1.2.3.4
130730 21:19:37 InnoDB: Initializing buffer pool, size = 20.0G
130730 21:19:39 InnoDB: Completed initialization of buffer pool
130730 21:19:39 InnoDB: highest supported file format is Barracuda.
130730 21:19:42  InnoDB: Warning: allocated tablespace 566, old maximum was 0
130730 21:19:42  InnoDB: Waiting for the background threads to start
130730 21:19:43 InnoDB: 5.5.32 started; log sequence number 588192055067
130730 21:19:43 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130730 21:19:43 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
130730 21:19:43 [Note] Server socket created on IP: '0.0.0.0'.
130730 21:19:43 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
130730 21:19:43 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
130730 21:19:43 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
130730 21:19:43 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
130730 21:19:43 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.32-0ubuntu0.12.04.1-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)

据我了解,所有表结构/存在问题(与 mysql 系统表有关)都应通过运行来纠正mysql_upgrade:

mysql
  • 18 个回答
  • 128278 Views
Martin Hope
Luke404
Asked: 2012-08-07 08:42:34 +0800 CST

傀儡不应该管理什么?

  • 71

我正在通过一般的配置管理学习我的方式,并特别使用puppet来实现它,我想知道系统的哪些方面(如果有的话)不应该用 puppet 管理?

例如,我们通常认为主机名在将系统借给 puppet 管理之前就已经设置好了。基本 IP 连接,至少在用于连接 puppetmaster 的网络上,必须正常工作。使用 puppet 自动创建 dns 区域文件很诱人,但 DNS 反向指针应该在启动之前就已经到位,否则证书会很有趣。

那么我应该从 puppet 中省略 IP 配置吗?或者我应该在第一次启动 puppet 之前设置它,但仍然使用 puppet 管理 ip 地址?具有多个 IP 的系统(例如 WAN、LAN 和 SAN)怎么样?

IPMI呢?您可以使用ipmitool配置大部分(如果不是全部) ,从而避免获得控制台访问(物理、串行局域网、远程 KVM 等),因此可以使用 puppet 实现自动化。但是在每次 Puppet 代理运行时重新检查它的状态对我来说听起来并不酷,而且我希望在执行任何其他操作之前能够基本关闭对系统的访问权限。

另一个完整的故事是关于安装更新。我不打算讨论这个具体点,已经有很多关于 SF 的问题以及不同系统管理员之间的许多不同哲学。我自己,我决定不让 puppet 更新东西(例如,仅ensure => installed),而是像我们已经习惯的那样手动更新,将此任务的自动化留到以后我们对 puppet 更有信心时(例如,通过将MCollective添加到混合)。

这些只是我现在想到的几个例子。系统中是否有任何方面是 Puppet 无法触及的?或者,换句话说,应该在供应时设置什么和在系统中“静态”配置什么与通过集中配置管理处理什么之间的界线在哪里?

linux
  • 6 个回答
  • 11104 Views
Martin Hope
patrick
Asked: 2012-07-28 12:56:16 +0800 CST

如何避免 lftp 证书验证错误?

  • 71

我正在尝试让我的Pelican 博客正常运行。它使用 lftp 将实际博客传输到一个服务器,但我总是得到一个错误:

mirror: Fatal error: Certificate verification: subjectAltName does not match ‘blogname.com’

我认为 lftp 正在检查 SSL,而 Pelican 的快速设置只是忘了包括我的 FTP 上没有 SSL。


这是 Pelican 的 Makefile 中的代码:

ftp_upload: $(OUTPUTDIR)/index.html
lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit"

在终端中呈现为:

    lftp ftp://[email protected] -e "mirror -R /Volumes/HD/Users/me/Test/output /myblog_directory ; quit"

到目前为止我所管理的是,通过将 Makefile 更改为以下内容来拒绝 SSL 检查:

lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "set ftp:ssl-allow no" "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit"

由于我的不正确实施,我正确登录 ( lftp [email protected]:~>) 但单行功能不再起作用,我必须手动输入镜像命令:

mirror -R /Volumes/HD/Users/me/Test/output/ /myblog_directory

这工作没有错误和超时。问题是如何用一个班轮做到这一点。


另外我试过:

  • set ssl:verify-certificate/ftp.myblog.com no
  • 在 lftp 中禁用证书验证的技巧:

    $ cat ~/.lftp/rc set ssl:verify-certificate no

但是,我的 lftp 目录中似乎没有“rc”文件夹 - 因此此提示没有机会起作用。

ssl-certificate
  • 10 个回答
  • 172057 Views
Martin Hope
John Mee
Asked: 2012-05-18 15:49:56 +0800 CST

Ubuntu 在登录时显示“有 1 个僵尸进程”

  • 71

当我登录到我的机器时出现此消息:

There is 1 zombie process.
  • 它在告诉我什么?
  • 这是我应该担心的事吗?
  • 如果是,那么我应该做什么,如何做?
ubuntu zombie
  • 3 个回答
  • 74855 Views
Martin Hope
user38535
Asked: 2010-03-24 05:32:45 +0800 CST

DNS 记录传播需要多长时间?

  • 72
想要改进这篇文章?提供这个问题的详细答案,包括引文和解释为什么你的答案是正确的。没有足够细节的答案可能会被编辑或删除。

这是关于 DNS 传播的规范问题

传播各种类型的记录需要多长时间?
有些人的传播速度比其他人快吗?
为什么 DNS 记录传播需要时间,它是如何工作的?

domain-name-system
  • 1 个回答
  • 68418 Views
Martin Hope
Clutch
Asked: 2010-02-24 11:56:54 +0800 CST

如何更改已创建的 MySQL 用户的权限?

  • 72

我了解如何创建具有权限的新用户,但是为已创建的用户更改权限的正确方法是什么?

我们正在运行数据库审核,并且一些用户拥有更多的访问权限,这是需要的。另外,我不知道大多数 MySQL 用户的密码,所以我不想删除它们并创建新的。

mysql
  • 2 个回答
  • 187493 Views
Martin Hope
Bob
Asked: 2009-05-29 06:49:25 +0800 CST

方向会影响硬盘寿命吗?

  • 72
锁定。这个问题及其答案被锁定,因为这个问题离题但具有历史意义。它目前不接受新的答案或交互。

是否有任何研究或证据表明水平安装硬盘驱动器优于垂直安装设备的使用寿命?或颠倒,或任何方向。

hardware hard-drive
  • 17 个回答
  • 20077 Views
上一页
下一页

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve