yum -y install gcc automake autoconf libtool make
yum -y install gcc gcc-c++ glibc
以上已经安装了可以不用安装
yum -y install libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel sqlite-devel sqlite
1. wget https:
2. tar -xvf oniguruma-6.9.4.tar.gz
3. cd oniguruma-6.9.4/
4. ./autogen.sh
5. ./configure --prefix=/usr --libdir=/lib64
6. make && make install
cd /home
wget https:
tar -zxvf php-7.4.16.tar.gz
cd php-7.4.16
./configure --prefix=/usr/local/php --enable-fpm --with-mcrypt --enable-mbstring --disable-pdo --with-curl --disable-debug --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-mysqli --with-gd --with-jpeg-dir
make all install
方式一 命令都对但是可能进不去
安装好后命令放着吧
安装php的openssl扩展方式
1. cd/home/php-7.4.16/ext/openssl
2. mv config0.m4 config.m4
3. /usr/local/php/bin/phpize
4. ./configure --with-php-config=/usr/local/php/bin/php-config
5. make && make install
6. cp /home/php-7.4.16/php.ini-production /usr/local/php/lib/php.ini
方式二和上面一段一样
1 cd /php-7.4.16
2 ls
3 cd ext/
ls
cd openssl/
pwd
mv config0.m4 config.m4
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
cp /home/php-7.4.16/php.ini-production /usr/local/php/lib/php.ini
vim /usr/local/php/lib/php.ini
cp /usr/local/php/bin/php /usr/sbin/
vim是为了打开oppenssl扩展
代表php已经安装成功
vim记得 把openssl打开
下面两行必须执行
yum install git
yum install zip unzip php-zip
下面一行是composer要的token但是你们可以无视
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
token
点进去以后 生成token的地址也给了 https://github.com/settings/tokens
点就完事了
curl -sS https:
mv composer.phar /usr/local/bin/composer
composer create-project topthink/think tp6
切换国内镜像
composer config -g repo.packagist composer https:
php think version
|