In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Download source code to compile and install nginx
Wget http://nginx.org/download/nginx-1.17.1.tar.gz
Tar-xvf nginx-1.17.1.tar.gz
Yum-y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
# install the compilation environment
. / configure # run the internal configuration script
Make & & make install # compilation and installation
After installing cd, go to cd / usr/local/nginx/ ls-l to check the file.
# you can see that the configuration folder, the day folder, the startup script folder, the root folder is all in here.
. / sbin/nginx # run the script to open nginx
# enter the server IP in the browser to see the nginx welcome page
two。 Install php7.0 configuration PHP support
Rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# download and install php source,
Yum-y install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64 php70w-pear.noarch php70w-process.x86_64 php70w-xml.x86_64 php70w-xmlrpc.x86_64
# all the above are php packages
To install php5.6, change the above 70 to 56, which means 55 is 5.5. the highest version is 72.
Yum install php70w-fpm.x86_64-y # install php driver support
Vim / etc/php-fpm.d/www.conf # modify php configuration
Listen = 10.1.1.111 9000 # modify the listening port to LAN ip
Listen.allowed_clients = 10.1.1.111 # allow those IP to access
Listen.allowed_clients = 10.1.1.112 # if there are multiple machines, you can add multiple entries here
Systemctl restart php-fpm.service # launch php-fpm.servce
Netstat-nltp | grep 9000 # check whether port 9000 is listening
3. Configure nginx
Vim conf/nginx.conf # appends a location configuration to location {} as follows
Location / {root html; index index.html index.htm;} location ~\ .php$ {fastcgi_pass 10.1.1.111 location 9000; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name Fastcgi_buffers 8 16k; fastcgi_buffer_size 32k;}}
. / sbin/nginx-s reload # reload configuration file
-s stop # stop
Vim html/info.php # create a php test page
# enter IP/info.php to display php status information, which means that php configuration is successful
4. Install mysql
Yum install mariadb-server-y
# here I installed the mariadb database directly on yum, which is about the same as mysql
Log in directly to mysql #. By default, mariadb root users do not have a password
MariaDB [(none)] > create user 'php'@'localhost' identified by' 123456 permissions # create a user who can only log in locally to MariaDB [(none)] > grant all privileges on *. * to 'php'@'localhost'# to give this user all permissions of the database 5. Download the phpMyadmin source code and extract it to the html folder
# unzip the downloaded files to the html directory
# Open the browser and type IP to see the login page of phpMysql, and you can log in with the account you just created (this is the web front end of mysql)
If you report such an error, you can install php-mbstring
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.