CentOS

Can't install and use Cabal (Haskell) on CentOS Server - zlib-0.5.4.1 failed during the building phase

我的未来我决定 提交于 2021-02-07 18:38:18
问题 I'm trying to install a Haskell server which runs in Cabal on my server. When I configure a server normally to run this, I follow these instructions which we've refined - they work 100% every time on a blank rackspace cloud server. yum update yum install git yum install vim yum install ghc-zlib-devel.x86_64 wget http://www.haskell.org/ghc/dist/7.8.2/ghc-7.8.2-x86_64-unknown-linux-centos65.tar.xz wget http://www.haskell.org/cabal/release/cabal-install-1.20.0.1/cabal-x86_64-unknown-linux.tar.gz

Linux磁盘与文件系统管理(一)

大兔子大兔子 提交于 2021-02-07 17:45:56
fdisk   常用的磁盘分区工具,受mbr分区表的限制,只能给小于2TB的磁盘划分分区,如果使用fdisk对大于2TB的磁盘进行分区,虽然可以分区,但只能识别2T的空间,一般使用parted分区工具   -l  # 显示所有磁盘分区信息 [root@puppet105 ~]# fdisk -l Disk /dev/sda: 64.4 GB, 64424509440 bytes, 125829120 sectors    # 磁盘/dev/sda 的大小 Units = sectors of 1 * 512 = 512 bytes                  # 每个柱面大小512字节 Sector size (logical /physical): 512 bytes / 512 bytes        # 每个扇区的字节数 I /O size (minimum/optimal): 512 bytes / 512 bytes          # 每次读写的字节数 Disk label type: dos Disk identifier: 0x000a9f20 Device Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 4196351

Python: Importing modules into CGI script

时光毁灭记忆、已成空白 提交于 2021-02-07 14:49:27
问题 I'm hoping someone might be able to explain to me why this is happening? I am running httpd on Centos 7 with Python 2.7 I have a python module in /home/user/Path/to/module.py . Lets say, for example, it prints "Hello World!" print("Hello World!") I then try to import it into the file /var/www/cgi-bin/index.py like so: #!/usr/bin/python import sys sys.path.append('/home/user/Path/to/') print('Content-type: text/html\n\n') print('<!DOCTYPE html>') print('<html lang="en">') print('<head>') print

Python: Importing modules into CGI script

限于喜欢 提交于 2021-02-07 14:47:42
问题 I'm hoping someone might be able to explain to me why this is happening? I am running httpd on Centos 7 with Python 2.7 I have a python module in /home/user/Path/to/module.py . Lets say, for example, it prints "Hello World!" print("Hello World!") I then try to import it into the file /var/www/cgi-bin/index.py like so: #!/usr/bin/python import sys sys.path.append('/home/user/Path/to/') print('Content-type: text/html\n\n') print('<!DOCTYPE html>') print('<html lang="en">') print('<head>') print

宿主主机如何访问虚拟机中的docker服务

我只是一个虾纸丫 提交于 2021-02-07 12:54:17
宿主主机如何访问虚拟机中的docker服务 网上的回答不一而足,然而都没有解决,最后上了Stack Overflow,找到了答案,国内的小伙伴还得加油呀. 环境 宿主机系统 : window 8, 虚拟机软件: Oracle VirtualBox (CentOS7) docker version: 19.03.7 问题描述 虚拟机内部 systemctl start docker 启动docker , docker run -d -p 80:80 nginx 启动nginx 服务, 虚拟机ip 192.168.56.200 ,docker 服务ip 172.17.0.16 宿主机浏览器 localhost:81 无法访问nginx . 解决方法: 打开virtualbox 选择docker服务所在的虚拟机 点击设置 -> 网络 选择 NAT 网卡 点击高级 -> 端口转发 6 添加规则 : tcp 协议 ,主机和子系统端口设置,如 host:80 guest:80 浏览器访问 localhost:80 ,可以查看到nginx 界面 原文: 1. Open Oracle VM VirtualBox Manager 2. Select the VM used by Docker 3. Click Settings -> Network 4. Adapter 1 should

CentOS 7.2 yum方式安装MySQL 5.7

佐手、 提交于 2021-02-07 06:38:19
CentOS 7之后的版本yum的默认源中使用MariaDB替代原先MySQL,因此安装方式较为以往有一些改变: 下载mysql的源 wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm 安装yum库 yum localinstall -y mysql57-community-release-el7-7.noarch.rpm 安装MySQL yum install -y mysql-community-server 启动MySQL服务 systemctl start mysqld.service MySQL5.7加强了root用户的安全性,因此在第一次安装后会初始化一个随机密码,以下为查看初始随机密码的方式(此命令只能用于查询初始密码) grep 'temporary password' /var/log/mysqld.log 结果如下: 使用初始随机密码登录后MySQL会强制要求修改密码,否则无法正常使用,(密码必须包含小写、大写字母及特殊字符,当然也有其他方法不受此限制,再次不多做描述),修改方法如下: SET PASSWORD = PASSWORD('your new password'); ALTER USER 'root'@'localhost' PASSWORD EXPIRE

Linux——安装OpenSSH服务(CentOS系统默认安装了openssh)

南楼画角 提交于 2021-02-07 04:52:33
转自: https://blog.csdn.net/xiaoyu19910321/article/details/76944141 1.安装OpenSSH服务(CentOS系统默认安装了openssh) yum install openssh-server -y 2.配置OpenSSH服务(默认的配置已可以正常工作) OpenSSH的主配置文件:/etc/ssh/sshd_config 常见的配置选项: Port=22 设置SSH的端口号是22(默认端口号为22) Protocol 2 启用SSH版本2协议 ListenAddress 192.168.0.222 设置服务监听的地址 DenyUsers user1 user2 foo 拒绝访问的用户(用空格隔开) AllowUsers root osmond vivek 允许访问的用户(用空格隔开) PermitRootLogin no 禁止root用户登陆 PermitEmptyPasswords no 用户登陆需要密码认证 PasswordAuthentication yes 启用口令认证方式 3.重启OpenSSH服务 service sshd restart 4.客户端通过ssh远程连接服务器 ssh username@hostname(hostIP) 如:ssh user1@192.168.10.10 5

Default python /usr/bin/python instead of /usr/local/bin/python

ε祈祈猫儿з 提交于 2021-02-07 03:26:31
问题 I have both python2.6 and python2.7 installed in my CentOS box. python2.6 is installed at /usr/bin/python and i have installed python2.7 from source at location /usr/local/bin/python after the installation my default python is changed to python2.7 instead of pythn2.6 at /usr/bin , I want to use python 2.6 at /usr/bin/python . I have tried following things already nothing worked. I have created symlink and made it point to python 2.6 at /usr/bin I have modified my default python path in .bash

Django Celery Beat admin updating Cron Schedule Periodic task not taking effect

半世苍凉 提交于 2021-02-06 20:51:28
问题 I'm running a site using Django 10, RabbitMQ, and Celery 4 on CentOS 7. My Celery Beat and Celery Worker instances are controlled by supervisor and I'm using the django celery database scheduler. I've scheduled a cron style task using the cronsheduler in Django-admin. When I start celery beat and worker instances the job fires as expected. But if a change the schedule time in Django-admin then the changes are not picked up unless I restart the celery-beat instance. Is there something I am

Django Celery Beat admin updating Cron Schedule Periodic task not taking effect

扶醉桌前 提交于 2021-02-06 20:48:21
问题 I'm running a site using Django 10, RabbitMQ, and Celery 4 on CentOS 7. My Celery Beat and Celery Worker instances are controlled by supervisor and I'm using the django celery database scheduler. I've scheduled a cron style task using the cronsheduler in Django-admin. When I start celery beat and worker instances the job fires as expected. But if a change the schedule time in Django-admin then the changes are not picked up unless I restart the celery-beat instance. Is there something I am