Home >Backend Development >PHP Tutorial >How to mount and switch php version and install geth

How to mount and switch php version and install geth

小云云
小云云Original
2018-03-31 11:07:581810browse

Build an Alibaba Cloud ecs. There is not enough space. Get a data disk. It cannot be used without mounting it. So there is no other way. Let’s do it:

Before partitioning and formatting the data disk, you cannot see the data disk by using the "df -h" command. You can use the "fdisk -l" command to view it.

Warm reminder: If you execute the fdisk -l command and find that there is no /dev/vdb indicating that your cloud service has no data disk, then you do not need to mount it. At this time, this tutorial is useful You are not allowed to

Partition the data disk

Execute the "fdisk -S 56 /dev/vdb" command to partition the data disk ;

According to the prompts, enter "n", "p" and "1" in sequence, press Enter twice, and "wq", the partition will start and will be completed soon.

Using the "fdisk -l" command you can see that the new partition vdb has been created.

Use the "mkfs.ext3 /dev/vdb" command to format the new partition. The formatting time varies depending on the hard disk size

echo '/dev/vdb /mnt ext3 defaults 0 0' >> /etc/fstab

##Use the "mount -a" command to mount Create a new partition and use the "df -h" command to view it.

Think about it, why not build geth first, synchronize the blocks and structures first, and then build the PHP environment?

First, create a higher version of git

(1)首先先更新系统
yum update
(2)安装依赖的包
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gccperl-ExtUtils-MakeMaker
(3)下载git源码并解压缩
wget https://github.com/git/git/archive/v2.3.0.zip
unzip v2.3.0.zip
 cd git-2.3.0
(4)编译安装
make prefix=/usr/local/git all
make prefix=/usr/local/git install
Second, install geth

git clone https://github.com/ethereum/go-ethereum.gitcd  go-ethereumgit checkout v1.7.2make gethmake all
The servers in Silicon Valley are really fast, 2 million blocks can be reduced in half an hour The synchronization is complete

php5.6 is replaced by php5.5

Record it first Apache configuration file path: /etc/httpd/conf/httpd.conf

php configuration file path is: /etc/php.ini

Check whether PHP is installed:

list installed | grep php

Use yum to install php5.5 and php-fpm

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64
yum install php55w-fpm

Put /usr/sbin in the path, because there is php-fpm here.

source /etc/profile Setting the path takes effect.

Start php-fpm

##systemctl start php-fpm

##Success Got it!

How does apche discover the relationship with PHP? There is a section in httpd.conf:

##AddType application/x-httpd-php .php

AddType application/x-httpd- php-source .phps SetHandler "proxy:fcgi://127.0.0.1:9000"



##Starting php-fpm is equivalent to starting 9000 services.

The above is the detailed content of How to mount and switch php version and install geth. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn