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 / 问题

问题[slackware](server)

Martin Hope
Robbie Mckennie
Asked: 2013-05-07 23:24:39 +0800 CST

半桥中的路由器淹没 arp 缓存

  • 0

我已经设置了一个 Slackware (14.0) box 作为我的 adsl 连接的网关。我在 NIC 和电话线之间以半桥模式设置了一个调制解调器,该接口通过 DHCP 占用动态分配的公共 IP。我发现我需要连接的每个 ip 都有自己的 arp 缓存条目,因此在使用 bittorrenting 时缓存很容易收集超过 1000 个条目。以下是我的(截断的)路由表:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         121.99.51.213   0.0.0.0         UG    203    0        0 eth1
121.99.51.0     0.0.0.0         255.255.255.0   U     203    0        0 eth1

我的直觉告诉我,如果我删除第二个条目,它将停止发送垃圾邮件 arp 请求(但我当然可能完全错了)。我已经能够删除它,但似乎内核会根据接口的 ip 和网络掩码自动添加一条新路由。有没有办法永久删除路由?或者在那个接口上禁用 arp 缓存?

slackware
  • 1 个回答
  • 219 Views
Martin Hope
jasonspiro
Asked: 2012-07-06 12:24:59 +0800 CST

我停电了。现在 MySQL 的锁文件不会消失。你有什么建议?

  • 7

我为加拿大多伦多和世界各地的各种客户提供自由 IT 咨询服务。

一位客户最近遇到了电源故障。现在,他们在同时充当 DNS 服务器的 Slackware 12.0.0 机器上遇到了各种问题。

一个问题是他们无法登录到 phpMyAdmin。

我尝试停止并重新启动 MySQL。但即使 MySQL 停止,锁文件仍然存在。

jasonspiro@cybertron:~$ sudo /etc/init.d/mysql stop 
Shutting down MySQL. SUCCESS! 
jasonspiro@cybertron:~$ sudo /etc/init.d/mysql stop
 ERROR! MySQL manager or server PID file could not be found!
jasonspiro@cybertron:~$ sudo /etc/init.d/mysql status
 ERROR! MySQL is not running, but lock exists
jasonspiro@cybertron:~$ ls -l /var/lock/subsys/mysql 
-rw-r--r-- 1 root root 0 2012-07-05 16:18 /var/lock/subsys/mysql

尽管 MySQL 没有运行,为什么 MySQL 的锁文件仍然存在?

我可以简单地停止 MySQL,删除锁定文件,然后重新启动 MySQL 吗?

接下来我应该采取任何其他步骤,还是什么都不做?

编辑: 在我问了这个问题一段时间后,我注意到MySQL 在这台机器上的安装方式似乎很奇怪。另外,我发现/etc/init.d/mysql我在这台机器上找到的脚本在启动 MySQL 时总是创建一个锁定文件,并且在停止 MySQL 时从不删除该文件。所以这个问题原来与我无关。谢谢,但我不需要这个问题的更多答案。

linux mysql outage slackware
  • 1 个回答
  • 11515 Views
Martin Hope
Anonymous
Asked: 2010-03-27 07:33:07 +0800 CST

Linux udev 持久网络规则

  • 3

我有一个带有两个网络接口的 Linux 系统(Slackware Linux 13.0)。我们称它们为 NIC0 和 NIC1

我的目标是让 NIC0 在系统中显示为 eth0。

我知道这可以通过将网络别名映射到网络接口的 MAC 地址的 udev 规则来实现。在 Slackware Linux 中,文件/etc/udev/rules.d/70-persistent-net.rules包含此类规则。

我的问题中最棘手的部分是我需要伪造 NIC0 的 MAC 地址。我知道我可以使用以下命令动态更改网络接口的 MAC 地址:

ifconfig eth0 hw ether <new MAC address>

你看到问题了吗?这假设已经设置了网络接口。

所以我的问题是:如果我有一个用于 NIC1 的 udev 规则(将作为 eth1 使用其原始 MAC 地址的规则),系统将另一个网络接口(NIC0)作为 eth0 就足够了默认?这样我可以稍后在 udev 机器完成并启动网络别名后更改其 MAC 地址。

linux udev slackware
  • 1 个回答
  • 1658 Views
Martin Hope
user34039
Asked: 2010-02-23 06:33:12 +0800 CST

Slackware 12 上的 Samba 3.3 或更高版本 - 我该如何实现?

  • 2

我正在尝试升级 Slackware 12 机器上的 Samba 服务器以用作 Windows 7 32 位机器的 PDC(它现在有一个 3.0.3 并且可以为 Win XP 机器工作,但是 7 拒绝加入域 - 我'我在 Windows 注册表上尝试了几十次黑客攻击后发布了这个)。

我是 Slackware 的新手(我通常住在 Ubuntu 中),所以我可能会以错误的方式解决这个问题,但这是我迄今为止所做的:

Samba wiki 对注册表进行了一些修改,并且似乎还建议使用高于 3.3 的版本(虽然不是很多话)http://wiki.samba.org/index.php/Windows7

在网上搜索了 Slackware 12 的 Samba 二进制文件后,我一无所获,我决定也许我可以编译这个有福的东西。但我不断收到编译器错误。我正在使用这个 SlackBuild 脚本http://ftp.twaren.net/Linux/slackware/slackware-current/source/n/samba/samba.SlackBuild

有没有更好的方法来实现这一点?(不升级基本系统?它运行了很多微调的东西,我不想弄乱其余的设置)。

linux samba slackware
  • 1 个回答
  • 475 Views
Martin Hope
Artem
Asked: 2010-02-21 10:48:56 +0800 CST

失去与 MySQL 的连接

  • 0

我在 Slackware 下安装了 Apache、mysqld。阿帕奇工作。但是脚本:

$dblocation="127.0.0.1";
    $dbuser="root";
    $dbpasswd="unfriendly_possum";
    $dbcnx=mysql_connect($dblocation, $dbuser, $dbpasswd);
    if(!$dbcnx)
    {
        echo("Error");
        exit();
    }
    $dbq=mysql_query("select version();");
    echo(mysql_result($dbq,0));

返回错误

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /usr/local/httpd/htdocs/mysql.php on line 8
Error

救命(我哭了)

UPD 我已将 $dblocation="127.0.0.1" 更正为“localhost”,但发生了另一个错误:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) in /usr/local/httpd/htdocs/mysql.php on line 8
Error

php 配置片段

[SQL]
sql.safe_mode = Off

[ODBC]
;odbc.default_db    =  Not yet implemented
;odbc.default_user  =  Not yet implemented
;odbc.default_pw    =  Not yet implemented

; Allow or prevent persistent links.
odbc.allow_persistent = On

; Check that a connection is still valid before reuse.
odbc.check_persistent = On

; Maximum number of persistent links.  -1 means no limit.
odbc.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no limit.
odbc.max_links = -1

; Handling of LONG fields.  Returns number of bytes to variables.  0 means
; passthru.
odbc.defaultlrl = 4096

; Handling of binary data.  0 means passthru, 1 return as is, 2 convert to char.
; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
; of uodbc.defaultlrl and uodbc.defaultbinmode
odbc.defaultbinmode = 1

[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mysql.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no limit.
mysql.max_links = -1

; Default port number for mysql_connect().  If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
mysql.default_port =

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =

; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =

; Maximum time (in seconds) for connect timeout. -1 means no limit
mysql.connect_timeout = 60

; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Errors will be displayed.
mysql.trace_mode = Off

[MySQLi]

; Maximum number of links.  -1 means no limit.
mysqli.max_links = -1

; Default port number for mysqli_connect().  If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
mysqli.default_port = 3306

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysqli.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysqli.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
mysqli.default_user =

; Default password for mysqli_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
mysqli.default_pw =

; Allow or prevent reconnect
mysqli.reconnect = Off

[mSQL]
; Allow or prevent persistent links.
msql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
msql.max_persistent = -1

; Maximum number of links (persistent+non persistent).  -1 means no limit.
msql.max_links = -1

my.cnf 部分:

[mysqld]
log             =/var/log/mysqld/mysqld.log
port            = 3306
socket          = /tmp/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Disable Federated by default
skip-federated

# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id       = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir         = /tmp/
#log-update     = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/var/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql/var/
#innodb_log_arch_dir = /usr/local/mysql/var/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
mysql php slackware
  • 5 个回答
  • 5590 Views
Martin Hope
lxg
Asked: 2010-02-03 04:59:08 +0800 CST

sendmail:如何限制对只有有效证书的客户端的访问?

  • 0

我想拒绝所有不提供有效 SSL/TLS 证书的连接。首先,访问数据库文件是要更改的正确文件吗?

我已经尝试使用文档中给出的基本规则

CertIssuer:/C=US/ST=California/O=endmail.org/OU=private/CN= Darth+20Mail+20+28Cert+29/[email protected] RELAY

这显然需要一个规则来过滤和拒绝所有不提供证书的东西?有人对我应该使用什么语法有任何指示吗?通配符?

lxg

linux sendmail certificate slackware
  • 2 个回答
  • 524 Views
Martin Hope
Gustavo Carreno
Asked: 2010-01-28 09:07:06 +0800 CST

将 Slackware 12.2 升级到 13.0,有什么问题吗?

  • 0

我正在逐渐将 Slackware 12.0 升级到 13.0。
使用 slapt-get 我已经逐渐做到了,以防万一。所以我已经完成了 12.0 -> 12.1、12.1 -> 12.2。

我已经整理出我需要手动升级 pkgtools 和全新安装 xz 只是为了让它安装新的包格式。

在谷歌搜索该主题后,我偶然发现有人将内核从 12.1 升级到 13.0,他抱怨 /dev/hda 被切换到 /dev/sda。

这是正确的吗?我必须从 13.0 CD 启动才能让 LILO 工作,还是可以在 slapt-get 完成 dist-upgrade 后运行 LILO?

linux upgrade slackware
  • 2 个回答
  • 1091 Views
Martin Hope
piro
Asked: 2009-09-04 10:59:00 +0800 CST

Slackware 12 - 安装了 cairo 但看不到

  • 0

我想安装 gtk+ 2.16.5,所以我还安装了 glib、pango 和 cairo。一切似乎都运作良好,除了开罗。

起初我在配置时遇到错误:

请求 'cairo >= 1.6' 但 cairo 版本是 1.4.12

我安装了最新版本的 cairo 没有任何问题,我重新启动了 comp,当我再次启动配置时,同样的事情发生了,它显示了同样的错误。

我也可以看到这个:

如果您以非标准前缀安装软件,请考虑调整 PKG_CONFIG_PATH 环境变量。

或者,您可以设置环境变量 BASE_DEPENDENCIES_CFLAGS 和 BASE_DEPENDENCIES_LIBS 以避免调用 pkg-config。

有关更多详细信息,请参见 pkg-config 手册页。

有人能帮我吗 ?谢谢。

slackware
  • 3 个回答
  • 342 Views
Martin Hope
Milan Babuškov
Asked: 2009-06-16 03:37:37 +0800 CST

64位还是32位Linux系统?

  • 3

我有一台具有 4GB 内存的服务器。在它上面,我安装了 32 位 Slackware Linux 12.1。当然,它并没有使用全部 4GB 的 RAM。我很快想将 RAM 增加到 8GB,并且正在寻找一种方法让系统使用它。该系统用作数据库服务器,白天处于高负载状态。

AFAICT,我有两个选择:保留 32 位并重建内核并失去一些性能。或者使用 64 位并重新安装所有内容。查看 64 位版本的 Slackware,我可以运行 -current 或 Slamd64。

现在,关于问题:

  1. 我应该继续使用 32 位还是使用 64 位?

  2. 如果我使用 64 位,我应该使用 -current 还是 Slamd64?

PS我希望从实际在生产中使用任何这些配置的人那里得到答案,而不仅仅是复制/粘贴我可以通过谷歌找到的东西。

linux 64-bit 32-bit slackware
  • 9 个回答
  • 4166 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