4yumãCentos7 yumַʧЧʹðyum

------------------------------------------------------------------------------------
cannot find a valid baseurl for repocentos-sclo-rh/x86 64 ô
------------------------------------------------------------------------------------
cd /etc/yum.repos.d/
mv CentOS-SCLo-scl.repo CentOS-SCLo-scl.repo.bak
mv CentOS-SCLo-scl-rh.repo CentOS-SCLo-scl-rh.repo.bak

vim CentOS-SCLo-rh.repo
 
дϢ
----------------------------- 
[centos-sclo-rh]
name=CentOS-7 - SCLo rh
baseurl=https://mirrors.aliyun.com/centos/7/sclo/x86_64/rh/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

------------------------------------------------------------------------------------
Cannot find a valid baseurl for repo: extras/7/x86_64 ô
------------------------------------------------------------------------------------
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
vi CentOS-Base.repo
-----------------------------
[base]
name=CentOS-7 - Base
baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[updates]
name=CentOS-7 - Updates
baseurl=https://mirrors.aliyun.com/centos/7/updates/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[extras]
name=CentOS-7 - Extras
baseurl=https://mirrors.aliyun.com/centos/7/extras/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.aliyun.com/centos/7/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

-----------------------------
yum clean all
 
yum makecache


##########################################################################################################
# 5. װNginx
yum install -y nginx
ʾNo package nginx availableȰװyum install epel-release yum install -y nginx
systemctl enable nginx

vim /etc/nginx/nginx.conf

httpڵ㣺
    include /data/nginx/conf.d/*.conf;
#ϴ    
    client_max_body_size 200m;

mkdir -p /data/nginx/conf.d
systemctl start nginx

# 6. װPHP7.2

yum install epel-release
yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php72
yum install yum-utils
yum-config-manager --enable remi-php72


# 7. װphpչ
yum install php-common php-fpm php-opcache php-gd php-mysqlnd php-mbstring php-pecl-redis php-pecl-memcached php-devel php-bcmath php-intl 

yum install php-xml php-gmp php-posix
// 
yum install php-pgsql



# 8. ûû

޸usergroupΪwww
groupadd www
adduser -g www www
vim /etc/php-fpm.d/www.conf

group  user Ϊ www
# 9. ÿ
systemctl enable php-fpm
systemctl start php-fpm
# 10. ĿĿ¼
mkdir -p /data/www
mkdir -p /data/logs/web
chmod 777 /data/logs/web

# 11. װcomposer
cd /home
curl -sS https://getcomposer.org/installer | php
php composer.phar
mv composer.phar /usr/local/bin/composer
chmod 744 /usr/local/bin/composer
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

##########################################################################################################

װmcryptչ

cd /data

yum -y install libmcrypt libmcrypt-devel mcrypt mhash

wget  http://pecl.php.net/get/mcrypt-1.0.1.tgz

tar xf mcrypt-1.0.1.tgz

cd mcrypt-1.0.1

phpize

./configure --with-php-config=/usr/bin/php-config


make && make install

-------------------------------------------------

mcryptչ

cd /etc/php.d
cp 20-bcmath.ini 20-mcrypt.ini
vi 20-mcrypt.ini

soļ

systemctl stop php-fpm
systemctl start php-fpm

php -m | grep mcrypt

-----------------------------------------
zip װ
-------------------------------------------
Class ZipArchive not foundװzipչ


װzipԼlibzip

libzipصַhttps://libzip.org/download/

zipصַhttp://pecl.php.net/package/zip


չ

wget --no-check-certificate https://nih.at/libzip/libzip-1.2.0.tar.gz 
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0/
./configure
make
make install


wget http://pecl.php.net/get/zip
tar -zxvf zip-1.22.6.tgz

cd zip-x.x.x

phpize

./configure --with-php-config=/usr/bin/php-config


make

error: /usr/local/include/zip.h:59:21: fatal error: zipconf.h: No such file or directory
// ֱֶƹȥ
cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h

make install

cd /etc/php.d
cp 20-bcmath.ini 20-zip.ini
vi zip.ini

soļ

systemctl stop php-fpm
systemctl start php-fpm

php -m | grep zip