Mysql+Apache2+php5 安装
下载下列文件至/usr/local/src/
apache(Unix平台最流行的WEB服务器平台)2.tar.gz
MySQL(和PHP搭配之最佳组合)-5.0.22.tar.gz
php(做为现在的主流开发语言)-5.1.2.tar.gz
解压缩:
#tar xvz(parallels的虚拟行平台)f apache(Unix平台最流行的WEB服务器平台)2.tar.gz
#tar xvz(parallels的虚拟行平台)f MySQL(和PHP搭配之最佳组合)-5.0.22.tar.gz
#tar xvz(parallels的虚拟行平台)f php(做为现在的主流开发语言)-5.1.2.tar.gz
#cd .. //在/usr/local/目录下创建文件夹
# mkdir apache(Unix平台最流行的WEB服务器平台)
# mkdir MySQL(和PHP搭配之最佳组合)
# mkdir php(做为现在的主流开发语言)
//MySQL(和PHP搭配之最佳组合)安装过程
#cd ../MySQL(和PHP搭配之最佳组合) //找到/usr/local/MySQL(和PHP搭配之最佳组合)文件夹
#groupadd MySQL(和PHP搭配之最佳组合)
#usseradd -g MySQL(和PHP搭配之最佳组合) MySQL(和PHP搭配之最佳组合)
#cd ../MySQL(和PHP搭配之最佳组合)-5.0.22 //找到/usr/local/src/MySQL(和PHP搭配之最佳组合)-5.0.22文件夹
#./configure --prefix=/usr/local/MySQL(和PHP搭配之最佳组合) --localstatedir=/var/lib/MySQL(和PHP搭配之最佳组合)/ --with-client-ldflags=-all-static --with-MySQL(和PHP搭配之最佳组合)d-ldflags=-all-static --with-MySQL(和PHP搭配之最佳组合)d-user=MySQL(和PHP搭配之最佳组合) --enable-assembler --with-extra-charsets=all
#make ; make install
/usr/local/MySQL(和PHP搭配之最佳组合)/bin/MySQL(和PHP搭配之最佳组合)_install_db //初始化MySQL(和PHP搭配之最佳组合)
//对MySQL(和PHP搭配之最佳组合)进行配置
#chown –R root /usr/local/MySQL(和PHP搭配之最佳组合)
#chown –R MySQL(和PHP搭配之最佳组合) /var/lib/MySQL(和PHP搭配之最佳组合)/
#chgrp –R MySQL(和PHP搭配之最佳组合) /usr/local/MySQL(和PHP搭配之最佳组合)
#cp support-files/my-medium.cnf /etc/my.cnf
/usr/local/MySQL(和PHP搭配之最佳组合)/bin/MySQL(和PHP搭配之最佳组合)d_safe –user=MySQL(和PHP搭配之最佳组合) & //启动MySQL(和PHP搭配之最佳组合)
/usr/local/MySQL(和PHP搭配之最佳组合)/bin/MySQL(和PHP搭配之最佳组合)admin –u root –p password 123 //将密码改为123
enter password:
//测试一下新密码
/usr/local/MySQL(和PHP搭配之最佳组合)/bin/MySQL(和PHP搭配之最佳组合) –u root –p MySQL(和PHP搭配之最佳组合)
enter password: //如果顺利的话就能进入MySQL(和PHP搭配之最佳组合)了.
//apache(Unix平台最流行的WEB服务器平台)安装过程
./configure --prefix=/usr/local/apache(Unix平台最流行的WEB服务器平台) --enable-mods=shared=all --enable-module=so --disable-info
make
make install
apache(Unix平台最流行的WEB服务器平台)安装过程中,遇到libiconv.so.2的问题,解决方法如下:
ln –sf /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2
//在窗口栏中敲入本机IP,如果出现着名的羽毛网页,就算成功了….
//php(做为现在的主流开发语言)安装过程
./configure --prefix=/usr/local/php(做为现在的主流开发语言) --with-MySQL(和PHP搭配之最佳组合)=/usr/local/MySQL(和PHP搭配之最佳组合) --with-apxs2=/usr/local/apache(Unix平台最流行的WEB服务器平台)/bin/apxs --enable-calendar --with-openssl=/usr/ --with-config-file-path=/usr/local/php(做为现在的主流开发语言)
make
make install
cp /usr/local/src/php(做为现在的主流开发语言)-5.1.2/php(做为现在的主流开发语言).ini-dist /usr/local/lib/php(做为现在的主流开发语言).ini
#cd usr/local/apache(Unix平台最流行的WEB服务器平台)/conf
//然后打开httpd.conf在相应的地方进行修改
AddType application/x-httpd-php(做为现在的主流开发语言) .php(做为现在的主流开发语言)
AddType application/x-httpd-php(做为现在的主流开发语言)-source .php(做为现在的主流开发语言)s
DocumentRoot "/usr/local/apache(Unix平台最流行的WEB服务器平台)/htdocs"
LoadModule php(做为现在的主流开发语言)5_module modules/libphp(做为现在的主流开发语言)5.so
//把测试的.php(做为现在的主流开发语言)文件放入/usr/local/apache(Unix平台最流行的WEB服务器平台)/htdocs/,在窗口栏中如能打开页面,则大功告成了
//常见问题1:ERROR 2002: Can't connect to local MySQL(和PHP搭配之最佳组合) server through socket '/var/lib/MySQL(和PHP搭配之最佳组合)/MySQL(和PHP搭配之最佳组合).sock
' (2)
//解决方法: 权限问题
chown -R MySQL(和PHP搭配之最佳组合) /var/lib/MySQL(和PHP搭配之最佳组合)/
//常见问题2:Warning: MySQL(和PHP搭配之最佳组合) Connection Failed: Can't connect to local MySQL(和PHP搭配之最佳组合) server
// through socket '/tmp/MySQL(和PHP搭配之最佳组合).sock' (111) in /home/httpd/html/show.php(做为现在的主流开发语言) on line 9
//解决方法: 将/tmp/MySQL(和PHP搭配之最佳组合).sock link 到 /var/lib/MySQL(和PHP搭配之最佳组合) 目录里即可:
linux# ln -s /var/lib/MySQL(和PHP搭配之最佳组合)/MySQL(和PHP搭配之最佳组合).sock /tmp/MySQL(和PHP搭配之最佳组合).sock

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



Running the H5 project requires the following steps: installing necessary tools such as web server, Node.js, development tools, etc. Build a development environment, create project folders, initialize projects, and write code. Start the development server and run the command using the command line. Preview the project in your browser and enter the development server URL. Publish projects, optimize code, deploy projects, and set up web server configuration.

To set character encoding on the server side to solve the garbled Bootstrap Table, you need to follow the following steps: check the server character encoding; edit the server configuration file; set the character encoding to UTF-8; save and restart the server; verify the encoding.

There are many reasons why XAMPP fails to start MySQL, including port conflicts, configuration file errors, insufficient system permissions, service dependency issues, and installation issues. The troubleshooting steps are as follows: 1) Check port conflicts; 2) Check configuration files; 3) Check system permissions; 4) Check service dependencies; 5) Reinstall MySQL. Follow these steps and you can find and resolve issues that cause MySQL startup to fail.

This article introduces several methods to check the OpenSSL configuration of the Debian system to help you quickly grasp the security status of the system. 1. Confirm the OpenSSL version First, verify whether OpenSSL has been installed and version information. Enter the following command in the terminal: If opensslversion is not installed, the system will prompt an error. 2. View the configuration file. The main configuration file of OpenSSL is usually located in /etc/ssl/openssl.cnf. You can use a text editor (such as nano) to view: sudonano/etc/ssl/openssl.cnf This file contains important configuration information such as key, certificate path, and encryption algorithm. 3. Utilize OPE

The preview methods of Bootstrap pages are: open the HTML file directly in the browser; automatically refresh the browser using the Live Server plug-in; and build a local server to simulate an online environment.

The key to PHPMyAdmin security defense strategy is: 1. Use the latest version of PHPMyAdmin and regularly update PHP and MySQL; 2. Strictly control access rights, use .htaccess or web server access control; 3. Enable strong password and two-factor authentication; 4. Back up the database regularly; 5. Carefully check the configuration files to avoid exposing sensitive information; 6. Use Web Application Firewall (WAF); 7. Carry out security audits. These measures can effectively reduce the security risks caused by PHPMyAdmin due to improper configuration, over-old version or environmental security risks, and ensure the security of the database.

C language provides functions that process file metadata, including extracting file size, modifying time, and access permissions. Use the stat() function to get file metadata and modify file permissions through the chmod() function.

This article will explain how to improve website performance by analyzing Apache logs under the Debian system. 1. Log Analysis Basics Apache log records the detailed information of all HTTP requests, including IP address, timestamp, request URL, HTTP method and response code. In Debian systems, these logs are usually located in the /var/log/apache2/access.log and /var/log/apache2/error.log directories. Understanding the log structure is the first step in effective analysis. 2. Log analysis tool You can use a variety of tools to analyze Apache logs: Command line tools: grep, awk, sed and other command line tools.
