因为最近想回顾自己在大学期间写的毕设(用的世界上最好的语言php
),奈何以前常用phpstudy,现在在deepin上不能用了,需要自己再安装一下环境。都Linux了,自然是编译安装了,只能不嫌麻烦的来弄一下了(==!)
电脑上有原来为freenom
续期时安装的PHP,不能用,遂重新安装一下
BASH
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| whereis php.
cd ~/Downloads
wget https://master.dl.sourceforge.net/project/freetype/freetype2/2.4.10/freetype-2.4.10.tar.gz?viasf=1
tar -zxvf freetype-2.4.10.tar.gz cd freetype-2.4.10
./configure --prefix=/usr/local/freetype make && sudo make install
wget -c https://www.php.net/distributions/php-7.3.3.tar.gz
tar -zxvf php-7.3.3.tar.gz && cd php-7.3.3
sudo apt install g++ autoconf openssl libssl-dev libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev libxml2 libxml2-dev libxslt1-dev libzip-dev curl libcurl4-gnutls-dev
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-libdir=/lib/x86_64-linux-gnu --disable-rpath --enable-fpm --with-fpm-user=choi --with-fpm-group=choi --with-openssl --enable-bcmath --with-zlib --with-curl --enable-exif --enable-ftp --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr/local/freetype --with-gettext --with-mhash --enable-intl --enable-mbstring --enable-mbregex --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --with-xmlrpc --with-libxml-dir=/usr --with-iconv-dir --with-xsl --enable-zip --with-libzip --enable-mysqlnd
make -j4
sudo make install
sudo ln -s /usr/local/php/sbin/php-fpm /usr/sbin/php-fpm
vim ~/.bashrc
export PATH=/usr/local/php/bin:$PATH
source ~/.bashrc
php -v
|
实话说还是感觉php不好用,算啦,还是不纠结以前的问题啦!@-@
参考链接