centos7

Unable to start postgresql service on CentOS 7

只谈情不闲聊 提交于 2019-12-03 04:52:12
问题 Unable to start postgresql-9.5 on CentOS 7. I followed this page - https://wiki.postgresql.org/wiki/YUM_Installation - for installing the database server on CentOS. I tried the same after setting setenforce 0 , and that did not help either. I am doing all operations as root . systemctl start postgresql-9.5.service Job for postgresql-9.5.service failed because the control process exited with error code. See "systemctl status postgresql-9.5.service" and "journalctl -xe" for details. And here is

Combine JPG's into one PDF with PHP

二次信任 提交于 2019-12-03 03:42:50
I'm trying to take a series of JPG's and combine them into one PDF file with each JPG being it's own page. I'm guessing ImageMagick is the best way to do this, however I can't seem to figure out how to combine the files. I see the combineImages method here : http://php.net/manual/en/imagick.combineimages.php But cannot find any examples. I'm new to imagemagick so I'm still trying to figure out the syntax. Can ImageMagick do what I'm asking? And if so can someone write up a quick example? Thanks! rostok In PHP you can use: $images = array("file1.jpg", "file2.jpg"); $pdf = new Imagick($images);

Upgrade docker on CentOS 7

烂漫一生 提交于 2019-12-03 03:41:46
问题 I'm running centos 7 and have installed docker on host using epel packages: yum install epel-release yum install docker But the docker version is- Docker version 0.11.1-dev, build 02d20af/0.11.1 The latest stable branch of docker is 1.2 I'm running couple of containers on this host, so how can i update docker safely on this host? yum update docker does not update to the latest version as the epel repo has old package. 回答1: Note that current stable version of Docker is actually 1.3, not 1.2.

django can't find new sqlite version? (SQLite 3.8.3 or later is required (found 3.7.17))

被刻印的时光 ゝ 提交于 2019-12-03 03:02:20
I've cloned a django project to a Centos 7 vps and I'm trying to run it now, but I get this error when trying to migrate : $ python manage.py migrate django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17). When I checked the version for sqlite, it was 3.7.17, so I downloaded the newest version from sqlite website and replaced it with the old one, and now when I version it, it gives: $ sqlite3 --version 3.27.2 2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0f6d7 Still when I try to migrate the project, I get the exact same

Php has its own /tmp in /tmp/systemd-private-nABCDE/tmp when accessed through nginx

空扰寡人 提交于 2019-12-03 01:25:59
I found strange behaviour concerning php and /tmp folder. Php uses another folder when it works with /tmp . Php 5.6.7, nginx, php-fpm. I execute the same script in two ways: via browser and via shell. But when it is launched via browser, file is not in real /tmp folder: <?php $name = date("His"); echo "File /tmp/$name.txt\n"; shell_exec('echo "123" > /tmp/'.$name.'.txt'); var_dump(file_exists('/tmp/'.$name.'.txt')); var_dump(shell_exec('cat /etc/*release | tail -n 1')); php -f script.php File /tmp/185617.txt bool(true) string(38) "CentOS Linux release 7.0.1406 (Core) Where is the file? In /tmp

centOS 7 安装nodeJs & mysql 常见问题

╄→гoц情女王★ 提交于 2019-12-02 23:57:18
方法一: yum install npm # 安装好后 node -v #v0.10.xx #pm2 开机自启 nodejs 服务器 1、启动想开机启动的项目 pm2 starat app.js 2、保存 pm2 save 3、开机设置 pm2 startup centos 4、chmod +x /etc/init.d/pm2-init.sh 5、chkconfig --add pm2-init.sh 执行完之后,系统也回复了 MYSQL #安装 1. 下载mysql的repo源 $ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2. 安装mysql-community-release-el7-5.noarch.rpm包 $ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm 安装这个包后,会获得两个mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo。 3. 安装mysql $ sudo yum install mysql-server yum install mysql mysql yum

How do I make a keyboard shortcut for Terminal in CentOS 7

耗尽温柔 提交于 2019-12-02 18:48:25
Just installed CentOS 7 on my laptop. This new version of CentOS is pretty different from older ones, and I cannot make a keyboard shortcut for Terminal in older ways. Dose anybody know how ? Go to Settings >>> keyboard >>> Shortcuts tab >>> Custom Shortcuts >>> click "+" Name: Terminal Shortcut Command: gnome-terminal Now a new shortcut added with status "disabled". Click on "disabled" word and assign your shortcut. For me, I prefer Ctrl + Alt + t to run Terminal On Gnome 3 GUI you may follow these 16 steps, Click “Activities” on the top left Click “Show Applications” on the bottom left Click

Upgrade docker on CentOS 7

无人久伴 提交于 2019-12-02 17:34:26
I'm running centos 7 and have installed docker on host using epel packages: yum install epel-release yum install docker But the docker version is- Docker version 0.11.1-dev, build 02d20af/0.11.1 The latest stable branch of docker is 1.2 I'm running couple of containers on this host, so how can i update docker safely on this host? yum update docker does not update to the latest version as the epel repo has old package. Thomasleveil Note that current stable version of Docker is actually 1.3, not 1.2. See the Docker CHANGELOG to discover the latest version. Before upgrading your docker host, you

resize2fs: Bad magic number in super-block while trying to open

懵懂的女人 提交于 2019-12-02 13:50:18
I am trying to resize a logical volume on CentOS7 but am running into the following error: resize2fs 1.42.9 (28-Dec-2013) resize2fs: Bad magic number in super-block while trying to open /dev/mapper/centos-root Couldn't find valid filesystem superblock. I have tried adding a new partition (using fdisk) and using vgextend to extend the volume group, then resizing. Resize worked fine for the logical volume using lvextend, but it failed at resize2fs. I have also tried deleting an existing partition (using fdisk) and recreating it with a larger end block, then resizing the physical volume using lvm

Multiple IP addresses on Google Cloud Compute

心已入冬 提交于 2019-12-02 13:24:44
I'm trying to setup my VM based on CentOS 7 with more than one internal IP address, but it doesn't seem to be as straightforward as Amazon AWS. You can add internal IP for VM using routes. ( https://cloud.google.com/compute/docs/reference/beta/routes ) Here an example of setting another static internal IP to VM: https://cloud.google.com/compute/docs/networking#staticnetworkaddress 来源: https://stackoverflow.com/questions/37979603/multiple-ip-addresses-on-google-cloud-compute