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
    • 最新
    • 标签
主页 / user-1944

Léo Léopold Hertz 준영's questions

Martin Hope
Léo Léopold Hertz 준영
Asked: 2016-06-01 07:43:12 +0800 CST

为什么 `apache2 -k graceful` 会出现此错误?

  • 0

我知道未定义线程Apache2 配置变量,但这里的问题很可能与新创建用户的所有权/权限有关,请参阅线程底部以了解问题的假设。我在 Raspbian Jessie 中运行

sudo a2enmod headers

和

  • 我/etc/apache2/envvars的和这里一样。
  • 我成功地按照此处所述进行了自签名 SSL 证书;openssl s_client -connect localhost:443返回预期的输出。

我跑sudo apache2 -k graceful了,但输出是

 [Tue May 31 14:47:38.182913 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Mon Apr 21 17:36:38.019345 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Mon Apr 21 17:36:38.019370 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Mon Apr 21 17:36:38.019385 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Mon Apr 21 17:36:38.019414 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 21 17:36:38.028756 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 21 17:36:38.029032 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 21 17:36:38.029056 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}

执行source /etc/apache2/envvars并运行该命令仍然给出相同的输出。我不确定这个问题。

HBruijn 的建议

  • 该命令sudo service apache2 graceful似乎有效;输出[OK] Reloading webserver: apache2。那样行吗?那我应该检查什么?为什么原来的错误在那里?
  • 然后该命令sudo apache2ctl graceful再次返回一个空行。那样行吗?

为什么你会得到这样的输出apache2 -k graceful?

apache2 raspbian
  • 1 个回答
  • 580 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2014-02-07 04:57:07 +0800 CST

尝试使用 virtualenv Django 1.4.1

  • 0

我在服务器上有 Django 1.2.1。我需要使用虚拟 Python 来安装 Django 1.4.1 和我想要的 PostgreSQL 适配器。我正在尝试在我的服务器上设置此软件。所以我跑

virtualenv --python=python2.6 env
. env/bin/activate
pip install -r requirements.txt

输出

:~/arkisto$ virtualenv --python=python2.6 env
Running virtualenv with interpreter /usr/bin/python2.6
New python executable in env/bin/python2.6
Also creating executable in env/bin/python
Installing distribute..................................................................................................................................................................................done.
:~/arkisto$  . env/bin/activate
(env):~/arkisto$ pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): psycopg2 in /usr/lib/python2.6/dist-packages (from -r requirements.txt (line 2))
Downloading/unpacking django==1.4.1 (from -r requirements.txt (line 1))
  Downloading Django-1.4.1.tar.gz (7.7Mb): 7.7Mb downloaded
  Running setup.py egg_info for package django
Installing collected packages: django
  Found existing installation: Django 1.2.3
    Not uninstalling Django at /usr/lib/pymodules/python2.6, outside environment /home/users/sa/tentti/env
  Running setup.py install for django
    changing mode of build/scripts-2.6/django-admin.py from 644 to 755
    changing mode of /home/users/sa/arkisto/env/bin/django-admin.py to 755
Successfully installed django
Cleaning up...

然后在服务器中查看 Django 的版本

(env)$ django-admin --version
1.2.3

您如何使用这些命令安装的软件?

linux
  • 4 个回答
  • 825 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2014-01-22 01:12:50 +0800 CST

SSH-add 和联系服务器失败

  • 3

我忘记了如何执行此程序。

我在 OSX 10.9.1 上做过

  • ssh-keygen在我的服务器上运行
  • 将私钥 id_rsa 移到我的笔记本电脑上$HOME/.ssh/id_rsa,从我的服务器中删除了私钥 id_rsa
  • $HOME/.ssh/config在我的笔记本电脑中创建以下内容
  • 跑ssh-add $HOME/.ssh/id_rsa

我的 .ssh/config

Host server.myhomepage.com
  User masi
  Port 22
  Hostname server.myhomepage.com
  IdentityFile ~/.ssh/id_rsa
  TCPKeepAlive yes
  IdentitiesOnly yes

我跑

ssh-add .ssh/id_rsa 
Enter passphrase for .ssh/id_rsa: 
Identity added: .ssh/id_rsa (.ssh/id_rsa)

并且运行更多

ssh server.myhomepage.com
Saving password to keychain failed

它在一个图形窗口中询问我的 id_rsa 密码,我给出了正确但收到失败消息。然后,它会在终端询问我是否正确输入了私钥的密码,但仍然显示失败消息。我用正确的密码运行了很多次

Identity added: /Users/masi/.ssh/id_rsa (/Users/masi/.ssh/id_rsa)
[email protected]'s password: 
Permission denied, please try again.

我忘记了如何正确执行此过程。 如何正确地将钥匙放在钥匙串中?

ssh
  • 2 个回答
  • 2471 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-10-22 15:06:57 +0800 CST

为 MediaWiki 安装数学支持时出错

  • 0

如何解决安装 MediaWiki 时出现的以下 Make 错误?

...

/local/lib/site_perl . /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at t/maint/php-tag.t line 8.
BEGIN failed--compilation aborted at t/maint/php-tag.t line 8.
# Looks like your test died before it could output anything.
t/maint/php-tag..........dubious                                             
        Test returned status 255 (wstat 65280, 0xff00)
t/maint/unix-newlines....ok                                                  
Failed Test            Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/00-test.t             127 32512    ??   ??  ??
t/inc/Database.t        127 32512    ??   ??  ??
t/inc/Global.t          127 32512    ??   ??  ??
t/inc/IP.t              127 32512    ??   ??  ??
t/inc/ImageFunctions.t  127 32512    ??   ??  ??
t/inc/Language.t        127 32512    ??   ??  ??
t/inc/Licenses.t        127 32512    ??   ??  ??
t/inc/LocalFile.t       127 32512    ??   ??  ??
t/inc/Parser.t          127 32512    ??   ??  ??
t/inc/Revision.t        127 32512    ??   ??  ??
t/inc/Sanitizer.t       127 32512    ??   ??  ??
t/inc/Search.t          127 32512    ??   ??  ??
t/inc/Title.t           127 32512    ??   ??  ??
t/inc/Xml.t             127 32512    ??   ??  ??
t/maint/php-lint.t      254 65024   966  966  1-966
t/maint/php-tag.t       255 65280    ??   ??  ??
Failed 16/19 test scripts. 966/4248 subtests failed.
Files=19, Tests=4248, 46 wallclock secs (33.15 cusr + 10.38 csys = 43.53 CPU)
Failed 16/19 test programs. 966/4248 subtests failed.
make: *** [test] Error 255
ubuntu
  • 1 个回答
  • 133 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-10-20 14:18:17 +0800 CST

为 Ubuntu、Posgres 8.3 安装 MediaWiki 时出错

  • 0

您如何解决最后一行的错误消息?

....
# Installing MediaWiki with php file extensions
# Environment checked. You can install MediaWiki.
#

Generating configuration file...
# Database type: PostgreSQL
# Loading class: DatabasePostgres
# Attempting to connect to database "wikidb" as "wikiuser"... error: No database connection
# Checking the version of Postgres...
Warning: pg_version(): supplied argument is not a valid PostgreSQL link resource in /var/www/wiki/includes/db/DatabasePostgres.php on line 1078
FAILED. Required version is 8.1. You have 7.3 or earlier

我正在使用 Postgres 8.3,这使得错误消息很奇怪。文件“LocalSettings.php”没有创建到目录配置,所以我无法在没有解决问题的情况下继续安装。

ubuntu
  • 1 个回答
  • 491 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-09-22 10:50:46 +0800 CST

在 OSX 中设置 DHCP

  • 2

如何为 OSX 设置 DHCP,以便可以通过 iPod Touch 访问 Macbook 的共享网络?

我在 OSX 设置中启用了Internet 共享,这样您就可以通过 iPod 访问共享。但是,我没有上网。

我在 Network settings > TCP/IP > Configure IPv4: Using DHCP。

我使用带手动地址的 DHCP运行网络失败。我在机场设置中使用了我的真实 IP 地址。

dhcp
  • 1 个回答
  • 562 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-08-22 13:55:08 +0800 CST

使 /var/www/codes 只能由 Apache 在 Internet 上访问

  • 0

您应该在 `/etc/apache2/enabled-sites/000-default 中使用哪些设置以使内容仅对给定文件夹中的用户可执行和可读?

我有以下/etc/apache2/sites-enabled/000-default

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www       
             // I put here /var/www/codes unsuccessfully
             // I get this error when restarting Apache
             // waiting apache2: Could not reliably determine  
             // the server's fully qualified domain name, 
             // using 127.0.1.1 for ServerName

        --- cut ----
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order deny,allow
                allow from all                 // not sure about this
        </Directory>
        --- cut ---

我在/var/www/codes的权限

 4 drwxr-sr-x 3 root www  4096 2009-08-21 00:16 forms
 4 drwxr-sr-x 7 root www  4096 2009-08-21 00:16 handlers
 8 -rw-r--r-- 1 root www  5403 2009-08-22 00:43 index.php
apache-2.2
  • 1 个回答
  • 178 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-08-18 09:16:12 +0800 CST

为新用户修复 Postgres 的登录权限

  • 0

如何启用 heo 的登录?

我得到以下

替代文字

问题似乎在于用户/角色“heo”的权限,并且可能在pg_hba.conf.

我将以下行放入文件失败

local   all         heo                          ident sameuser
login permissions postgresql
  • 1 个回答
  • 712 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-08-06 05:20:34 +0800 CST

让 PHP 与 PostgreSQL 通信

  • 0

我尝试在 Firefox 中使用的 PHP 代码

<?php
 // Connecting, selecting database
 $dbconn = pg_connect("host=localhost dbname=masi user=postgres password=abc")
     or die('Could not connect');
 ?>

我明白了

Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "postgres" in /var/www/ex1.php on line 3

问题似乎出在我的/etc/postgresql/8.3/main/pg_hba.conf. 看来我需要在文件中添加一些 ip-address。

我的 pg_dba.conf 中的代码

# Database administrative login by UNIX sockets
 local   all         postgres                          ident sameuser

 # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

 # "local" is for Unix domain socket connections only
 local   all         all                               ident sameuser
 # IPv4 local connections:
 host    all         all         127.0.0.1/32          md5
 # IPv6 local connections:
 host    all         all         ::1/128               md5

该错误似乎在 PostgresSQL 中,因为 PHP 和 Apache2 可以工作。我可以通过 访问 Psql sudo -u postgres psql,因为我没有设法更改默认设置。这很可能是问题的原因。但是,我的 PHP 代码使用默认设置,所以这应该不是问题。

我在/etc/apache2/envvars中更改了一行,但未成功:

export APACHE_RUN_USER=postgres     // I changed this line from masi to postgres
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2.pid

我收到相同的错误消息。

如何在 Ubuntu 中通过 pg_hba.conf 让 PHP 与 PostgreSQL 一起工作?

php database postgresql
  • 3 个回答
  • 11307 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-28 02:27:35 +0800 CST

了解我的 Uni 是否可以运行 Python Web 应用程序

  • 2

我正在完成我的第一个数据库项目。 我将设置mod_wsgi到 Apache,这样我就可以在我的 Uni 的服务器上运行 Python 网络框架。我不确定我的 Uni 是否有这些工具。

我的 Uni 不支持我对 Python 及其服务器的配置。

我想知道一种在 shell 中获取服务器信息的方法,以便我可以决定是使用他们支持的工具(Oracle、PHP)还是我喜欢的工具(Python、MySQL)。

您可以运行哪些命令来获取有关服务器的信息,以便我可以决定使用哪些工具?

mysql mod-wsgi database python
  • 3 个回答
  • 139 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-23 12:47:41 +0800 CST

如何使用 su 命令访问帐户?

  • 0

问题:使用 su 命令访问 MacOS 中的帐户,更多信息请点击此处。我可以访问我的其他帐户,但不能访问根据说明创建的帐户。该命令不会更改用户:

su postgres

问题:为什么我无法使用 su 命令访问帐户?

mac-osx su accounts
  • 1 个回答
  • 140 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-09 12:35:00 +0800 CST

为什么不支持在 .screenrc 中采购?

  • 2

我想在我的 .screenrc 中有以下代码

 source /Users/masi/bin/screen/file.screen

但是,我观察到不支持在 .screenrc 进行采购。

不支持在 .screenrc 中采购吗?

source gnu-screen
  • 1 个回答
  • 865 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-06 01:49:40 +0800 CST

了解 MySQL 在 OS X 中的错误信息

  • 0

我正在阅读MySQL 的手册。

我跑

. /usr/local/mysql/bin/mysql                                                                                                                            ~ 

我明白了

/usr/local/mysql/bin/mysql:1: command not found: ????^G
/usr/local/mysql/bin/mysql:2: permission denied: 
/usr/local/mysql/bin/mysql:3: parse error near `}'

我跑

. /usr/local/mysql/bin/mysqladmin                                                                                                                         ~ 

我明白了

/usr/local/mysql/bin/mysqladmin:9: parse error near `)'

这些错误消息表明我的 MySQL 似乎已损坏。我没有通过谷歌找到错误信息的解释。

这些消息的真正含义是什么?

mysql mac-osx
  • 1 个回答
  • 149 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-06 01:33:49 +0800 CST

要了解 sudo 和“。”

  • 0

我正在阅读MySQL 的手册。

他们建议我命令

cd /usr/local/mysql
sudo ./bin/mysqld_safe          // it seems that sudo = . + master rights

是相同的

. /usr/local/mysql/bin/mysql    // only ., no master rights

这两个命令的作用相同吗?

unix sudo
  • 4 个回答
  • 1504 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-05 08:50:53 +0800 CST

在 Vim 中无法为 Screen 的日志找到正确的文件格式

  • 1

我懂了

替代文本 http://files.getdropbox.com/u/175564/fileformat-problem.png

我有的地方^M和^[不同的地方。前者似乎是进入,而后者显然是行的结束/开始。

我想去掉紫色符号,以便更好地阅读日志文件。

我跑

:set fileformats=unix,dos,mac
:e

但我得到相同的输出。

你怎么能得到正确的编码/文件格式?

vim encoding
  • 3 个回答
  • 363 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-05 08:41:45 +0800 CST

无法在屏幕中增加类似 Vim 的窗口大小

  • 2

我懂了

替代文字 http://files.getdropbox.com/u/175564/screen-bigger.png

我在屏幕的拆分中打开了两个窗口。

我想通过增加底部窗口的尺寸

Ctrl-A [number] +

与您在 Vim 中所做的类似。

我没有找到谷歌的解决方案。

如何增加 Screen 中窗口的大小?

gnu-screen
  • 1 个回答
  • 360 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-05 07:36:02 +0800 CST

如何在 LESS 环境变量中设置 -R?

  • 10

该问题基于此答案。

如何在 LESS 环境变量中设置 -R?

less
  • 1 个回答
  • 6620 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-05 05:44:17 +0800 CST

无法理解 Mac OS X 中的文件夹 /var/virusmails

  • 3

当我看到这个时,我正在完成查找 MySQL 密码的说明

[一些病毒邮件的图像但丢失了]

我在 Root 的 var 有一个名字很奇怪的文件夹 /var/virusmails。

该文件夹的用户是_amavisd我不知道的。同一个用户也有文件夹 amavis 这样

0 drwxr-xr-x   6 _amavisd  _amavisd   204B May 31  2008 amavis
0 drwxr-xr-x   2 _amavisd  _amavisd    68B May 31  2008 virusmails

Amavis似乎是一个病毒扫描程序提供商。但是,我还没有安装这些文件。这表明我这些文件是内置在 OS X 中的。

我对 OS X 中哪些组件使用病毒扫描程序感兴趣。我从未注意到它正在运行。

哪些 OS X 组件需要 Amavis 病毒扫描程序?

mac-osx amavis var
  • 2 个回答
  • 3557 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-05 05:35:52 +0800 CST

MySQL的默认密码是什么?

  • 1

我跑

mysqladmin5 -u root -p ping 

我收到一个密码请求。

我找到了以下说明,但它们似乎相当残酷

<<
After installing MySQL 5 on Solaris with pkgadd you will have to perform
the following post-installation tasks:
As root:
# rm -rf /var/lib/mysql/mysql
Then as mysql:
$ cd /opt/mysql/mysql
$ scripts/mysql_install_db
Then as root:
# /etc/init.d/mysql start
Then as mysql:
$ /opt/mysql/mysql/bin/mysqladmin -u root password 'password'
Then as root:
# /opt/mysql/mysql/bin/mysql_secure_installation
>>

密码不是像在某些版本的 MySQL 中那样为空。

感谢您指出这一点! 我的 MySQL 的版本似乎是

mysql5 --version     
mysql5  Ver 14.12 Distrib 5.0.83, for apple-darwin9.7.0 (i386) using readline 6.0

MySQL的默认密码是什么?

mysql
  • 3 个回答
  • 35825 Views
Martin Hope
Léo Léopold Hertz 준영
Asked: 2009-07-05 05:16:25 +0800 CST

无法在 Mac OS X 上启动 MySQL 服务器

  • 1

感谢 samt 解决了 chown 的第一个问题!

我运行命令

$sudo /opt/local/bin/mysqld_safe5 &                                                                                                                      ~ 
[1] 1096
$Password:                                                                                                                                              ~ 1

[1]  + suspended (tty output)  sudo /opt/local/bin/mysqld_safe5

由于某种原因,该过程现在正在工作中,所以我将其取回

$%1                                                                                                                                                     ~ 1
    [1]  + continued  sudo /opt/local/bin/mysqld_safe5
    Password:
    Starting mysqld daemon with databases from /opt/local/var/db/mysql5
    STOPPING server from pid file /opt/local/var/db/mysql5/eMY-IP-ADDRESS.elisa-laajakaista.fi.pid
    090705 12:37:45  mysqld ended

我不知道为什么我的 MySQL 正在关闭。

你知道为什么我的 MySQL 关闭了吗?

mysql mac-osx
  • 6 个回答
  • 3196 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