我的网站特定区域有问题.我有一个带有CentOS的服务器和Linux系统的基本知识.
当文件夹设置为755时会发生此问题,但设置为777时,它正常工作.我知道777不安全,所以我查了一下,并且apparntely我需要将admin用户添加到名为www-data的组中.然而,当我试图这样做时,我被告知www-data group不存在,我想这与CentOS是一个不同的Linux发行版有关.
值得注意的是,我几天前已将用户管理员添加到'apache'组,我不确定它是否相关...
无论如何,如何在CentOS上将用户添加到此组以修复此权限问题?
谢谢
在CentOS Linux版本7.2.1511(核心)我想安装字体.我已经使用fc-cache和fc-list命令在另一台机器上执行了该操作,但在这台新机器上无法识别这些命令.我需要安装什么软件包来获取这些命令?
更新:我在 / usr/share/fonts/Arial中有Arial字体
以及用于测试的python matplotlib代码,试图使用该字体.
请注意,已安装Package fontconfig-2.10.95-7.el7.x86_64和最新版本.
我不得不删除:/home/centos/.cache/matplotlib/fontList.cache
解决问题
我试图连接到安装在CentOS 7上的MariaDB / Mysql,并尝试使用时出现以下错误:mysql -u root -p。
错误2002(HY000):无法通过套接字'/var/lib/mysql/mysql.sock'连接到本地MySQL服务器(111)
我尝试通过指定IP地址而不是使用localhost连接到它,但出现相同的错误。
当我尝试获取MariaDB状态时,收到以下消息(/bin/systemctl status mariadb.service):
mariadb.service-MariaDB数据库服务器已加载:已加载(/usr/lib/systemd/system/mariadb.service;已启用;供应商预设:已禁用)活动:失败(结果:资源)
并启动它会产生以下错误(/bin/systemctl start mariadb.service):
mariadb.service的作业失败,因为超出了配置的资源限制。有关详细信息,请参见“ systemctl status mariadb.service”和“ journalctl -xe”。
我还查看了位于/var/log/mariadb/mariadb.log的日志
160408 12:21:00 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
160408 16:11:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160408 16:11:01 [Note] /usr/libexec/mysqld (mysqld 5.5.47-MariaDB) starting as process 3054 ...
160408 16:11:02 InnoDB: The InnoDB memory heap is disabled
160408 16:11:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160408 16:11:02 …Run Code Online (Sandbox Code Playgroud) 我想在CentOS Linux系统中通过PHP连接MSSQl服务器。但是低于错误,
Fatal error: Call to undefined function mssql_connect() in /var/www/h.....
Run Code Online (Sandbox Code Playgroud)
为此,我参考了一些网站并找到了解决方案。但这也不起作用。在这里,我尝试安装php5-sybase,但出现一些错误,
yum install php5-sybase
Loaded plugins: fastestmirror, langpacks
apt.sw.be_redhat_el2.1_en_mirrors-rpmforge| 1.9 kB 00:00:00
remi-safe | 2.9 kB 00:00:00
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. …Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的centOS服务器上安装GMP库(https://gmplib.org/),但是没有运气。
我运行此命令:-
./configure
Run Code Online (Sandbox Code Playgroud)
它给了我这个结果:-
[root@centos-512mb-ams3-01 gmp-4.2.2]# ./configure
checking build system type... pentium3-unknown-linux-gnu
checking host system type... pentium3-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=32
checking compiler gcc -m32 -O2 -fomit-frame-pointer ... no
checking compiler gcc -O2 -fomit-frame-pointer ... yes
checking compiler gcc -O2 -fomit-frame-pointer has sizeof(long)==4... no
checking compiler icc …Run Code Online (Sandbox Code Playgroud) 我必须创建一个基于centos的Docker映像,并且需要在其中安装apache。我创建了一个具有以下内容的docker文件:
FROM centos:7
Run yum update && yum install httpd httpd-tools -y
Run Code Online (Sandbox Code Playgroud)
需要做的:运行容器时,应将其指向类似于localhost:8090的浏览器。我可以获取执行相同操作的步骤吗?
有人可以帮忙吗?
我每天都收到警告,说我的VPS服务器空间已满。我已经删除了旧的内核,清理了安装文件并减少了备份的存储量。我不确定我还能删除什么?
我运行命令:
du --max-depth=1 -h /
0 /dev
16K /lost+found
1.6G /var
75M /opt
89M /run
2.8G /backup
38M /etc
4.0K /cd
4.0K /srv
4.0K /media
7.4G /usr
2.6M /tmp
0 /sys
179M /boot
61M /root
4.0K /mnt
149G /home
Run Code Online (Sandbox Code Playgroud)
我还运行命令:
df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/centos-root 49066108 43581052 3396348 93% /
devtmpfs 2009504 0 2009504 0% /dev
tmpfs 2019500 0 2019500 0% /dev/shm
tmpfs 2019500 90696 1928804 5% /run
tmpfs 2019500 0 2019500 0% /sys/fs/cgroup …Run Code Online (Sandbox Code Playgroud) 有人可以解释noarch rpm和rpm之间的区别。难道这两个都是家属。我有Jenkins rpm,也有一些noarch rpm。我可以用noarch rpm做些什么。谢谢你的帮助
在CentOS7上使用它安装PHP7.1之后
https://webtatic.com/packages/php71/
运行
php -v
Run Code Online (Sandbox Code Playgroud)
结果是
-bash:php:找不到命令
安装工作但PHP不存在 - 我错过了一步吗?