Ali cloud for the first time set up lnmp environment (Centos8)
This year, because of the epidemic, as over a small college students have to stay home, playing computer, inadvertently found Ali cloud free delivery server for six months, I was rushed to the White prostitute under, had to say really fragrant! ! ! End of prostitution server, I also started to try to build lnmp. . .
Install nginx
yum -y install nginx
(This step does not encounter any pit, is quickly done!)
Start nginx
service nginx start
Set nginx server boot from the start
systemctl enable nginx service
Check the boot from the start whether the device is successfully set
systemctl list -dependencies | grep nginx
Install php
download dependent libraries
$ yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
Php download source, extract
wget http://cn2.php.net/get/php-7.4.3.tar.gz
tar -zxvf php-7.4.3.tar.gz
Into the directory, compiled
cd php-7.4.3
$ ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --enable-mbstring --with-openssl --enable-ftp --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pear --enable-sockets --with-freetype-dir=/usr --with-zlib --with-libxml-dir=/usr --with-xmlrpc --enable-zip --enable-fpm --enable-xml --enable-sockets --with-gd --with-zlib --with-iconv --enable-zip --with-freetype-dir=/usr/lib/ --enable-soap --enable-pcntl --enable-cli --with-curl
(This problem began to come !!!!!)
questions the lack of sqlite package
yum -y install sqlite sqlite-devel (this is relatively simple)
lack oniguruma
this is really not toss out (probably because Centos8 reasons), has been show this package is missing, no less frustrating. . . Finally Google Dafa is good, I have to say, Google really powerful.
Valley found this method to install oniguruma the song:
(Get the source, extract)
wget https://github.com/kkos/oniguruma/archive/v6.9.4.tar.gz -O oniguruma-6.9.4.tar.gz
tar -zxf oniguruma-6.9.4.tar.gz
cd oniguruma-6.9.4
(Compiler installed)
./autogen.sh && ./configure --prefix=/usr
make && make install
Finally, go back to compile php this step, finally succeeded! ! ! yes! ! !
ps: compile and install the most annoying, the idea is based on error, to install the missing packages, first of all what is missing bag, yum list | grep * see the system source there, if there is a direct yum -y install * like, If not, then the internet Baidu, ha ha ha
systemctl php-fpm start
Installation mysql8
finally the last step! ! !
This small step over did not encounter any pit, direct look at it for a blog on the operation down
reference blog: https: //blog.csdn.net/qq_43317529/article/details/83039252
This is the first attempt to build a small series lnmp, thanks CSDN help everyone on the article, if there are any deficiencies wrong place, please feel free to enlighten me, help me to point it out, thank you! ! !
This is also the small series the first to write blog, write is not good, just the idea of it, might be newcomers have a little bit of help, but also because there is not no one! ! ! (Ha ha ha), it is right when recording yourself, check back later turned estimated to be a lot of emotion, ha ha ha ha! ! ! ! ! !