Articles of centos7

在CentOS 7 Apache 2上使用HTTPS Index.html而不是ProxyPass反向代理站点时

目标是外部用户可以通过HTTPS进行连接,通过Apache的基本身份validation,然后查看代理tomcat站点。 我已经build立了一个反向代理到一个运行在不同端口上的同一台机器上的tomcat服务器,使用基本authentication:(/etc/httpd/conf.d/vhost.conf) NameVirtualHost *:80 <VirtualHost *:80> ServerName sub.domainx.co.uk ErrorLog "/var/log/proxy/domainx_prox_error_log" CustomLog "/var/log/proxy/domainx_prox_access_log" common ProxyRequests Off <Proxy *> Order deny,allow Deny from all Allow from all </Proxy> <Location /> AuthType Basic AuthName "Proxy Auth" AuthUserFile /var/www/syzygy-auth/CONFLUENCE/.htpasswd Require user ukuser Satisfy any Deny from all Allow from 192.168.0.0/21 </Location> ProxyPass / http://sub.domainx.co.uk:8090/ ProxyPassReverse / http://sub.domainx.co.uk:8090/ </VirtualHost> 以上工作正常。 […]

如果posixAccount objectClass不可用,如何使用LDAP对CentOS7进行身份validation?

目标:使用LDAP对CentOS7进行身份validation 问题 1)用户无法find calling ldap_search_ext with [(&(uid=bla)(objectclass=posixAccount)(uid=*)(&(uidNumber=*)(!(uidNumber=0))))][dc=my-domain,dc=com] 2)找不到posixAccount对象类 问题 如何添加objectClass posixAccount ? 如果这个objectClasstypes找不到如何更改sssd的查找,允许此软件在OpenLDAP中find用户并允许对CentOS7进行身份validation? 全面 1)安装了sssd 2)使用CentOS7上configuration的sssd进行ldapauthentication [root@controller ~]# authconfig –enablesssd –enablesssdauth –enablelocauthorize –update 3)启用了sssddebugging /etc/sssd/sssd.conf [domain/default] autofs_provider = ldap cache_credentials = True krb5_realm = # ldap_search_base = dc=my-domain,dc=com id_provider = ldap auth_provider = ldap chpass_provider = ldap ldap_uri = ldap://<ipaddress>/ ldap_tls_cacertdir = /etc/openldap/cacerts debug_level = […]

对称DHCP故障切换configuration

我已经在CentOS 7上build立了一个DHCP服务器。它运行的非常好,但是由于业务的需要,我们正在向远处的另一个站点扩展。 这使我们有机会在这个独立的位置托pipe一个故障转移DHCP服务器。 这两个位置将通过站点到站点的VPN进行连接。 上图是我们networking的总结。 我们将有珀斯和墨尔本的网站,通过互联网通过VPN连接。 每个站点都有一个不同的IP范围来操作。 每个站点都有自己的DHCP服务器。 我想configurationDHCP服务器如下: DHCP 1应该作为珀斯的主要DHCP服务器。 也就是说,PC1,PC2和PC3将从DHCP 1获得他们的IP。 DHCP 2应该作为墨尔本的主要DHCP服务器。 PC4,PC5和PC6将closuresDHCP 2的IP。 在DHCP1发生故障的情况下,DHCP2将接pipe珀斯站点的IP分配,直到DHCP1恢复在线状态,反之亦然。 所以每个DHCP服务器都应该作为备用位置的故障转移。 我在这里可以看到的唯一问题是DHCP服务器不能区分珀斯站点的客户端和墨尔本站点的客户端。 想象一下DHCP2没有响应一段时间,是什么阻止了DHCP 1为珀斯IP分配墨尔本系统? 而且一旦这个DHCPconfiguration就绪,我怎么能避免远程DHCP服务器确认本地请求,除非它处于这种故障转移模式?

无法用redmine上传文件(使用centos 7)

我在一个centos 7 vm(内核3.10.0-229.7.2.el7.x86_64)中安装了redmine 2.6.6.stable。 到目前为止,这很好,但我目前无法上传文件。 Googling左右我发现Passenger写这些文件( https://www.redmine.org/issues/8817 ),它可能没有正确的写权限。 但我试图在过去的2个小时内修复它,但没有成功。 Apache的error_log当我尝试上传的东西: App 3419 stderr: Errno::EACCES (Permission denied – /var/www/html/vhosts/redmine/files/2015/08/150811151550_icon.png): App 3419 stderr: app/models/attachment.rb:108:in `initialize' App 3419 stderr: app/models/attachment.rb:108:in `open' App 3419 stderr: app/models/attachment.rb:108:in `files_to_final_location' App 3419 stderr: app/controllers/attachments_controller.rb:88:in `upload' 这些是我的redmine目录的当前权限: [root@server ~]# ls -l /var/www/html/vhosts/redmine/ total 44 drwxr-xr-x. 7 apache apache 78 Jul 7 16:47 app […]

在Centos7上安装MySQL(MariaDB)

Centos7新手,试图安装MariaDB: sudo yum install mariadb-server mariadb 这就是它吐出来的东西: Loaded plugins: fastestmirror, langpacks, rhnplugin This system is receiving updates from RHN Classic or Red Hat Satellite. Loading mirror speeds from cached hostfile Package mariadb-server is obsoleted by MariaDB-server, trying to install MariaDB-server-10.1.5-1.el7.centos.x86_64 instead Package mariadb is obsoleted by MariaDB-client, trying to install MariaDB-client-10.1.5-1.el7.centos.x86_64 instead Resolving Dependencies –> […]

Fail2Ban不能在CentOS 7上使用SELinux

在使用WordPress和WP fail2ban插件的LEMP堆栈中,WordPress身份validation问题会很好地logging到/ var / log / messages。 $ sudo fail2ban-client version 0.9.2 在过去的几天里,我在这里获得了大约25K的这些线路,来自瑞典的一些蛮力尝试: Aug 17 10:48:58 ip-172-1-6-5 wordpress(mydomain.com)[29203]: Blocked authentication attempt for mydomain from 217.70.32.9 Aug 17 10:48:58 ip-172-1-6-5 wordpress(mydomain.com)[29204]: Blocked authentication attempt for mydomain from 217.70.32.9 Aug 17 10:48:58 ip-172-1-6-5 wordpress(mydomain.com)[29796]: Blocked authentication attempt for mydomain from 217.70.32.9 Aug 17 10:48:58 ip-172-1-6-5 wordpress(mydomain.com)[29203]: Blocked […]

没有日志文件输出(或带有输出的电子邮件)通过cron作业运行Python脚本

我有下面的cron作业运行一个Python脚本似乎安装好没有问题后,在Crontab中创build并保存(这是运行Centos7的服务器上)。 我没有看到日志文件,也没有看到任何输出到包含的电子邮件地址。 我试过这个: */2 * * * * /home/local/DEV/mdub/FTWFB/FTWFBUploader.py > /home/local/DEV/mdub/FTWFB/logs`date +\%Y-\%m-\%d-\%H:\%M:\%S`-cron.log 2>&1 | mailx -s “Facebook Uploads – Cronlog" [email protected] 和这个: */2 * * * * /home/local/DEV/mdub/FTWFB/FTWFBUploader.py | tee /home/local/DEV/mdub/FTWFB/logs`date +\%Y-\%m-\%d-\%H:\%M:\%S`-cron.log | mailx -s “Facebook Uploads – Cronlog" [email protected] 我究竟做错了什么? 在这两个文件我运行chmod +x (filename) ,当我手动运行脚本他们运行和按预期输出。

CentOS 7安装:/ boot命名scheme

我目前正在安装HP MicroServer Gen7上的CentOS7。 我正在安装到configuration为硬件RAID1的240GB硬盘的镜像集中。 当configuration我的分区scheme时,我创build/boot作为一个标准分区。 我通常会期望这被称为sda1 。 但是,CentOS7安装会自动给它一个名字: pdc_ebjgddhjdi1 。 “名称”字段也是灰色的,拒绝让我改变它。 是否改变了命名scheme,类似于networking接口的命名scheme如何改变? 这个名字似乎有点随意,所以find它的信息似乎没有帮助。 安装者也不会自愿提供任何信息。 我不希望这会引起任何问题,但新的名字并没有完全滚落! 出于纯粹的好奇心,是否有可能改变它? 不pipe怎样,旧名称有什么问题? 谢谢!

Gitlab综合更新错误(8.0.1至8.0.2)

我在CentOS 7服务器上安装了全新的Gitlab服务器。 而当我尝试更新sudo yum install gitlab-ce到版本8.0.2的包我有一个错误: … truncated … gitlab-ce-8.0.2-ce.1.el7.x86_64.rpm | 336 MB 00:00:39 Running transaction check Running transaction test Transaction test succeeded Running transaction gitlab preinstall: Backing up GitLab SQL database (excluding Git repositories, uploads) rake aborted! Errno::EACCES: Permission denied @ dir_s_mkdir – /var/opt/gitlab/backups /opt/gitlab/embedded/service/gitlab-rails/lib/backup/database.rb:15:in `dump' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:66:in `block (4 levels) in <top (required)>' /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:11:in […]

启动后启动SVN服务器

我已经安装了SVN 1.8,并在/var/svnrepos/svn/目录下创build了存储库。 当我在terminal里用这个命令运行SVN服务器时,一切正常,从客户端访问URL svn://svnserver/svn/ is successfull: svnserve -d -r /var/svnrepos/ 我想在系统启动时运行SVN服务器。 我将上面的命令添加到/etc/rc.d/rc.local文件中。 SVN服务器启动后运行,但是当我从客户端(TortoiseSVN)访问服务器时,我得到这个消息: Unable to connect to a repository at URL 'svn://svnserver/svn' Can't open file '/var/svnrepos/svn/format': Permission denied