useradd -s /sbin/nologin -M mysql
vi /etc/profileexport PATH="/usr/local/mysql/bin"source /etc/profile
sudo yum install gcc gcc-c++ libxml2 libxml2-devel curl-devel autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel
LAMP installation tutorial
This article mainly introduces the LAMP installation tutorial, which has certain reference value. Now I share it with you. Friends in need can refer to it
Linux configuration
Install wget
sudo yum install wget
Update linux library
sudo yum -y update
Install vim
sudo yum install vim
Install zip and unzip
sudo yum install zip unzip;
Configuration display
vi ~/.vimrc输入:set nu 后退出保存
Install Apache
Install dependency packages
sudo yum install gcc gcc-c++ perl perl-devel expat expat-devel autoconf libtool openssl openssl-devel
Install apr
下载地址:https://apr.apache.orgtar -zxvf apr-1.6.3.tar.gzcd apr-1.6.3./configure --prefix=/usr/local/apr make && make install
Install apr-util
下载地址:https://apr.apache.org/tar -zxvf apr-util-1.6.1.tar.gz cd apr-util-1.6.1./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr make && make install
Install pcre
下载地址:ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ tar zxvf pcre-8.42.tar.gzcd pcre-8.42./configure --prefix=/usr/local/pcre make && make install
Install Apache
tar zxvf httpd-2.4.33.tar.gz cd httpd-2.4.33 ./configure \ --prefix=/usr/local/apache \--enable-ssl \--enable-so \--with-apr=/usr/local/apr \--with-apr-util=/usr/local/apr-util \--with-pcre=/usr/local/pcremake && make install
Configure environment variables
vi /etc/profileexport PATH="$PATH:/usr/local/apache/bin"source /etc/profile
Set auto-start at boot
vim /etc/rc.d/rc.local/usr/local/apache/bin/apachectl start
Other configurations
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bakcp /usr/local/apache/conf/extra/httpd-vhosts.conf /usr/local/apache/conf/extra/httpd-vhosts.conf.bakvi /usr/local/apache/conf/httpd.conf去掉152行前面的#号,开启重写模块去掉194行前面的#号,去除错误信息239行允许重写 AllowOverride All 开启Apache: apachectl -k start
Turn off the firewall:
CentOS6:service iptables stop 临时关闭 chkconfig --level 2345 iptables off 永久关闭CentOS7:systemctl stop firewalld.service #令关闭防火墙systemctl disable firewalld.service #关闭防火墙开机自启动通过浏览器输入IP测试成功
Install MySQL
mysql compilation and installation tutorial article
http://www.runoob.com/linux/mysql-install-setup.html
Installation dependencies
sudo yum install gcc gcc-c++ cmake ncurses-devel
useradd -s /sbin/nologin -M mysql
Copy after login
Install MySQLuseradd -s /sbin/nologin -M mysql
tar zxvf mysql-5.6.40.tar.gz
cd mysql-5.6.40
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/tmp/mysql.sock \-DMYSQL_DATADIR=/usr/local/mysql/data \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_ci \-DWITH_EXTRA_CHARSETS=all \-DWITH_MYISAM_STORAGE_ENGINE=1 \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DWITH_MEMORY_STORAGE_ENGINE=1 \-DWITH_READLINE=1 \-DWITH_INNODB_MEMCACHED=1 \-DWITH_DEBUG=OFF \-DWITH_ZLIB=bundled \-DENABLED_LOCAL_INFILE=1 \-DENABLED_PROFILING=ON \-DMYSQL_MAINTAINER_MODE=OFF \-DMYSQL_TCP_PORT=3306make
make install
Copy after login
Modify permissionstar zxvf mysql-5.6.40.tar.gz cd mysql-5.6.40 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ -DMYSQL_UNIX_ADDR=/usr/local/mysql/tmp/mysql.sock \-DMYSQL_DATADIR=/usr/local/mysql/data \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_ci \-DWITH_EXTRA_CHARSETS=all \-DWITH_MYISAM_STORAGE_ENGINE=1 \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DWITH_MEMORY_STORAGE_ENGINE=1 \-DWITH_READLINE=1 \-DWITH_INNODB_MEMCACHED=1 \-DWITH_DEBUG=OFF \-DWITH_ZLIB=bundled \-DENABLED_LOCAL_INFILE=1 \-DENABLED_PROFILING=ON \-DMYSQL_MAINTAINER_MODE=OFF \-DMYSQL_TCP_PORT=3306make make install
cd /usr/local/mysqlchown mysql.mysql /usr/local/mysql/datamkdir tmpchown mysql.mysql /usr/local/mysql/tmp rm -f /etc/my.cnf cp support-files/my-default.cnf /etc/my.cnf scripts/mysql_install_db --defaults-file=/etc/my.cnf --user=mysql
cd /usr/local/mysqlcp support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
Copy after login
Configure environment variablescd /usr/local/mysqlcp support-files/mysql.server /etc/init.d/mysqld chkconfig --add mysqld
vi /etc/profileexport PATH="/usr/local/mysql/bin"source /etc/profile
Copy after login
Start MySQLvi /etc/profileexport PATH="/usr/local/mysql/bin"source /etc/profile
service mysqld start
mysql -u root -p #第一次登陆不需要密码,回车即可set password for root@localhost = password('root'); #修改密码
Copy after login
Install PHPInstall dependency packagesservice mysqld start mysql -u root -p #第一次登陆不需要密码,回车即可set password for root@localhost = password('root'); #修改密码
sudo yum install gcc gcc-c++ libxml2 libxml2-devel curl-devel autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel
Copy after login
Install PHPsudo yum install gcc gcc-c++ libxml2 libxml2-devel curl-devel autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel
tar zxvf php-7.2.3.tar.gz
cd php-7.2.3
./configure \
--prefix=/usr/local/php \--enable-mysqlnd \--with-mysqli=mysqlnd \--with-pdo-mysql=mysqlnd \--with-mysql-sock=/usr/local/mysql/tmp/mysql.sock \--with-apxs2=/usr/local/apache/bin/apxs \--with-zlib \--with-gd \--with-png-dir \--with-jpeg-dir \--with-freetype-dir \--with-openssl \--enable-mbstring \--enable-xml \--enable-zip \--enable-sockets \--with-curlmake && make install
Copy after login
Configure Apache and PHP Association (about 154 lines)tar zxvf php-7.2.3.tar.gz cd php-7.2.3 ./configure \ --prefix=/usr/local/php \--enable-mysqlnd \--with-mysqli=mysqlnd \--with-pdo-mysql=mysqlnd \--with-mysql-sock=/usr/local/mysql/tmp/mysql.sock \--with-apxs2=/usr/local/apache/bin/apxs \--with-zlib \--with-gd \--with-png-dir \--with-jpeg-dir \--with-freetype-dir \--with-openssl \--enable-mbstring \--enable-xml \--enable-zip \--enable-sockets \--with-curlmake && make install
vi /usr/local/apache/conf/httpd.conf# 加入 在 加载了PHP模块之后<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch># 保存,退出,重启
Copy after login
Configuring environment variablesvi /usr/local/apache/conf/httpd.conf# 加入 在 加载了PHP模块之后<FilesMatch "\.php$"> SetHandler application/x-httpd-php </FilesMatch># 保存,退出,重启
vi /etc/profile
export PATH="$PATH:/usr/local/php/bin"source /etc/profile
cp /root/package/php-7.2.3/php.ini-development /usr/local/php/lib/php.ini
vi /usr/local/php/lib/php.inidate.timezone = PRC (大约在932行)
vi /usr/local/apache/conf/httpd.conf258行,默认首页加入index.php483行,开启虚拟主机支持
vi /usr/local/apache/conf/extra/httpd-vhosts.conf
vi /usr/local/apache/conf/extra/httpd-vhosts.conf<VirtualHost *:80>
ServerAdmin www.huiwan.com
DocumentRoot "/mnt/hgfs/web/huiwan"
ServerName www.huiwan.com #ErrorLog "logs/dummy-host2.example.com-error_log"
#CustomLog "logs/dummy-host2.example.com-access_log" common <Directory "/mnt/hgfs/web/huiwan">
Options indexes Multiviews
AllowOverride All
Require all granted </Directory></VirtualHost>
Copy after loginRelated recommendations:
vi /etc/profile export PATH="$PATH:/usr/local/php/bin"source /etc/profile cp /root/package/php-7.2.3/php.ini-development /usr/local/php/lib/php.ini vi /usr/local/php/lib/php.inidate.timezone = PRC (大约在932行) vi /usr/local/apache/conf/httpd.conf258行,默认首页加入index.php483行,开启虚拟主机支持 vi /usr/local/apache/conf/extra/httpd-vhosts.conf vi /usr/local/apache/conf/extra/httpd-vhosts.conf<VirtualHost *:80> ServerAdmin www.huiwan.com DocumentRoot "/mnt/hgfs/web/huiwan" ServerName www.huiwan.com #ErrorLog "logs/dummy-host2.example.com-error_log" #CustomLog "logs/dummy-host2.example.com-access_log" common <Directory "/mnt/hgfs/web/huiwan"> Options indexes Multiviews AllowOverride All Require all granted </Directory></VirtualHost>
LAMP is based on the php module to implement a detailed graphic explanation of building a personal blog
linux
CentOS5 builds lamp environment
The above is the detailed content of LAMP installation tutorial. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Dewu APP is currently a very popular brand shopping software, but most users do not know how to use the functions in Dewu APP. The most detailed usage tutorial guide is compiled below. Next is the Dewuduo that the editor brings to users. A summary of function usage tutorials. Interested users can come and take a look! Tutorial on how to use Dewu [2024-03-20] How to use Dewu installment purchase [2024-03-20] How to obtain Dewu coupons [2024-03-20] How to find Dewu manual customer service [2024-03-20] How to check the pickup code of Dewu [2024-03-20] Where to find Dewu purchase [2024-03-20] How to open Dewu VIP [2024-03-20] How to apply for return or exchange of Dewu

Installing Android applications on Linux has always been a concern for many users. Especially for Linux users who like to use Android applications, it is very important to master how to install Android applications on Linux systems. Although running Android applications directly on Linux is not as simple as on the Android platform, by using emulators or third-party tools, we can still happily enjoy Android applications on Linux. The following will introduce how to install Android applications on Linux systems.

After rain in summer, you can often see a beautiful and magical special weather scene - rainbow. This is also a rare scene that can be encountered in photography, and it is very photogenic. There are several conditions for a rainbow to appear: first, there are enough water droplets in the air, and second, the sun shines at a low angle. Therefore, it is easiest to see a rainbow in the afternoon after the rain has cleared up. However, the formation of a rainbow is greatly affected by weather, light and other conditions, so it generally only lasts for a short period of time, and the best viewing and shooting time is even shorter. So when you encounter a rainbow, how can you properly record it and photograph it with quality? 1. Look for rainbows. In addition to the conditions mentioned above, rainbows usually appear in the direction of sunlight, that is, if the sun shines from west to east, rainbows are more likely to appear in the east.

1. First open WeChat. 2. Click [+] in the upper right corner. 3. Click the QR code to collect payment. 4. Click the three small dots in the upper right corner. 5. Click to close the voice reminder for payment arrival.

If you have used Docker, you must understand daemons, containers, and their functions. A daemon is a service that runs in the background when a container is already in use in any system. Podman is a free management tool for managing and creating containers without relying on any daemon such as Docker. Therefore, it has advantages in managing containers without the need for long-term backend services. Additionally, Podman does not require root-level permissions to be used. This guide discusses in detail how to install Podman on Ubuntu24. To update the system, we first need to update the system and open the Terminal shell of Ubuntu24. During both installation and upgrade processes, we need to use the command line. a simple

While studying in high school, some students take very clear and accurate notes, taking more notes than others in the same class. For some, note-taking is a hobby, while for others, it is a necessity when they easily forget small information about anything important. Microsoft's NTFS application is particularly useful for students who wish to save important notes beyond regular lectures. In this article, we will describe the installation of Ubuntu applications on Ubuntu24. Updating the Ubuntu System Before installing the Ubuntu installer, on Ubuntu24 we need to ensure that the newly configured system has been updated. We can use the most famous "a" in Ubuntu system

Detailed steps to install Go language on Win7 computer Go (also known as Golang) is an open source programming language developed by Google. It is simple, efficient and has excellent concurrency performance. It is suitable for the development of cloud services, network applications and back-end systems. . Installing the Go language on a Win7 computer allows you to quickly get started with the language and start writing Go programs. The following will introduce in detail the steps to install the Go language on a Win7 computer, and attach specific code examples. Step 1: Download the Go language installation package and visit the Go official website

PhotoshopCS is the abbreviation of Photoshop Creative Suite. It is a software produced by Adobe and is widely used in graphic design and image processing. As a novice learning PS, let me explain to you today what software photoshopcs5 is and how to use photoshopcs5. 1. What software is photoshop cs5? Adobe Photoshop CS5 Extended is ideal for professionals in film, video and multimedia fields, graphic and web designers who use 3D and animation, and professionals in engineering and scientific fields. Render a 3D image and merge it into a 2D composite image. Edit videos easily
