,

Part IV (1): Installation and configuration of Linux web environments commonly used by enterprises (apache, php, mysql)

In the previous article, we talked about basic software package management and file operations, and now we have to install something useful! In this article, I will write a method to install apache, php, mysql with yum, and finally run phpMyAdmin to manage the database. 1. How to install apache on a Linux host Because we installed the completed centos system before, the system may have already installed apache, so let’s check whether it is really installed Type the command first, yum list installed httpd* , if you see that httpd is already installed, then yum -y remove httpd* Uninstall it. Just review the software management taught before. After uninstalling, install apache now, After the installation is complete, then, add httpd to boot (use chkconf httpd on to start the boot, check the status with chkconfig –list httpd) After setting up the boot, let’s check again, is apache started at this moment? (with service httpd status) service httpd status It is to check the status of httpd. The result of stop is shown in the figure, indicating that it is not running Let’s open this service again service httpd start , but we also saw the reminder sent to us…

Rpm installs phpfpm, linuxrpm installs phpfpm, mysql, nginx and assembles ftp

1. If there is no ftp software, directly install and run the following program: yum -y install vsftpd chkconfig vsftpd on The installation has the following error : Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL ERROR 6 – “Couldn’t resolve host 'mirrorlist.centos.org'” Error: Cannot find a valid baseurl for repo: base p> Because of the lack of DNS , the solution is as follows : configure resolv.conf in the /etc directory and add nameserver IP : [root@localhost ~]# vi /etc/resolv.conf #The following address is Fujian Telecom DNS nameserver 218.85.157.99 2. Command Start vsftpd : service vsftpd start Stop vsftpd: service vsftpd stop Restart vsftpd: service vsftpd restart 1. Install nginx+php+mysql wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm //Download rpm file rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm //Unzip rpm -qa | grep nginx Check whether nginx is added to the source path Install php mysql nginx yum install mysql mysql-server php php-mysql php-fpm nginx If the source address cannot be found, Please find the updated third-party source library in the tips yum install php-cli php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy php-common php-devel For separate installation, please refer to the following 1.1. Install php-fpm separately service yum install -y php php-mysql…

134056_8np9_2490061.png

PHP basics – PHP, MySQL, Apache configuration

2019 unicorn companies pay a lot of money to recruit Python engineers>>> 1. Apache server 1. Apache directory structure Adding environment variables is the Use the Apache main program directory. 2.Apache CMD command In Start in CMD mode net start apache2.2 //startnet stop apache2 .2 //Stop View the modules that Apache has loaded cmd named prompt : httpd.exe -M //Check which modules Apache has loaded Configuration file syntax check under CMD In cmd mode : set path //Display the directory list in the environment variablehttpd.exe -t //Configuration file syntax check ( first search in the root directory of the C disk , if there is no , then go to the environment variable In the specified directory, find ) Modify environment variables Right click on the computer icon – properties – advanced system settings – environment variables – edit Copy it into Notepad: D:\wamp\ php\;D:\Program Files (x86)\ActiveState Komodo Edit 9 nightly\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; D:\Program Files\Microsoft SQL Server\110\DTS\Binn\;D:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;D:\Program Files\Microsoft SQL Server\110\Tools \Binn\;D:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;D:\ Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools \Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Program Files (x86)\nodejs\;D:\Program Files (x86)\QuickTime\QTSystem\;D:\ Program Files (x86)\Calibre2\;D:\Program Files (x86)\Skype\Phone\ Add the bin…

Configure php, nginx, mysql, redis under mac

Configure php, nginx, mysql, redis under mac > Delete the original configuration cd /usr/bin/ && sudo rm -rf php php-config phpdoc phpizecd /usr/include && sudo rm -rf phpcd /usr/lib && sudo rm -rf phpcd /usr/sbin && sudo rm -rf php-fpmcd /usr/share && sudo rm -rf phpcd /usr/share /man/man1 && sudo rm -rf php-config.1 php.1 phpize.1cd /usr/share/man/man8 && sudo rm -rf php-fpm.8cd /usr/bin / && sudo rm -rf php php-config phpdoc phpize Install php7.1 brew install homebrew/php/php71 brew install homebrew/php/php71-mcrypt After installation, it will come with PHP-FPM Start PHP-FPM Add a symlink first ln -s /usr/local/opt/php71/sbin/php-fpm /usr/local/bin/php-fpm It is also necessary to set the boot startup ln -sfv /usr/local/opt/php71/*.plist ~/Library/LaunchAgents Start launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php71.plist Stop launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php71.plist force kill sudo pkill – INT -o php-fpm Make sure it is running and listening on port 9000 sudo lsof -Pni4 | grep LISTEN | grep php Or view through the port sudo lsof -i tcp:9000 Second, install nginx Uninstall brew remove nginx clear configuration sudo rm – rf /usr/local/etc/nginx/ Install brew install nginx –with-http_geoip_module boot Start ln -sfv /usr/local/opt/nginx/*.plist ~/Library/LaunchAgents Start launchctl load ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist Stop launchctl unload ~/ Library/LaunchAgents/homebrew.mxcl.nginx.plist Listening to port 80 requires root permission to execute, so: sudo chown root:wheel…

Docker quickly builds a PHP, Nginx, MySQL, Redis, Xdebug, Memcached development environment and evolves

Docker quickly builds a PHP, Nginx, MySQL, Redis, Xdebug, Memcached development environment and evolves

Pain points When the author tries to start a new web project, he often falls into the tedious task of re-establishing a Docker environment. I think that when you start a new project, or quickly in order to completely isolate it from previous projects, you will also set up a new docker environment. What you will get from this article Use docker-compose container orchestration technology to start all services in one step. On the official basis, the php container also packs some commonly used extensions (with build source code, you can package it yourself if you have strong hands-on skills), php, nginx, and mysql all come with custom configuration files (easy to configure and adjust for development and testing), all for download . Structure The environment built by this article is shown in the picture above. Environment description Operating environment Mac OS 10.13.6 Virtual Box 5.2.14 Ubuntu 16.04.4 Docker 17.07.0-ce Container Nginx 1.12.1-alpine PHP-fpm 5.6 MySQL 5.7 Redis 3.2 Memcached 1.4.27 Here to explain the author’s operating environment. I installed the vbox virtual machine on the Mac machine, installed the Docker environment in the debian environment inside the virtual machine, and placed the files in the Mac environment. Through the…

Note: MAC uses brew to configure nginx, php, mysql, phpfpm, redis

I used the built-in apache and php configuration on the mac before,it was all patchwork made by Baidu,no record. This time I changed it to nginx environment & # xff0c; write a note to record it & # xff0c; for later viewing & # xff0c; also hope to borrow flowers & offer Buddha & # xff0c; to help others. The content is all pieced together from the Internet,Thank you to all the selfless and dedicated gods on the Internet. Install xcode-select When installing some applications through brew, you need to use this program to compile ( If the words are not accurate, please forgive me&#xff09 ;,So in order to avoid installation failure,It is recommended to install first; xcode-select –install install homebrew /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent. com/Homebrew/install/master/install)” [ The system will , add a series of files in the /usl/local/* directory] The above information sources : Install nginx and The configuration command is as follows brew install nginx Test modification is successful sudo nginx -t Start sudo nginx Restart sudo nginx -s reload After installing nginx, run nginx -s reload directly, the following error will occur& #xff1a; The reason for this error is , there is no nginx.pid file ;…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索